Created attachment 654820 [details] emerge --info When building an initramfs with genkernel 4.1.0 lvm/udev fails with: * Starting the Logical Volume Manager ... WARNING: Device /dev/sda not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/dm-0 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/sda1 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/sda2 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/sda3 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/dm-0 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/sda1 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/sda2 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/sda3 not initialized in udev database even after waiting 10000000 microseconds. WARNING: Device /dev/dm-0 not initialized in udev database even after waiting 10000000 microseconds. Reading volume groups from cache. Found volume group "vg0" using metadata type lvm2 3 logical volume(s) in volume group "vg0" now active The system continues the boot, but is unresponsive once the login screen (slim) appears. Downgrading to 4.0.10 solves it. This system is *not* UEFI, I have another one with identical setup where it works like a charm, so might be related to an old-school BIOS setup.
Please tell us details about your setup: # lsblk # emerge --info sys-fs/lvm2 | tail -n 7 # lvmconfig | grep udev # rc-config list | grep udev # rc-config list | grep lvm
And of course show us # emerge --info <pkg> | tail -n 7 for used device manager (udev, eudev, something else).
root@localhost ~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 232,9G 0 disk ├─sda1 8:1 0 2M 0 part ├─sda2 8:2 0 256M 0 part └─sda3 8:3 0 232,6G 0 part └─root 254:0 0 232,6G 0 crypt ├─vg0-root 254:1 0 30G 0 lvm / ├─vg0-var 254:2 0 40G 0 lvm /var └─vg0-home 254:3 0 162,6G 0 lvm /home root@localhost ~ # emerge --info sys-fs/lvm2 | tail -n7 ================================================================= Package Settings ================================================================= sys-fs/lvm2-2.02.187-r2::gentoo was built with the following: USE="readline thin udev -device-mapper-only -lvm2create_initrd -sanlock (-selinux) -static -static-libs -systemd" ABI_X86="(64)" root@localhost ~ # lvmconfig | grep udev File descriptor 3 (/var/log/slim.log) leaked on lvmconfig invocation. Parent PID 24700: -su udev_sync=1 udev_rules=1 verify_udev_operations=0 root@localhost ~ # rc-config list | grep udev udev sysinit udev-settle udev-trigger sysinit root@localhost ~ # rc-config list | grep lvm lvm default lvmetad lvm-monitoring lvmpolld root@localhost ~ # emerge --info sys-fs/eudev | tail -n7 Package Settings ================================================================= sys-fs/eudev-3.2.9::gentoo was built with the following: USE="hwdb introspection kmod -rule-generator (-selinux) -static-libs -test" ABI_X86="32 (64) (-x32)" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" Please let me know if you need more info. FYI I've been running this setup for years, and used this as my guide: https://wiki.gentoo.org/wiki/Full_Disk_Encryption_From_Scratch_Simplified
At the moment I am out of ideas. LVM services should be added to boot runlevel but that's not critical. The setup itself looks straightforward -- I have dozen of similar setups without any problems (like yourself have, too). Maybe start with replacing lvm.conf -- looks like you are missing options like obtain_device_list_from_udev. Check if you can find any difference to your working system.
Created attachment 655056 [details] lvm.conf
lvm.conf is identical no both systems, and both have obtain_device_list_from_udev enabled. I'll see if I can find other meaningful differences. I've moved lvm to boot.
This happens on one of the systems I updated today to v4.1.0 (now the only one). The system is a stable hardened no-multilib and the behaviour observed is almost the same, the only exception is that there is no sddm prompt on tty7. The lvm.conf is same. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 256M 0 part └─sda2 8:2 0 465.5G 0 part └─root 254:0 0 465.5G 0 crypt ├─gentoo-root 254:1 0 60G 0 lvm / ├─gentoo-swap 254:2 0 2G 0 lvm [SWAP] └─gentoo-home 254:3 0 403.5G 0 lvm /home sr0 11:0 1 1024M 0 rom sys-fs/lvm2-2.02.187-r2::gentoo was built with the following: USE="readline (selinux) thin udev -device-mapper-only -lvm2create_initrd -sanlock -static -static-libs (-systemd)" sys-fs/eudev-3.2.9::gentoo was built with the following: USE="hwdb kmod (selinux) -introspection -rule-generator -static-libs -test" FEATURES="sfperms config-protect-if-modified unmerge-orphans sesandbox distlocks unmerge-logs parallel-fetch binpkg-docompress unknown-features-warn merge-sync preserve-libs news userpriv xattr binpkg-dostrip qa-unresolved-soname-deps usersync multilib-strict binpkg-logs usersandbox assume-digests ipc-sandbox network-sandbox strict ebuild-locks sandbox selinux protect-owned userfetch fixlafiles" udev_sync=1 udev_rules=1 verify_udev_operations=0 obtain_device_list_from_udev=1 udev sysinit udev-settle udev-trigger sysinit lvm boot lvm-monitoring lvmetad lvmpolld
Perhaps it's worth mentioning this little error which appears just prior to the initialization warnings above: * Mounting local filesystems ... [ok] * Error: fopen(/run/openrc/rc.log) failed: No such file or directory INIT: Entering runlevel: 3
You should definitely check what's causing that. A non-working /run will cause multiple problems: And we switched from MDEV to UDEV in genkernel especially because of a problem on systemd which will ignore all DM devices if device was created without a special attribute (see bug 706434). This attribute will be set when udevd triggers device creation. However, this attribute is stored in udev database which is stored in /run/udev so we have to preserve /run to hand over to real system so that when udevd from real system will start can load udev database created by udevd in initramfs containing the attribute. If your /run doesn't work for some reason (can't be access/was cleaned) you will now face the problem from systemd world (shown timeout).
FYI Switching on rc-logging I also get that error opening /run/openrc/rc.log.
The only thing I can find cleaning /run is bootmisc, but that is on both my systems at identical run-levels (boot)
OK, I solved my issue. Two things. My /run had wrong permissions. I aligned it with a working system, so removed write for group and others, and sticky bit for others. I also had /run on tmpfs, which I removed as well. Thank you for the assistance. Br. Søren
Had the same problem, also due to /run being on tmpfs. Perhaps this needs updating? https://wiki.gentoo.org/wiki/Tmpfs
Mind sharing the wrong setting? Did you set mode=1777 from the /tmp example also for /run?
(In reply to Thomas Deutschmann from comment #14) > Mind sharing the wrong setting? Did you set mode=1777 from the /tmp example > also for /run? I did not have mode=1777 for /run in my fstab. I removed: tmpfs /run tmpfs defaults 0 0 from my fstab.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67bb8e2907a1c503e5bc841c70e253c217812347 commit 67bb8e2907a1c503e5bc841c70e253c217812347 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-08-24 12:33:26 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-08-24 12:36:40 +0000 sys-kernel/genkernel: try to detect and warn for problematic /run permissions Closes: https://bugs.gentoo.org/737270 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> sys-kernel/genkernel/genkernel-4.1.0-r2.ebuild | 18 +++++++++++++++++- sys-kernel/genkernel/genkernel-9999.ebuild | 18 +++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcbcf021f60f4b37927e6f6b433bc7ac57e0a72f commit fcbcf021f60f4b37927e6f6b433bc7ac57e0a72f Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2020-08-24 12:34:26 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2020-08-24 12:36:41 +0000 sys-fs/lvm2: try to detect and warn for problematic /run permissions Bug: https://bugs.gentoo.org/737270 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> sys-fs/lvm2/lvm2-2.02.187-r2.ebuild | 16 ++++++++++++++++ sys-fs/lvm2/lvm2-2.03.10.ebuild | 16 ++++++++++++++++ 2 files changed, 32 insertions(+)