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
/bootand keyfile on the USB key, I have editted
Now I want to make sure the machine will attempt to boot from the USB pendrive. I understand I have to edit
/etc/fstaband 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
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.