Red Hat Bugzilla – Bug 100883
corrupt root field in grub.conf when root LABELed in fstab
Last modified: 2007-04-18 12:56:10 EDT
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):
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.
Probably a problem with grubby.
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.
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.
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)