[systemd-devel] Preserve all active encrypted device when shutting down into initramfs
Ivan Kabaivanov
chepati at yahoo.com
Fri Jul 22 17:24:11 UTC 2016
Hi,
I'm running LFS (Linux From Scratch) with systemd-230, compiled from source. I have three LUKS-encrypted devices:
/dev/mapper/swap/dev/mapper/root/dev/mapper/home
I want to drop into initramfs and do some maintenance work, for which I require all three of these encrypted devices to remain active.
I create /run/initramfs with a populated and working initramfs. I create /run/initramfs/shutdown with permissions 0755 and the following content:
#/bin/shexec busybox sh
When I issue the shutdown command I get dropped into the initramfs and I get the busybox shell. Howerver, only /dev/mapper/root (my / ) remains active. /dev/mapper/swap and /dev/mapper/home point to non-existent /dev/dm-* block devices.
Manually trying cryptsetup open /dev/sdaN label just hangs without activating the device.
I'm guessing systemd goes on a killing spree and kills all the crypt processes, except the ones associated with / (/oldroot in the initramfs).
Is there a way to tell systemd to keep the encrypted devices active, even if it unmounts their filesystems?
Thanks,IvanK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160722/5fdf036e/attachment.html>
More information about the systemd-devel
mailing list