Bug 204768
Summary: | PATCH: fix booting by LABEL from lvm or dmraid | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Hans de Goede <hdegoede> |
Component: | mkinitrd | Assignee: | Peter Jones <pjones> |
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | chabotc |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-10-25 08:11:03 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
Hans de Goede
2006-08-31 14:12:43 UTC
Created attachment 135289 [details]
blkid.tab as it should be
Created attachment 135290 [details]
blkid.tab after running nash (or /sbin/mkinitrd)
Created attachment 135291 [details]
Patch fixing the adding of doulble entries to blkid.tab
Created attachment 135333 [details]
Improved patch as discussed on IRC
Changing summary although the attached patch indeed: "fixes mkinitrd (nash) adding double/wrong lines to /etc/blkid/blkid.tab" It also fixes booting by LABEL from lvm or dmraid, which is a quite a bit more important. *** Bug 203241 has been marked as a duplicate of this bug. *** Created attachment 135400 [details]
Patch as applied to CVS
Patch as applied to CVS
This works for me in 5.1.10-1 . Can you test and close the bug if it works for you? Created attachment 135453 [details]
/sbin/mkinitrd patch fixing the root argument to mkrootdev in case of lvm by LABEL boot
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.
---
Another concern I have is that for people who have /dev/dm-x as root in their
fstab grubby will put root=/dev/dm-x as kernel argument in /etc/grub.conf,
leading to the same problem. I'm thinking about writing a patch for this which
calls nashDmGetDevName() in the mkrootdev function when root is /dev/dm-x, the
problem is that we first have to create a devno for this, I think this is best
done by getting the major from /proc/devices (code already in dm.c) and using N
in /dev/dm-N as the minor. Will you take such a patch?
I finally got confirmation from a friend of mine that this patch really fixes the mentioned problem, so this bug can be closed now. I'm opening seperate bugs for the other potential problems which I have noticed and described in comment #9. The wrong arch to mkrootdev patch is bug 212124 . I'll do some further testing to confirm that booting with root=/dev/dm-X is currently broken and if it is I'll file a seperate bug for that too. Booting with root=/dev/dm-X is indeed currently broken, I've filed this as bug 212126 |