Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259989 - sys-fs/udev-135-r4: Error in init script causes dmcrypt to hang at boot
Summary: sys-fs/udev-135-r4: Error in init script causes dmcrypt to hang at boot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-23 10:07 UTC by Dirk Heinrichs
Modified: 2013-01-17 18:13 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Heinrichs 2009-02-23 10:07:49 UTC
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.
Comment 1 Dirk Heinrichs 2009-02-23 10:14:38 UTC
The quoted code is from /etc/init.d/udev.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-02-23 11:28:36 UTC
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.
Comment 3 Dirk Heinrichs 2009-02-23 12:05:36 UTC
(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.
Comment 4 Matthias Schwarzott gentoo-dev 2009-02-25 00:03:51 UTC
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 ?
Comment 5 Dirk Heinrichs 2009-02-25 06:53:49 UTC
(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.
Comment 6 Daniel V. 2009-02-25 17:35:26 UTC
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.)
Comment 7 Matthias Schwarzott gentoo-dev 2009-07-16 08:58:41 UTC
any news here?
Comment 8 Dirk Heinrichs 2009-12-16 08:55:14 UTC
At least I don't have any problem anymore.
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2013-01-17 18:13:34 UTC
(In reply to comment #8)
> At least I don't have any problem anymore.

hmm, okay then