Bug 88962 - mkinitrd fails when root is on an LVM logical volume and physical volume device files are in a subdirectory of /dev
Summary: mkinitrd fails when root is on an LVM logical volume and physical volume devi...
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-04-15 19:28 UTC by Peter J. Dohm
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-08-04 20:18:15 UTC

Attachments (Terms of Use)

Description Peter J. Dohm 2003-04-15 19:28:24 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
mkinitrd's logic is incorrect when root is on a logical volume.

it assumes that the device file is going to reside in /dev and consequently
fails.  some hardware, like compaq/hp dl-series servers use the cpqarray or
cciss array controllers, and their device files reside in /dev/cciss instead of
directly in /dev, etc.

this was also a bug in 8.0

the quickie patch that implements a first-cut at the solution follows:

# diff -u /sbin/mkinitrd.orig /sbin/mkinitrd
--- /sbin/mkinitrd.orig 2003-04-15 14:51:39.000000000 -0400
+++ /sbin/mkinitrd      2003-04-15 14:51:55.000000000 -0400
@@ -535,7 +535,7 @@
 if [ -n "$root_lvm" ]; then
     pvs=$(/sbin/lvmdiskscan |grep "0x8E" | /bin/awk {'print $3;'})
     for pv in $pvs; do
-       cp -a $pv $MNTIMAGE/$pv
+       cp --parents -a $pv $MNTIMAGE/$pv
     inst /sbin/vgwrapper "$MNTIMAGE/bin/vgwrapper"

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

How reproducible:

Steps to Reproduce:
1. create root on a LVM with a piece of equipment whose physical volume
   is not directly in /dev, like on a compaq dl360, etc.
2. try to recreate the initrd
3. cry


Actual Results:  it fails because the device doesn't exist in /dev and the
initrd doesn't get created properly.

Expected Results:  it should work ;)

Additional info:

description should cover it.

Comment 1 Jeremy Katz 2003-05-16 21:38:30 UTC
Fixed in 3.5.51

Comment 2 Bill Nottingham 2006-08-04 20:18:15 UTC
Red Hat Linux and Red Hat Powertools are currently no longer supported by Red
Hat, Inc. In an effort to clean up bugzilla, we are closing all bugs in MODIFIED
state for these products.

However, we do want to make sure that nothing important slips through the
cracks. If, in fact, these issues are not resolved in a current Fedora Core
Release (such as Fedora Core 5), please open a new issues stating so. Thanks.

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