I upgraded udev from 171-r9 to 196-r1. Then I regenerate initramfs using dracut and my system became unbootable - lvm volumes not activated. This was caused by udevdir option in /etc/dracut.conf.d/gentoo.conf. It was: $ grep ^udevdir /etc/dracut.conf.d/gentoo.conf udevdir="/lib/udev" and after reemerge of dracut it become: $ grep ^udevdir /etc/dracut.conf.d/gentoo.conf udevdir="/usr/lib/udev" Diff between lsinitrd outputs before and after reemerge of dracut: -14:01 dev/console -14:01 dev/kmsg -14:01 dev/null +14:09 dev/console +14:09 dev/kmsg +14:09 dev/null bin bin/cat bin/chroot @@ -240,8 +240,6 @@ lib64/modules/3.6.8-hardened/modules.symbols.bin lib64/systemd lib64/systemd/systemd-udevd -> /usr/lib/systemd/systemd-udevd -lib64/udev -lib64/udev/rules.d lib -> lib64 proc root @@ -298,6 +296,19 @@ usr/lib64/libudev.so -> libudev.so.1.2.0 usr/lib64/systemd usr/lib64/systemd/systemd-udevd +usr/lib64/udev +usr/lib64/udev/ata_id +usr/lib64/udev/cdrom_id +usr/lib64/udev/rules.d +usr/lib64/udev/rules.d/10-dm.rules +usr/lib64/udev/rules.d/11-dm-lvm.rules +usr/lib64/udev/rules.d/13-dm-disk.rules +usr/lib64/udev/rules.d/50-udev-default.rules +usr/lib64/udev/rules.d/60-persistent-storage.rules +usr/lib64/udev/rules.d/80-drivers.rules +usr/lib64/udev/rules.d/95-dm-notify.rules +usr/lib64/udev/rules.d/95-udev-late.rules +usr/lib64/udev/scsi_id usr/lib -> lib64 usr/sbin var Reproducible: Always
Or maybe this should be better fixed on dracut side. Dracut script (at least version 024) contains this: [[ -d $udevdir ]] \ || udevdir=$(pkg-config udev --variable=udevdir 2>/dev/null) if ! [[ -d "$udevdir" ]]; then [[ -d /lib/udev ]] && udevdir=/lib/udev [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev fi So removing udevdir from config should solve this problem.
Created attachment 332206 [details, diff] dracut-024-r2.ebuild.patch
Yes, probably I should make optional dependency on pkg-config which has been removed because other people didn't like that dependency.
Hmm.. But this will not solve all the problems. For example stable mdadm-3.1.4 installs udev rules in /lib/udev/rules.d (this was fixed in 3.2.x). So dracut anyway can't pick up 64-md-raid.rules file when generating initramfs. udev contains the compatibility patch wich adds /lib/udev/rules.d dir to the list of dirs where it looks for rules. So maybe this approach should be applied to dracut?
Created attachment 332282 [details, diff] dracut-024-fallback-udevdir.patch I have not tested this patch. I have simply upgraded mdadm. :)
Please check if dracut-024-r3 solves issue for you.
mdraid module still fails if 64-md-raid.rules is installed in /lib/udev/rules.d. It expects that the rule exist in {udevdir}/rules.d" dir, but inst_rules() preserves paths when installing rules. Part of dracut log: I: *** Including module: mdraid *** sed: can't read /var/tmp/initramfs.m5NR2G/usr/lib/udev/rules.d/64-md-raid.rules: No such file or directory $ sudo lsinitrd /boot/initramfs-3.7.1-hardened.img | grep 64-md-raid.rules -rw-r--r-- 1 root root 1973 Dec 29 23:40 lib64/udev/rules.d/64-md-raid.rules This is a sed command mentioned in dracut log. user@host /usr/lib64/dracut/modules.d/90mdraid $ grep sed ./module-setup.sh sed -i -r -e '/RUN\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(\$env\{DEVNAME\}|\$tempnode)"/d' "${initdir}${udevdir}/rules.d/64-md-raid.rules"
Created attachment 334578 [details, diff] 024-0002-dracut-functions.sh-support-for-altern.patch Modified version of the patch. Installs rules from alternative dirs to $udevdir/rules.d. Amadeusz, what do you think about this patch? It works for me.
(In reply to comment #8) > Created attachment 334578 [details, diff] [details, diff] > 024-0002-dracut-functions.sh-support-for-altern.patch Maybe using arrays is an overkill here. :)
Created attachment 334628 [details, diff] 024-0002-dracut-functions.sh-support-for-altern.patch
Thank you! I have committed dracut-024-r4. I was going to to that yesterday, but thanks to CVS being so stupid and so slow I have run out of time. Could you test it once again, please? (It includes additional patch.)
024-r4 works fine. Thanks. Please remove 024-r3 from the tree. It fails to merge because patches are missing.
Are you sure about pkgconfig in RDEPEND? When using binhost only one system has tools for building and pkgconfig is one of them. I'd prefer to not have pkgconfig installed after running 'emerge --depclean --with-bdeps=n'. Seriously, how often is udevdir changed? Rebuilding dracut one time after upgrading udev is fine.
See comments 4 and 5 in bug 442384. It seems udev will switch back to /lib/udev/rules.d soon. Users who use stable packages will not need to rebuild dracut. So I agree, we can remove pkgconfig from RDEPEND again. %)
udev-197 is in the tree. It moves rules.d back to /lib/udev/rules.d.