LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Kernel panic after upgrade (https://www.linuxquestions.org/questions/linux-kernel-70/kernel-panic-after-upgrade-503624/)

jaristr 11-21-2006 11:59 AM

Kernel panic after upgrade
 
Hi,
I updated some debian packages using unstable repository (used the stable before that) and I think it updated the kernel but after boot this is what it gives: http://img370.imageshack.us/img370/8339/kpwx3.png
A kernel panic, is there anything you can do at these kind of situations or do you just have to reinstall the OS?

Thanks.

pljvaldez 11-21-2006 12:12 PM

What kernel did you install and what kernel are you trying to boot? It seems from there what happened is that it updated some programs, specifically modprobe and now you're trying to boot the old kernel, but don't have the old modprobe.

I would try booting with a liveCD and see if there is a newer kernel listed and that it just wasn't added to the grub menu.lst. The new kernel should be in the /boot directory (you'll have to chroot in) and the menu.lst will be in /boot/grub/menu.lst. Edit the menu.lst so you can try to boot the new kernel.

jaristr 11-21-2006 12:47 PM

Thank you for the reply, here is a screen shot of the grub menu:
http://img161.imageshack.us/my.php?image=bmkt4.png

I dont remember what the kernel version was but we can see that the new/current one from that screen shot, 2.4.27-2-386

pljvaldez 11-21-2006 01:08 PM

What is wrong is that you updated modprobe and the new modprobe is not compatible with the old 2.4 kernels (BTW, 2.4.27 is the default Debian kernel, not an updated one). It is expecting a new 2.6 kernel.

As I said, you need to boot with a Live CD and see if it installed a 2.6 kernel to the /boot menu. If so, you need to add it to the grub menu so you can boot the newer kernel. If this is a new install and you haven't done much work yet, it might be easier to just reinstall (type linux26 at the boot prompt for a 2.6.8 kernel).

Otherwise, do the following:
Code:

1) boot with a live CD like Knoppix
2) mount your / debian partition somewhere
3) chroot /mnt/whatever (change /mnt/whatever to where you mounted your / debian partition)
4) cd /boot and then ls to see what kernel are listed.  If you only see 2.4.27, you can try to aptitude install kernel-image-2.6-386 (assuming you have a pentium type computer).  To see other kernels, use apt-cache search kernel-image
5) edit /boot/grub/menu.lst to include the 2.6 kernel in the /boot directory
6) type exit and reboot, selecting the 2.6 kernel.

It just dawned on me that you said you installed some packages from Sid. Were you trying to upgrade your entire install or just a few packages? Did you use apt-pinning?

jaristr 11-21-2006 09:41 PM

Ok thanks a lot for the instructions! Let's see, what is Sid? I said I installed from the unstable because I wanted latest packages and I meant to install only one game first but it wanted to upgrade a whole list of packages first so I let it do that...

I forgot to mention that Im actually running the debian inside a vmware player. So I hope that is not causing the problem but now that I think about it, this isnt the first time updating kernel has failed using a VM and ended up in kernel panic. Same thing happened with FC5 last time.

I used ubuntu as liveCD and mounted the debian partition (HD) and this is how it looks in the boot directory: http://img224.imageshack.us/img224/3929/ulcvtt0.png

If this cannot be fixed it's alright but I would like to learn how to fix these.

pljvaldez 11-22-2006 11:17 AM

Okay, so it looks like it only updated modprobe and not a kernel (see, there is only one kernel listed, 2.4.27).

So what I would try now (though I'm not sure it will work), is to mount the drive like you did in Ubuntu. Then do chroot /mnt/debi (assuming of course, you use that same mount point). This will make you root in your Debian partition (i.e. it's like being logged into a Debian root console, you are no longer in Ubuntu).

Then you have a couple of options:

1) if you don't mind running Sid (unstable branch codename) totally, then edit your /etc/apt/sources.list and change every "stable"/"sarge" to "unstable"/"sid" (you can use either the branch - stable or unstable - or the codenames -sarge or sid -. Then run aptitude update && aptitude dist-upgrade. The downside to running Sid is that you'll get a lot of updates and things will occasionally break (about as much as any other bleeding edge distro like Fedora). Sarge is rock solid stable. Nothing should ever break. Or you can use Etch (testing) which will become the new stable in a relatively short time (next couple months, I think). Testing is a middle ground, more stable than things like Fedora, but not up to Debian's "stable" (which means it has to be rock solid on all the CPU architectures supported by Debian).

2) Just update the kernel and see if that will fix it. Do aptitude install linux-image-2.6-386 and see if that will let you boot.

3) Reinstall. Maybe use the new Etch installer, which will get you newer packages, but not the latest.

You can always upgrade to sid by changing the /etc/apt/sources.list file as mentioned above. That's one of the powerful things about Debian. I can upgrade releases each time without any problems. Just change the sources and do a dist-upgrade.

Let me know if any of these work. I've never tried running aptitude from a chroot environment, but I don't see why it shouldn't work...

jaristr 11-24-2006 08:37 AM

Thanks for the great instructions! I tried options 1 and 2 but it's giving the exact same error after the upgrade.
Well I'm, just going to reinstall then. :)

Thanks.

Nishant Desai 11-28-2006 05:43 AM

Quote:

Originally Posted by jaristr
Thanks for the great instructions! I tried options 1 and 2 but it's giving the exact same error after the upgrade.
Well I'm, just going to reinstall then. :)

Thanks.

Dear Jaristr,

Find out the step no 8 in the below document and you will find that what error you have done actually:

http://www.linuxquestions.org/linux/answers/print/150

The thing is you have left the option for the Extended FS partiotion to 'm' instead of 'y', and that is why you are getting the error of pivot root(See the last third line in the .png file you have posted in your first post of this thread).

So you have to do the make config and have to do select the 'y' in EXT3_FS option in the fs partition option while compiling the kernel.

Let me hope this will work for you, best of Luck.

Thanks,
Nishant


All times are GMT -5. The time now is 07:59 PM.