[systemd-devel] trying to hook into the luks crypt function in initramfs

Ratliff, John jdratlif at iu.edu
Fri Jul 6 01:25:00 UTC 2018


I'd like to be able to unlock my luks encrypted drive (lvm - including the root partition) with a USB key, but if the USB key is not present, still ask for a passphrase.

I'm not clear on how systemd does the unlock during boot, but it seems that Fedora 28 and CentOS/RHEL 7 both use systemd for this task. Where would I look to change the behavior to do what I'm looking for?

In Debian/Ubuntu, there is a keyscript file that gets put into the initramfs, but I don't think theirs is systemd based. Arch has a similar method with a hook, but I've only used it with the non-systemd initramfs. Fedora has a crypt module, but I have to disable systemd or it won't work. I'm not sure what systemd is doing in the initramfs, so I'm not sure if I want to disable that module or not. I'm hoping there's a better way to interact with systemd.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180706/003c995e/attachment.html>


More information about the systemd-devel mailing list