How to enable LUKS disk decryption on a GNU Guix System with a key file stored on a USB drive
0
votes
0
answers
154
views
I followed the advice from https://unix.stackexchange.com/questions/786259/guix-how-to-set-one-file-system-as-a-dependency-of-another-or-mount-one-devi , but it's halfway working for me.
In my case, I still have to type the password before the GRUB menu.
The second time during Linux boot, decryption happens automatically, so part of it succeeds..
When I ran
guix system build
, I saw a warning like 'possibly unbound variable mount-file-system
'.
My configuration right now
(apply raw-initrd
(append (list file-systems) all-key-arguments
(list
#:pre-mount #~(begin
(use-modules ((gnu build
file-systems)
#:select (mount-file-system)))
(mount-file-system (file-system
(mount-point
"/early-mnt")
(device (file-system-label
"USBDRIVE"))
(type "ext4"))
;; This is needed otherwise the mount point
;; will be prefixed by '/root'
#:root ""))
#:helper-packages (append helper-packages
(file-system-packages
file-systems
#:volatile-root?
volatile-root?)
(if keyboard-layout
(list
loadkeys-static)
'())))))))
Asked by agshe
(1 rep)
Feb 7, 2025, 08:04 PM
Last activity: Feb 20, 2025, 04:01 PM
Last activity: Feb 20, 2025, 04:01 PM