Bug 100883 - corrupt root field in grub.conf when root LABELed in fstab
Summary: corrupt root field in grub.conf when root LABELed in fstab
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd
Version: 9
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-07-26 15:46 UTC by Richard R Barton
Modified: 2007-04-18 16:56 UTC (History)
0 users

Clone Of:
Last Closed: 2003-08-27 00:06:12 UTC

Attachments (Terms of Use)

Description Richard R Barton 2003-07-26 15:46:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Column one in /etc/fstab for mount point / is LABEL=/ .  When I install a kernel
package either during initial install or using up2date, the corresponding title
command in /boot/grub/grub.conf is corrupted.  The root= kernel argument ends up
being root=LABEL=/ instead of the real root device which is /dev/md0 .

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  Label your root device using 'e2label /dev/? /' .
2.  Change the fs_spec field of /etc/fstab for the / mountpoint to LABEL=/ .
3.  Install another kernel RPM.

Additional info:

Comment 1 Michael Fulbright 2003-07-30 18:20:00 UTC
Probably a problem with grubby.

Comment 2 Jeremy Katz 2003-08-06 21:27:38 UTC
grubby uses what you have listed as your root filesystem in /etc/fstab.  So if
you list it with a label there, we'll mount it with a label always (including in
the initrd).  If you list the device, then the device will be used instead.

Comment 3 Richard R Barton 2003-08-09 01:19:15 UTC
The kernel can't handle a root= parameter of a device label like LABEL=/ . 
Therefore, some software must resolve the label to a true device in a format
acceptable to the kernel's root= parameter.  Since Grub passes the kernel
parameter from its configuration file, either the label must be resolved and the
associated device put in the kernel parameter list in grub.conf or grub itself
must resolve the label and modify the kernel parameter list before passing it to
the kernel during boot.

Comment 4 Jeremy Katz 2003-08-27 00:06:12 UTC
The stock setup as shipped by Red Hat Linux uses labels so that if your drives
move around, you can still mount filesystems.  We also use initrds by default
which then are able to mount by label.  If you are building your own kernels and
not using an initrd, then you need to change your grub config for your first
custom kernel and it will then be used for later ones (assuming that your kernel
is set as the default as grubby will copy the default)

Note You need to log in before you can comment on or make changes to this bug.