]> git.ipfire.org Git - thirdparty/dracut.git/commit
Add basic LUKS detached header support 290/head
authorprivb0x23 <privb0x23@users.noreply.github.com>
Tue, 3 Oct 2017 22:37:55 +0000 (23:37 +0100)
committerprivb0x23 <privb0x23@users.noreply.github.com>
Tue, 3 Oct 2017 22:37:55 +0000 (23:37 +0100)
commitb7058d0ce5e99cbc80b5f760a0b654d3ff03c094
treedfd54bd4de98a9d86880852a06de005b534df690
parent424c065cd99cc9c35a92a68d34c161beff5f5497
Add basic LUKS detached header support

A LUKS root volume with a detached header on a device without partitioning will not have a UUID and will not have an attribute ENV{ID_FS_TYPE}=="crypto_LUKS".
Therefore, several areas need to be addressed: identification of the LUKS device, inclusion of entries within crypttab, and provision of the detached header file.
- Added support for an option (4th column: "force") in /etc/crypttab to force the inclusion of the entry in the initramfs version (avoiding the fs type test).
- Added support for an option (4th column: "header=/path/to/file") in /etc/crypttab to provide a path to a detached header file embedded within the initramfs.
- Added ID and PARTUUID support to the device (2nd column) in /etc/crypttab (complementing the existing UUID functionality).
- Added cmdline support to indicate LUKS device ("rd.luks.serial=") that refers to the attribute ENV{ID_SERIAL_SHORT}.
Tested successfully on Void Linux (x86_64 musl) (no systemd) with a LUKS root volume accessed with a keyfile and using a detached header.
Not tested on systemd, or on a LUKS root volume with a passphrase rather than a keyfile.
modules.d/90crypt/cryptroot-ask.sh
modules.d/90crypt/module-setup.sh
modules.d/90crypt/parse-crypt.sh