Kernel panic on Debian multi-boot
Hi,
I just installed Debian Sarge from the net-install CD to a 5GB logical partition on my only HDD. I have Ubuntu and Slack installed on two 5GB partitions before Debian. I installed GRUB to the Debian partition (hda5), keeping my Ubuntu GRUB on the MBR. When I try to boot to Debian, I get the following message: VFS: Cannot open root device "hda5" or 03.05 Please append a correct "root=" boot option Kernel panic: VFS: Unable to mount root fs on 03:05 I'm running a Gateway 450ROG laptop. Here is my fstab: # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0 /dev/hda1 / ext3 defaults,errors=remount-ro 0 1 /dev/hda2 none swap sw 0 0 /dev/hda3 /mnt/Slack ext3 defaults 0 0 /dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0 /dev/hda5 /mnt/Debian ext3 defaults 0 0 Here is my menu.lst entry: title Debian root (hd0,4) kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hda5 boot I tried to change it to root=0x0305, but that didn't work either. I've read many threads, but none giving a solution. Any ideas? --C |
According to fstab, your root partition is hda1, while hda5 gets mounted as an ordinary partition. This contradicts with having "root=/dev/hda5" parameter passed to your kernel. Maybe you should also post the results of 'fdisk -l'.
|
Right, that's my fstab from Kubuntu, which is running off of the first partition.
Here's the result of fdisk -l (run from Slack, on hda3) Disk /dev/hda: 40.0 GB, 40007761920 bytes 255 heads, 63 sectors/track, 4864 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 1 608 4883728+ 83 Linux /dev/hda2 4803 4864 498015 82 Linux swap /dev/hda3 609 1217 4891792+ 83 Linux /dev/hda4 1218 1826 4891792+ 5 Extended /dev/hda5 1218 1826 4891761 83 Linux |
I reinstalled Debian and wrote Grub to the MBR. I can now boot all of my various OSes. So it's fixed, but I didn't really learn anything. If anyone knows what was going on, I'd love to know in case I encounter the problem again and am unable to reinstall.
Thanks a lot, --C |
Got it:
I added the initrd line, and now it boots perfectly from another distro's bootloader. Here's the new /boot/grub/menu.lst entry: title Debian Sarge 3.1 Kernel 2.4 kernel (hd0,4)/boot/vmlinuz-2.4.27-2-386 root=/dev/hda5 initrd (hd0,4)/boot/initrd.img-2.4.27-2-386 root=/dev/hda5 boot --C |
FWIW
Your underlying problem is that Linux distros are not particularly designed to "play well" w/ each other. Upon installation, each one thinks it is supposed to be in control & presumes that the MBR is its to take over. Sometimes the new boot menu will have a few entries for the previously installed OS's, but then the result is cluttered and usually not complete. You then have to go in and once more edit a bootloader configuration file to get things right. After about the 2nd or 3rd time, this get old. Here is how I avoid the problem ... When I set up a multi boot system of *nix OS's, I use a separate "Master" bootloader that chains to everybody elses' bootloaders. This is a bit of a pain to set up, but it beats the alternative. So far, I have only used GRUB as this Master Bootloader, but I have a friend who loves GAG & keeps urging me to try it out. Using GRUB as the master requires that it (the master GRUB) either share a partition w/ one of the installed OS's, or have a (very small) dedicated one of its own. GRUB can be the "Master Bootloader" because it can chain to lilo or another instance of itself as easily as to a Win install. The Master Bootloader is installed to the MBR and each OS is told to install its bootloader to its root partition. (I don't bother w/ separate boot partitions in this situation -- too much partition clutter.) The advantages are: * You never have to modify any OS's menu.lst (grub.conf) or lilo.conf. * You see exactly what the distro intended you to see. * Your boot menus are uncluttered. * When you add an OS, you change a file that you understand, because you wrote it. * Said change is the addition of a simple 3 line chainload section. * The disadvantages are: * You have to learn (RTFM^2) grub-install. * You have to protect your MBR during OS install. * You have to back up your MBR. * An example: "Tux" is semipublic machine for new & prospective GNU/Linux users to test drive a variety of distros and compare them against each other & even Win93SE. Its partition layout looks something like this: hda MBR GRUB binary ("master") => hda1 hda1 GRUB partition hda2 Win98 SE hda3 Linux swap, shared hda4 (open) hdb MBR FreeBSD boot binary hdb1 FreeBSD install hdb2 (extended) hdb5 /Data (common to all) hdb6 Debian Sarge hdb7 SimplyMEPIS 2004.06 hdb8 FC2 hdb9 Mandrake 10 hdb10 SuSE 9 hdb11 Ubuntu hdb3 RH server (Samba study group) hdb4 SuSE server (Samba study group) Here are some excerpts (from memory) from the corresponding /hda1/boot/grub/menu.lst Code:
# This is the master boot menu Note that (hd1) means the MBR of hdb. Hope this isn't too long or too unclear, and someone finds it useful. |
All times are GMT -5. The time now is 02:08 AM. |