我正在尝试在使用 lvm crypto luks 加密的 debian 系统上进行 dropbear 远程 ssh 启动。
我可以让它在我的树莓派上运行,但不能在我的常规系统上运行
步骤: 1 使用加密的 LVM 安装 debian
ls -l /lib/modules/ |awk -F" " '{print $9}'
mkinitramfs -o /boot/initramfs.gz
echo initramfs initramfs.gz >> /boot/config.txt
然后在前面创建一个带有以下行的 rsa ssh 密钥并将其保存到/etc/dropbear-initramfs/authorized_keys
:
command="/scripts/local-top/cryptroot && kill -9 `ps | grep -m 1 'cryptroot' | cut -d ' ' -f 3`" ssh...
然后:
mkinitramfs -o /boot/initramfs.gz
reboot
我可以输入密码并用键盘解密,但是当我使用 ssh 登录时,我得到:
/scripts/local-top/cryptroot: line 218: modprobe: not found
/scripts/local-top/cryptroot: line 378: blkid: not found
/scripts/local-top/cryptroot: line 378: blkid: not found
/scripts/local-top/cryptroot: line 378: blkid: not found
/scripts/local-top/cryptroot: line 378: blkid: not found
/scripts/local-top/cryptroot: line 378: blkid: not found
...
请帮忙?
额外信息:
我的 blkid
/dev/sda1: UUID="42a9ca50-b757-4e11-985f-8fc75323b598" TYPE="ext2" PARTUUID="38de37f0-01"
/dev/sda5: UUID="3448b157-a1f9-4f6a-a1ea-37e6362cdea8" TYPE="crypto_LUKS" PARTUUID="38de37f0-05"
/dev/mapper/sda5_crypt: UUID="nzAaP7-Ocx9-BJzO-BM7S-SQcY-BHqp-tbgvH6" TYPE="LVM2_member"
/dev/mapper/deb--vg-root: UUID="f8ec5b07-75fe-4870-9fb6-9e9035d21a20" TYPE="ext4"
/dev/mapper/deb--vg-swap_1: UUID="ff915ae6-210f-4bbb-8988-b30aacae3dea" TYPE="swap"
我的 /etc/fstab
/dev/sda1: UUID="42a9ca50-b757-4e11-985f-8fc75323b598" TYPE="ext2" PARTUUID="38de37f0-01"
/dev/sda5: UUID="3448b157-v4a5-4f6a-a1ea-28e6362cdea9" TYPE="crypto_LUKS" PARTUUID="38de37f0-05"
/dev/sdb1: UUID="CC55-BAFE" TYPE="vfat" PARTUUID="0000370e-01" /dev/mapper/sda5_crypt: UUID="nzAaP7-Ocx9-BJzO-BM7S-SQcY-BHqp-tbgvH6" TYPE="LVM2_member"
/dev/mapper/theproject1--vg-root: UUID="f8ec5b07-75fe-4870-9fb6-9e9035d21a20" TYPE="ext4"
/dev/mapper/theproject1--vg-swap_1: UUID="ff915ae6-210f-4bbb-8988-b30aacae3dea" TYPE="swap"
我的 /etc/crypttab
sda5_crypt UUID=3448b157-v4a5-4f6a-a1ea-28e6362cdea9 none luks,discard