You are not logged in.

#1 2011-02-14 00:23:28

pgcudahy
Member
Registered: 2011-02-14
Posts: 7

Upgrade leads to kernel panic

Hey I was doing a system upgrade that failed with a hang and an error about not being able to execute /sbin/mingetty which I don't remember exactly. When I rebooted I got

 EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
Not activating Mandatory Access Control now since /sbin/tomoyo-init doesn't exist.
switch_root: can't execute '/sbin/init': No such file or directory
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: switch_root Not tainted 2.6.36-ARCH #1
Call Trace:

I booted up with a rescue CD and pacman.log ends with Running 'pacman -Syu'; synchronizing package lists; starting full system upgrade; upgraded linux-api-headers (2.6.36.2-1 -> 2.6.37-1)
That's it. When I try to chroot back into my regular setup according to the instructions at https://wiki.archlinux.org/index.php/Chroot, chroot complains that /bin/bash doesn't exist.
Any ideas on where to go next to try and fix my borked upgrade?

Patrick

Offline

#2 2011-02-14 01:21:48

pgcudahy
Member
Registered: 2011-02-14
Posts: 7

Re: Upgrade leads to kernel panic

Okay, so I ran ldd /bin/bash and copied over the missing libraries so now I'm able to chroot back into my setup. Now how can I roll things back?
Patrick

Offline

#3 2011-02-14 02:37:30

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Upgrade leads to kernel panic

If you  have once again a booting system I would try to finish the installation instead of trying to roll back.
If, however, that's what you really want to do; to take a look at the file /var/log/pacman.log and you will see all that was changed in the failed upgrade and you can try to work things backwards from there.

R.

Offline

#4 2011-02-16 05:45:27

pgcudahy
Member
Registered: 2011-02-14
Posts: 7

Re: Upgrade leads to kernel panic

Well I can't get the system to boot but I took your advice and chroot'd in and ran pacman -Su. It finished and seemed to be happy. When I try and reboot now I get a kernel panic "No init found". I checked grub's menu.lst and found that the uuid was now wrong. I ran mkinitcpio -p kernel26 and put the correct uuids in grub/menu.lst. That didn't change anything so I added a init=/sbin/init to the kernel line in grub/menu.lst but now it just complains that it can't execute init or /sbin/init. Anyone have a clue of what to try next?
Patrick

Offline

#5 2011-02-16 15:02:28

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: Upgrade leads to kernel panic

but I took your advice and chroot'd in and ran pacman -Su

You should do a pacman -Syu for a full system upgrade. I wonder if that is part of your problem now.
BTW, should you init file not be something like: initrd /boot/kernel26.img as opposed to to init an the path to /sbin/init?

R.

Offline

#6 2011-02-16 15:49:26

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Upgrade leads to kernel panic

Could you check from within your chroot that /sbin/init does actually exist?
If so, double check the paths or UUIDs in your grub config, you are referring to the correct root device and not /boot or something, right?

@ralvez: he's talking about the "init=" kernel parameter, not the initrd line.

Offline

#7 2011-02-18 05:17:29

pgcudahy
Member
Registered: 2011-02-14
Posts: 7

Re: Upgrade leads to kernel panic

/sbin/init exists and works from with the chroot environment. As for the UUIDs I've got one partition (/dev/sda1) as the root partition and /dev/sda3 as /boot. I've tried both UUIDs and neither works.

Offline

#8 2011-02-23 18:22:58

bout10bucks
Member
Registered: 2009-09-11
Posts: 25

Re: Upgrade leads to kernel panic

https://bbs.archlinux.org/viewtopic.php … 25#p895625

try to run '# mkinitcpio -p kernel26' from chroot

Offline

#9 2011-03-06 20:14:38

pgcudahy
Member
Registered: 2011-02-14
Posts: 7

Re: Upgrade leads to kernel panic

Just to be clear, I have my /boot partition on /dev/sda1 and / on /dev/sda3. I think I should be passing the uuid for /dev/sda3 to grub. Correct?
Patrick

Offline

Board footer

Powered by FluxBB