Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509492 - sys-boot/dracut does not find udev rules when executing lvm module
Summary: sys-boot/dracut does not find udev rules when executing lvm module
Status: RESOLVED DUPLICATE of bug 509454
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-03 17:46 UTC by Andrius Štikonas
Modified: 2014-05-04 00:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
rdsosreport.txt (rdsosreport.txt,66.39 KB, text/plain)
2014-05-03 22:20 UTC, Andrius Štikonas
Details
journalctl (journalctl,62.54 KB, text/plain)
2014-05-03 22:21 UTC, Andrius Štikonas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius Štikonas 2014-05-03 17:46:13 UTC
Dracut does not add lvm executable to initrd due to missing udev rules.

*** Including module: lvm ***
Skipping udev rule: 11-dm-lvm.rules
Skipping udev rule: 69-dm-lvm-metad.rules
grep: /var/tmp/initramfs.DTXNPO/lib/udev/rules.d/69-dm-lvm-metad.rules: No such file or directory
sed: can't read /var/tmp/initramfs.DTXNPO/lib/udev/rules.d/69-dm-lvm-metad.rules: No such file or directory

This happens with sys-apps/systemd-212-r4 and sys-kernel/dracut-037.

Obviously systemd fails to boot.


Reproducible: Always
Comment 1 Andrius Štikonas 2014-05-03 18:00:13 UTC
Consider including this patch:

http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/?id=12819a579900b9691e2bfaf14e76fbb025851530
Comment 2 Alexander Tsoy 2014-05-03 19:53:06 UTC
Are you sure you are not affected by bug 509454 ?
Comment 3 Alexander Tsoy 2014-05-03 20:01:27 UTC
(In reply to Andrius Štikonas from comment #1)
> Consider including this patch:
> 
> http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/
> ?id=12819a579900b9691e2bfaf14e76fbb025851530

This patch only silence the warning about missing 69-dm-lvm-metad.rules
Comment 4 Andrius Štikonas 2014-05-03 20:04:08 UTC
Not sure, I might be affected by that bug. I already understood that it is not lvm module problem. I will try to set that enviromental variable and recompile systemd.

The problem is that no /dev/mapper entries are created at all. The error that I can see during the initrd phase is:
device mapper reload ioctl on failed: Invalid argument

So even cryptsetup luksOpen does not create /dev/mapper/unencrypted.
Comment 5 Stefan G. Weichinger 2014-05-03 20:07:18 UTC
(In reply to Andrius Štikonas from comment #4)
> Not sure, I might be affected by that bug. I already understood that it is
> not lvm module problem. I will try to set that enviromental variable and
> recompile systemd.
> 
> The problem is that no /dev/mapper entries are created at all. The error
> that I can see during the initrd phase is:
> device mapper reload ioctl on failed: Invalid argument
> 
> So even cryptsetup luksOpen does not create /dev/mapper/unencrypted.

I am not sure what happens here but I am maybe also affected by one of these 2 bugs.

The history of my searching is found in the gentoo-user-ml:

eg. http://marc.info/?l=gentoo-user&m=139914682214472&w=2

I applied the patch mentioned here, right now I could boot .. though I am unsure what of the dozens of changes today helped in the end.
Comment 6 Alexander Tsoy 2014-05-03 20:26:41 UTC
1. Make sure you have the last revision of systemd ebuild.
2. Set udevdir=/lib/udev in /usr/share/pkgconfig/udev.pc
3. If you changed udevdir at step 2, then reemerge systemd
4. If you have /rules.d/ dir, then reemerge corresponding packages:
emerge -1av $(qfile -qCS /rules.d)
5. If you have /lib/rules.d/ dir, then reemerge corresponding packages:
emerge -1av $(qfile -qCS /lib/rules.d)
Comment 7 Stefan G. Weichinger 2014-05-03 20:29:42 UTC
(In reply to Alexander Tsoy from comment #6)
> 1. Make sure you have the last revision of systemd ebuild.
> 2. Set udevdir=/lib/udev in /usr/share/pkgconfig/udev.pc
> 3. If you changed udevdir at step 2, then reemerge systemd
> 4. If you have /rules.d/ dir, then reemerge corresponding packages:
> emerge -1av $(qfile -qCS /rules.d)
> 5. If you have /lib/rules.d/ dir, then reemerge corresponding packages:
> emerge -1av $(qfile -qCS /lib/rules.d)

2. setting is there, so no 3. needed here.

4 & 5 : I don't have both rules.d dirs ...

(not sure if you replied to me or Andrius .. my system works right now)

Thanks, Stefan
Comment 8 Andrius Štikonas 2014-05-03 22:20:43 UTC
Created attachment 376306 [details]
rdsosreport.txt

I fixed path in step 2 but still no luck.

I'm attaching dracut logs.
Comment 9 Andrius Štikonas 2014-05-03 22:21:20 UTC
Created attachment 376308 [details]
journalctl
Comment 10 Alexander Tsoy 2014-05-03 22:50:39 UTC
(In reply to Andrius Štikonas from comment #8)
> I fixed path in step 2 but still no luck.

Hmm.. Check udevdir variable in /usr/lib/dracut/dracut.conf.d/gentoo.conf and reemerge dracut if the path is incorrect. Also make sure that you reemerged systemd after fixing udev.pc and regenerated initramfs after all changes.
Comment 11 Andrius Štikonas 2014-05-03 23:18:58 UTC
(In reply to Alexander Tsoy from comment #10)
> (In reply to Andrius Štikonas from comment #8)
> > I fixed path in step 2 but still no luck.
> 
> Hmm.. Check udevdir variable in /usr/lib/dracut/dracut.conf.d/gentoo.conf
> and reemerge dracut if the path is incorrect. Also make sure that you
> reemerged systemd after fixing udev.pc and regenerated initramfs after all
> changes.

Something has changed. Now it asks me for passphrase. But then it gets stuck. Apparently it can't create any devices.

I get the following error:
device-mapper: table 252:1 crypt: Device lookup failed.
Failed to activate: Input/output error.

If I execute cryptsetup luksOpen /dev/sda3 lvm it fails as well with similar error.

I've also tried to mount /dev/sda2 as /boot but very strangely, this fails as well. It says: /dev/sda2 is already mounted as /boot or is busy.
Comment 12 Andrius Štikonas 2014-05-04 00:03:29 UTC
Ok, I was finally able to boot into system. Not sure what exactly helped. Either I recompiled some more packages or switched back to dracut --hostonly. In the end, I suppose it is the dublicate of udev path bug, so I'm closing this.

*** This bug has been marked as a duplicate of bug 509454 ***