Score:0

How to unlock multiple luks-devices using dropbear-initramfs

tr flag

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!

Score:0
tr flag

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. :)

jia103 avatar
cn flag
This worked well for me. I would add that the initrd needs to be updated following editing initramfs: `update-initramfs -c -k $(uname -r)`. I previously did this already and then updated `/etc/initramfs`, so I never re-ran `update-initramfs` and noticed this change did not work until I re-ran `update-initramfs`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.