LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 04-18-2005, 02:13 AM   #1
coldsalmon
Member
 
Registered: Mar 2005
Location: USA
Distribution: Kubuntu Breezy
Posts: 79

Rep: Reputation: 15
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
 
Old 04-18-2005, 05:18 AM   #2
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
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'.
 
Old 04-18-2005, 11:36 AM   #3
coldsalmon
Member
 
Registered: Mar 2005
Location: USA
Distribution: Kubuntu Breezy
Posts: 79

Original Poster
Rep: Reputation: 15
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
 
Old 04-19-2005, 04:53 PM   #4
coldsalmon
Member
 
Registered: Mar 2005
Location: USA
Distribution: Kubuntu Breezy
Posts: 79

Original Poster
Rep: Reputation: 15
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
 
Old 04-22-2005, 02:29 AM   #5
coldsalmon
Member
 
Registered: Mar 2005
Location: USA
Distribution: Kubuntu Breezy
Posts: 79

Original Poster
Rep: Reputation: 15
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
 
Old 06-06-2005, 07:13 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
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
# Do NOT let it be overwritten during OS install
# Put only chaining sections in this file

colors light-red/red white/red
default 2

title    Win98
root (hd0,1)
chainloader +1

title    FreeBSD
root (hd1)
chainloader +1

title    Mepis
root (hd1,6)
chainloader +1

title    Fedora
root (hd1,7)
chainloader +1

title    Mandrake
root (hd1,8)
chainloader +1

title    Samba Sub-menu
lock
configfile smaba.menu.lst
Note the ability unclutter by using sub menus.
Note that (hd1) means the MBR of hdb.

Hope this isn't too long or too unclear, and someone finds it useful.

Last edited by archtoad6; 06-06-2005 at 08:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Panic from debian to fedora... vidski Linux - Software 3 04-05-2005 02:26 AM
Upgrading kernel on Debian from 2.4 to 2.6.8, Kernel Panic omlette Linux - General 3 03-07-2005 07:00 AM
Kernel panic (Debian: migrating from 2.4 to 2.6 kernel) VertX Linux - Software 4 02-05-2005 09:32 AM
Multi-boot Windows, Debian with several kernels loopyzort Linux - Newbie 12 06-03-2004 06:32 PM
Debian Kernel Panic during booting xterminator890i Linux - Laptop and Netbook 0 06-03-2004 05:39 PM


All times are GMT -5. The time now is 01:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration