My machine is LUKS-encrypted and boot works a charm (asking the passphrase at launch). I want to use a keyfile on a USB pendrive, thus the user has a dongle that the user must plug to launch Linux fully. I'm mainly inspired by this answer to do so: LUKS encryption, header on a dongle USBdrive?
Well, I copied /boot
and keyfile on the USB key, I have editted /etc/crypptab
.
Now I want to make sure the machine will attempt to boot from the USB pendrive. I understand I have to edit /etc/fstab
and I read the man and doc, but I'm totally lost.
The machine has /boot and / (FS). The USB has only /boot (+ keyfile inside, linked in /etc/crypttab
).
My question is: is it possible to tell my machine "try to boot from the pendrive [this is possible I know, but next:], if impossible: fallback to the HDD (and ask for the passphrase) ? how ?
NB: I'm affraid of doing wrong with fstab and my machine then does not boot anymore.