You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support to allow unlocking a luks volume by keyfile
...reworked the luks mappings a little to allow more complex patterns of parsing parameters and building mappings.
This slightly tweaks creating luksMapping lists so they can occur multiple times in the kernel parameter list and it just updates the relevant properties for each mapping (to allow extending even further if desired).
updated luksMapping type to hold a keyfile
add a luksMapping findOrCreate function in luks.go, either finds the existing mapping by UUID or adds one
update the rd.luks.uuid and rd.luks.name in cmdline.go to make use of findOrCreate
adds rd.luks.key with the format UUID=keyfile which should point to a file in initramfs containing the password
adds recoverKeyfilePassword go routine which attempts to read the password from the keyfile and unlock the device, falling back to running the requestKeyboardPassword option if that fails
update luksOpen to call recoverKeyfilePassword if a keyfile is defined on the mapping
Putting this forward more as an idea for the approach, not sure how good or bad the specific way I implemented it is.
Implements #37
Copy file name to clipboardExpand all lines: docs/manpage.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,7 @@ Some parts of booster boot functionality can be modified with kernel boot parame
114
114
*`rootflags=$OPTIONS` mount options for the root filesystem, e.g. rootflags=user_xattr,nobarrier. In partition autodiscovery mode GPT attribute 60 ("read-only") is taken into account.
115
115
*`rd.luks.uuid=$UUID` UUID of the LUKS partition where the root partition is enclosed. booster will try to unlock this LUKS device.
116
116
*`rd.luks.name=$UUID=$NAME` similar to rd.luks.uuid parameter but also specifies the name used for the LUKS device opening.
117
+
*`rd.luks.key=$UUID=$PATH` absolute path to a keyfile in the initrd/initramfs which can be unsed to unlock the device identified by UUID, if this file does not exist or fails to unlock it will fall back to a password request.
117
118
*`rd.luks.options=opt1,opt2` a comma-separated list of LUKS flags. Supported options are `discard`, `same-cpu-crypt`, `submit-from-crypt-cpus`, `no-read-workqueue`, `no-write-workqueue`.
118
119
Note that booster also supports LUKS v2 persistent flags stored with the partition metadata. Any command-line options are added on top of the persistent flags.
119
120
*`resume=$deviceref` device reference to suspend-to-disk device.
0 commit comments