[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grub 0.95, sees fstab entry with "LABEL=/" and mounts the wrong "root"

From: Lee
Subject: Grub 0.95, sees fstab entry with "LABEL=/" and mounts the wrong "root"
Date: Fri, 08 Oct 2004 12:25:18 -0700

Hello bug-grub people,

   I encountered a subtle "gotcha" in using GRUB. I had to loop through
the documentation and trials several times before I realized what was

   Here is the story, I have a 7 or 8 year old Red Hat installation on
/dev/hdb. Red Hat has been happily running Grub 0.93 and booting all
kinds of disks. Everytime I put something else on /hda or /hdc I could
add another line to grub.conf and I'd eventually get it right.

   Then I installed a brand new huge UserLinux--Debian system on /hda
... complete with a brand new Grub 0.95 installation on /hda.

   To boot my old /hdb system I copied the appropriate stanzas from
/hdb/.../boot/grub/grub.conf  into the /hda/boot/grub/menu.lst

Like this


title           Red Hat with hard root device in fstab
root            (hd1,0)
#1 kernel               /vmlinuz-2.4.20-28.8 ro root=LABEL=/
#2 kernel               /vmlinuz-2.4.20-28.8 ro root=/dev/hdb7
initrd          /initrd-2.4.20-28.8.img

It turns out that Red Hat linux has a /etc/fstab table that mounts the
root partition using "Label=/" syntax. The two ways of mounting root
Label=/         / ext3 0 0 0  #### Mounts / by seeking the Label "/"
/dev/hdb7       / ext3 0 0 0  #### Mounts / by seeking a physical disk

So the bug was... the grub line labeled #1 failed with "file not found".
Fixing grub to the #2 above caused the boot process to start and the
RedHat init process on /hdb7 mounts the root filesystem on /dev/hda! So
I was perpetually mounting the Debian partition labeled "/" on /hda
while I wanted to mount the partition labeled "/" on /hdb 

The fix required was to edit the /etc/fstab on /hdb disk to mount
physical disks NOT search for LABEL=/. The mount process in Linux goes
through the disks starting with /dev/hda. The label "/" on /dev/hdb is
never found.
Well, what a merry chase I had with that little thing. The problem is
how to put this in the GRUB documentation so people see it?

Thanks, and Grub is really a pleasure. Lee McKusick

reply via email to

[Prev in Thread] Current Thread [Next in Thread]