Bug 212124

Summary: PATCH fix the root argument to mkrootdev in case of lvm by LABEL boot
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: triage
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-04 21:14: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:
Attachments:
Description Flags
PATCH fix the root argument to mkrootdev in case of lvm by LABEL boot none

Description Hans de Goede 2006-10-25 08:07:11 UTC
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
does.

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 08:07:11 UTC
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 20:19:55 UTC
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 18:32:22 UTC
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:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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 08:24:31 UTC
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 14:21:18 UTC
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-14 02:25:48 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 greg matthews 2008-07-11 10:33:23 UTC
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 21:14:12 UTC
I've just checked this and this no longer is a problem in the current mkinitrd, closing.