大网数据广告活动
服务器运维问答

How to unlock multiple luks-devices using dropbear-initramfs

· 52CE 我爱测

My system setup is as following: One single SSD with LUKS and LVM (and of course an unencrypted boot partition). The debian system is installed there. Two HDDs assembled as RAID0 with LUKS and LVM for some custom data To unlock t…

问题原文

原帖链接 · t777 · CC BY-SA 4.0

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!

已采纳解答

原帖链接 · t777 · CC BY-SA 4.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-05-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。