When I don't have rc_coldplug="YES" in /etc/rc.conf, the system fails to setup dmcrypt mappings for encrypted LVM logical volumes at boot. It just hangs at the first one. This seems to be because of ebegin "Populating /dev with existing devices through uevents" if yesno "${rc_coldplug}"; then udevadm trigger else # Do not run any init-scripts, Bug #206518 udevadm control --env do_not_run_plug_service=1 # only create device nodes udevadm trigger --attr-match=dev # run persistent-net stuff, bug 191466 udevadm trigger --subsystem-match=net fi eend $? which only runs "udevadm trigger" when rc_coldplug="YES" is in rc.conf. Reproducible: Always Steps to Reproduce: 1. Remove rc_coldplug="YES" from /etc/rc.conf 2. Reboot Actual Results: Boot process hangs when trying to create first dmcrypt mapping. Expected Results: Mappings should be created.
The quoted code is from /etc/init.d/udev.
My guess is that the necessary kernel modules aren't loaded when rc_coldplug is set to "NO". If I'm right (I don't have any dmcrypt stuff set up), this is no error in udev but in the corresponding start scripts of the sys-fs/cryptsetup package.
(In reply to comment #2) > My guess is that the necessary kernel modules aren't loaded when rc_coldplug is > set to "NO". If I'm right (I don't have any dmcrypt stuff set up), this is no > error in udev but in the corresponding start scripts of the sys-fs/cryptsetup > package. > Nope. Everything needed is built into the kernel.
At what point of booting does it hang? At the point where udev waits for uevent processing to finish? Does dmcrypt adds any stuff being run from udev? Have you had a look at Bug 220136 and Bug 242778 ?
(In reply to comment #4) > At what point of booting does it hang? When creating the very first dmcrypt mapping. > At the point where udev waits for uevent processing to finish? That would be "udevadm settle", right? No, it's already beyond that. It hangs when the "else" branch of the above code is run, that is when rc_coldplug is not present or set to "NO". I guess in that case the devices for the logical volumes are not created? > Have you had a look at Bug 220136 and Bug 242778 ? As for the first one: It's not swap in my case. Regarding the second: Although I also use an in-kernel initramfs, I don't use BBs mdev. I also use udevadm and udevd, where the latter is killed again before "switch_root". That mechanism works fine in my initramfs, it detects all logical volumes and I can create the mapping for my encrypted root volume.
It might not help you but I think this is LVM specific. I only use cryptsetup (no LVM) and I don't even have rc_coldplug in /etc/rc.conf, and everything is created fine (by default, as I've just had to reinstall my whole system a few days ago). (I can only find rc_coldplug (on first check) in /etc/conf.d/udev, where it is commented out.)
any news here?
At least I don't have any problem anymore.
(In reply to comment #8) > At least I don't have any problem anymore. hmm, okay then