I have an ARM server that I want to have booted with (not booting FROM) a USB flash drive containing a LUKS keyfile, that's needed to decrypt a hard drive I have connected to the drive. So in order to run /etc/crypttab (to decrypt the drive) I need the USB mounted first in order to mount the drive (fstab runs after crypttab). How could I mount a partition before crypttab starts? On systemd and Linux 4.4.
- First, I'd like the USB drive partition (let's say /dev/sdb1) to be mounted at /mnt/usb (not encrypted)
- Then, using crypttab to unlock the encrypted partition on one of the drives using a keyfile at /mnt/usb/mykeyfile
- Then, mounting filesystem to /mnt/crypt_fs