How to Unlock Multiple LUKS Devices Using Dropbear-initramfs

debiandmcryptdropbearinitramfsluks

My system setup is as following:

  1. One single SSD with LUKS and LVM (and of course an unencrypted boot partition). The debian system is installed there.
  2. Two HDDs assembled as RAID0 with LUKS and LVM for some custom data

To unlock to LUKS-devices at boot time from remote, I tried to use dropbear-initramfs.

That works fine, to unlock the first LUKS device (on the SSD, with the debian system installed on):

  1. I log in with ssh to dropbear/busybox
  2. I use cryptroot-unlock, insert the key, and unlock it

But to unlock the second LUKS device (on the RAID0), I still needs some console.

Is there any way to unlock both LUKS devices together (or after another) using dropbear-initramfs / busybox? TIA!

Best Answer

Someone could say: RTFM ... /usr/share/doc/cryptsetup/README.Debian.gz, section 8.

The solution is to put initramfs to options in crypttab, like:

nvme0n1p3_crypt UUID=7988273-32b1-163b-8b44-e479f39f15a1 none luks,discard,initramfs
md_crypt        /dev/md/myraid                           none luks,discard,initramfs

Then cryptroot-unlock ask me to unlock both LUKS devices. :)

Related Topic