LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Kernel panic on boot with new SATA drive Slackware 12 kernel: 2.6.21.5 (http://www.linuxquestions.org/questions/linux-hardware-18/kernel-panic-on-boot-with-new-sata-drive-slackware-12-kernel-2-6-21-5-a-726654/)

theapodan 05-17-2009 08:30 PM

Kernel panic on boot with new SATA drive Slackware 12 kernel: 2.6.21.5
 
I have a computer with 2 ide hard drives, one sata hard drive, and one sata cd drive. I am trying to add a second sata hard drive to this computer.

However, when I plug this drive in and boot, I get a kernel panic with a message about not finding root.

lilo.conf has:
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda6
label = Slackware
read-only # Partitions should be mounted read-only for checking

I am wondering if adding a new sata drive changes the drive order, making root some other drive, like say /dev/sdb6 or /dev/sdc6.

Is anyone familiar with this problem? How would I go about fixing it? If you need any more information, I'll do my best to supply it.

Thanks,
Robert.

David1357 05-17-2009 08:40 PM

Quote:

Originally Posted by theapodan (Post 3544073)
I am wondering if adding a new sata drive changes the drive order, making root some other drive, like say /dev/sdb6 or /dev/sdc6.

That happens so often that when most other distributions install, they use the UUID to identify the boot drive. See the output of "blkid" and the contents of "/dev/disk/by-uuid/*" once you get your system running again.

You will have to boot from a recent Live CD (I always recommend the latest System Rescue CD) and see what is going on. System Rescue CD usually tracks the latest kernel, so you will see your drives enumerated in a manner very similar to your current kernel.

Since you probably have access to the console, don't forget that you can use [Shift][PgUp] and [Shift][PdDn] to move up and down through the output of the console logger. You might be able to see enough drive enumeration information using this method that you can figure out where the kernel is placing your boot drive. If LILO allows you to edit the kernel parameters during bootup, you can change the boot drive manually.

If not, you might want to use this opportunity to install GRUB.

theapodan 05-17-2009 10:27 PM

Ah hah!

The new sata drive was being named sda!

However, rather than running lilo with an updated config (before plugging in the drive, and then rebooting in hope mode), I had a sudden flash of simplistic brilliance.


I switched the cables in the computer, so that linux gets the desired drive order from the BIOS so that the old sata disc is named sda.


I also looked into identifying drives by UUID, but it seems that lilo may not support that (not mentioned on manpages)

It seems, after looking for solutions to my problems, that lilo became passe around 2005, and it probably is time to install GRUB. I'm thinking of installing Arch, in which case I'll install GRUB too.

Thanks David.

Robert.

David1357 05-18-2009 03:02 PM

Quote:

Originally Posted by theapodan (Post 3544134)
It seems, after looking for solutions to my problems, that lilo became passe around 2005, and it probably is time to install GRUB.

I highly recommend GRUB. The ability to edit the kernel parameters and other settings before booting can be a real life saver.

This feature comes in especially handy when you are working on a system where it is difficult (or impossible) to connect a CD-ROM to boot a LiveCD.


All times are GMT -5. The time now is 12:35 AM.