Bug 294051

Summary: Use of "LABEL=/" in fstab causes mkinitrd not to add LVM support
Product: Red Hat Enterprise Linux 4 Reporter: Stephen Warren <swarren>
Component: mkinitrdAssignee: Brian Lane <bcl>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 4.5   
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: 2011-07-27 18:00:35 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 Stephen Warren 2007-09-17 22:50:05 UTC
Description of problem:

My fstab contains the following:
LABEL=/ / ext3 defaults 1 1

/ is physically /dev/mapper/vg_h_0-lv_h_root, so an initrd needs LVM support.

The following code in mkinitrd:
elif ! echo $rootdev | cut -c1-6 |grep -q "LABEL=" ; then

explicitly refuses to add LVM support to the initrd if the fstab uses LABEL= syntax.

Hence, initrds built by mkinitrd cause a kernel panic on boot, since the root
partition cannot be found/mounted.

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

How reproducible:
Always

Steps to Reproduce:
1. Upgrade kernel
2. Reboot
3.
  
Actual results:
Kernel panic

Expected results:
Successful boot

Additional info:
This can luckily be worked around by manually re-running mkinitrd, as follows:

root_lvm=1 mkinitrd ...

since luckily mkinitrd doesn't clear out root_lvm by default (which I would
consider a bug - using uninitialized variables - but it's useful in this case!)

Comment 1 Rubin Simons 2008-04-23 14:31:44 UTC
I can confirm this bug still exists in RHEL 4 ES U5. I ran into it last week;
specify root as "LABEL=/" in /etc/fstab; watch mkinitrd skip lvm-specific steps
like copying {lvm.static, lvm.conf} and including more than only the dm-mod
module. It seems to me that bugs #209473, #212124, #214184, #246626, #327181 and
#426671 are related to this (not sure if they're strictly dupes).