Bug 212124 - PATCH fix the root argument to mkrootdev in case of lvm by LABEL boot
PATCH fix the root argument to mkrootdev in case of lvm by LABEL boot
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-10-25 04:07 EDT by Hans de Goede
Modified: 2009-02-04 16:14 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-02-04 16:14:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
PATCH fix the root argument to mkrootdev in case of lvm by LABEL boot (1.20 KB, patch)
2006-10-25 04:07 EDT, Hans de Goede
no flags Details | Diff

  None (edit)
Description Hans de Goede 2006-10-25 04:07:11 EDT
I've tested mkinitrd-5.1-10 with booting a lvm root by LABEL and it works!

However it still specifies the root argument to the mkrootdev command as
/dev/dm-x, thus if the kernel doesn't have a root= argument and mkrootdev falls
back to his own root arg things will fail. This is because for some reason
/sbin/mkinitrd takes the devno from the root device returned by nash and then
searches /sys/block (which nash also does internally, so this is kinda useless)
and then finds /dev/dm-x for a /dev/mapper/XXXX root as the code in
/sbin/mkinitrd doesn't contain an exception for /dev/dm-x as the nash code now

This patch fixes this by simply taking the rootdev value returned by nash, as
that was found by scanning /sys/block already.
Comment 1 Hans de Goede 2006-10-25 04:07:11 EDT
Created attachment 139313 [details]
PATCH fix the root argument to mkrootdev in case of lvm by LABEL boot
Comment 2 Hans de Goede 2007-08-12 16:19:55 EDT
Or maybe completely get rid of the root argument to mkrootdev, since it normally
isn't used anyways and thus only serves to confuse people (it sure confused me
for a long time).
Comment 3 Bug Zapper 2008-04-03 14:32:22 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 4 Hans de Goede 2008-04-04 04:24:31 EDT
It looks like this bug is still present (even though the pathc no longer applies).

There now is some code in mkinitrd to check for /dev/mapper paths, but this now
only gets used for dm-crypt, I believe simple lvm dm setups will still get
/dev/dm-X as mkrootdev arg in there initrd script.
Comment 5 Rubin Simons 2008-04-23 10:21:18 EDT
I can confirm this bug still exists in RHEL 4 ES U5. I ran into it last week. It
seems to me that bugs #209473, #214184, #246626, #294051, #327181 and #426671
are related to this (not sure if they're strictly dupes). 
Comment 6 Bug Zapper 2008-05-13 22:25:48 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 7 greg matthews 2008-07-11 06:33:23 EDT
This looks a lot like something I'm bitten by in RHEL4.6. Attempting to boot a
Xen domU image of rhel4 results in this kernel panic. If I edit the init script
in the initrd image to mount the /dev/VolGroup00/LogVol00 instead of /dev/root,
it will boot.
Comment 8 Hans de Goede 2009-02-04 16:14:12 EST
I've just checked this and this no longer is a problem in the current mkinitrd, closing.

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