Bug 72957 - systemd hangs activating encrypted swap partition
Summary: systemd hangs activating encrypted swap partition
Status: RESOLVED WORKSFORME
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-21 20:42 UTC by Alexey Vladykin
Modified: 2014-06-25 10:52 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Alexey Vladykin 2013-12-21 20:42:12 UTC
I have encrypted swap partition configured in /etc/crypttab:
> swap   /dev/sda2  /dev/urandom   swap,cipher=aes,hash=sha256,size=256

Based on this systemd generates two units:
- systemd-cryptsetup@swap.service (calls cryptsetup and mkswap)
- dev-mapper-swap.device (requires systemd-cryptsetup@swap.service).

Starting systemd-cryptsetup@swap.service succeeds, but
> systemctl start dev-mapper-swap.device
hangs indefinitely.
In the journal I see that systemd-cryptsetup@swap.service successfully executes all commands and is marked started. But dev-mapper-swap.device does not start and there is no clue what blocks it.

Another non-swap encrypted partition starts without any hangs or delays.

This happens on Gentoo Linux with systemd-208-r2.
Comment 1 Alexey Vladykin 2013-12-25 20:15:49 UTC
The problem has been tracked down to an incorrect kernel configuration:
CONFIG_UEVENT_HELPER_PATH pointed to non-existent /sbin/hotplug.
Changing this parameter value to an empty string and recompiling the kernel has fixed the hang, encrypted swap is mounted successfully.

More details at https://bugs.gentoo.org/show_bug.cgi?id=493874

I think this bug may be closed.
Comment 2 Lennart Poettering 2014-06-25 10:52:22 UTC
OK, closing then.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.