[Pkg-systemd-maintainers] Bug#731208: Bug#731208: systemd: fails to boot with encrypted swap

Michael Stapelberg stapelberg at debian.org
Sun Dec 8 15:20:10 GMT 2013


Hi Russel, Gerald, Michael, Sam,

I spent some time today looking into these “systemd fails to boot with
encrypted swap” problems, and, just as Michael Biebl suggested, this
indeed seems to be a problem with the dmsetup package. When applying
this patch, my VM boots just fine with encrypted swap:

--- /lib/udev/rules.d/55-dm.rules 2013-08-07 09:45:01.000000000 -0400
+++ /root/55-dm.rules             2013-12-08 10:12:48.104015288 -0500
@@ -98,6 +98,8 @@
 # and 'DM subsystem' related rules enabled in this case.
 ENV{DM_SUSPENDED}=="1", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1"
 
+OPTIONS+="watch"
+
 GOTO="dm_end"
 
 LABEL="dm_disable"

Can any of you please confirm that this works for you? I will then ask
the dmsetup maintainer(s) to fix this on their end.

The root cause seems to be that systemd calls mkswap and then waits for
an event to continue with the swapon command, but never gets the
event. Fedora/RHEL has fixed this by adding a rules file to enable the
watch option, but unfortunately the Debian dmsetup package does not use
the upstream rules files at all :-|.

See also those reports for Fedora/RHEL:
https://bugzilla.redhat.com/show_bug.cgi?id=759402
https://bugzilla.redhat.com/show_bug.cgi?id=711394

-- 
Best regards,
Michael




More information about the Pkg-systemd-maintainers mailing list