Running Debian 11 with grub, full disk encryption (no LVM) on /dev/sdb2, unencrypted /boot/efi on /dev/sdb1.
At boot, I want two options:
- typing password
- plugging an encrypted USB key (which stores a LUKS key-file in order to unlock /dev/sdb2).
(same use case as Luks encrypted USB startup key - except I want no password typing at all when I insert USB key).
My USB key is encrypted, so I need to automatically unlock it at boot. For this purpose, I have created a LUKS key-file which is stored in /boot/efi.
Here is my resulting /etc/crypttab:
USB-KEY /dev/disk/by-label/USB-KEY_LUKSCONTAINER /boot/efi/USB-KEY.key luks,keyscript=/bin/cat
cryptroot UUID=xxxx-xxxx--xxxx-xxx /dev/disk/by-label/USB-KEY:/secret.key:20 luks,discard,keyscript=/lib/cryptsetup/scripts/passdev
I've updated /etc/fstab for USB-KEY to be automatically mounted :
/dev/mapper/USB-KEY
UUID=yyyy-yyyy-yyyy-yyyy /mnt/USB-KEY ext4 nosuid,rw 0 0
At boot, although USB key is inserted, I am stuck on cryptsetup prompt - and if I type my LUKS password I obtain this message: "cryptsetup failed, bad password or options?". Where am I wrong?
which is stored in /etc/keys/
is that file in the USB drive or ... where?