What I want to achieve:
- Being asked for a password, only once during boot time;
- The other (non-root) partitions to use the keyfile inside the
/root/directory.
What I have achieved so far:
- (A) The system booting, but asking for password twice (once for
/, and once for/usr). - Or: (B) the system not booting, asking for password once, but then refusing the mount
/usrsaying it cannot found the LVM group/volume. I get dropped to shell, and can see that/root/.keyfileis unavailable./has not been mounted yet.
Configuration
File: /etc/crypttab
Case A
sdc3_crypt /dev/sdc3 none luks
md0_crypt /dev/md0 none luks
Case B
sdc3_crypt /dev/sdc3 none luks
md0_crypt /dev/md0 /root/.keyfile luks
What totally didn't work
- Creating script files to manually luksOpen the required drive: those in
/etc/initramfs-tools/scripts/local-premountare called before/is available, but those in/etc/initramfs-tools/scripts/local-bottomare called after it wants to open/usr(and therefore it is too late).