小编Rom*_*rin的帖子

initramfs、LUKS 和 dm_mod 升级后无法启动

我的Raspberry Pi(现在距离我10,000公里)的工作原理如下:

  • 它运行的是 Raspbian(2016 年 7 月的版本)
  • SD 卡包含/boot
  • 加密的硬盘驱动器(使用 LUKS cryptsetup)包含/
  • 当 Pi 启动时,我可以通过 SSH 远程解锁 HDD dropbear。它要求输入 HDD 的密码,然后启动顺序将正常继续。

有关我如何完成这一切的更多信息,请阅读http://blog.romainpellerin.eu/raspberry-pi-the-ultimate-guide.html
TL;DR这是一个简化版本:

apt-get install busybox cryptsetup rsync
echo "initramfs initramfs.gz 0x00f00000" >> /boot/config.txt
sed -e "s|root=/dev/mmcblk0p2|root=/dev/mapper/hddcrypt cryptdevice=/dev/sda1:hddcrypt|" -i /boot/cmdline.txt
sed -e "s|/dev/mmcblk0p2|/dev/mapper/hddcrypt|" -i /etc/fstab
echo -e "hddcrypt\t/dev/sda1\tnone\tluks" >> /etc/crypttab
cryptsetup --verify-passphrase -c aes-xts-plain64 -s 512 -h sha256 luksFormat /dev/sda1
mkinitramfs -o /boot/initramfs.gz $(uname -r)
aptitude install dropbear
// Configuring the SSH access …
Run Code Online (Sandbox Code Playgroud)

kernel debian initramfs luks dropbear

4
推荐指数
1
解决办法
3334
查看次数

标签 统计

debian ×1

dropbear ×1

initramfs ×1

kernel ×1

luks ×1