I'm unsure when this problem started, but installing cryptsetup
and cryptsetup-initramfs
, adding your partitions to /etc/crypttab
, then updating the initramfs with update-initramfs
does not work right away. You will reboot and wait 1 minute and 30 second as systemd fails to mount the partition.
I pulled my hair trying to fix this until I extracted the initramfs contents and figured out that Debian's distribution of cryptsetup
doesn't read from /etc/crypttab
but rather from cryptoroot/crypttab
.
You could theoretically make this folder and file, but I suggest writing this tiny script to /etc/initramfs-tools/hooks/make-crypttab
, which will entirely solve this problem and for good:
#!/bin/sh
cp /etc/crypttab "${DESTDIR}/cryptroot/crypttab"