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
/usr
saying it cannot found the LVM group/volume. I get dropped to shell, and can see that/root/.keyfile
is 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-premount
are called before/
is available, but those in/etc/initramfs-tools/scripts/local-bottom
are called after it wants to open/usr
(and therefore it is too late).
fstab
matters. Are you sure that you have/
mounted before/usr
infstab
?/
is at the top, before anything else. I would have to wait until I get home, in order to confirm.