Bug 100883

Summary: corrupt root field in grub.conf when root LABELed in fstab
Product: [Retired] Red Hat Linux Reporter: Richard R Barton <rrbarton>
Component: mkinitrdAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-27 00:06:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:
Always

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)