I have been trying to get Raspbian Jessie, installed from the image to boot with an encrypted root partition.
I was successful in following the guide here.
When I boot the Pi, it drops to an initramfs prompt, then I unlock the partition with
# cryptsetup luksOpen /dev/mmcblk0p2 sdcard
# exit
and it boots into Debian. Great!
However, there are some issues. When I try to update the initramfs file with:
# sudo mkinitramfs -o /boot/initramfs.gz
in Debian, the Pi doesn't successfully reboot to the initramfs prompt. It just hangs with a blinking cursor after showing the pixel logo. When I restore to my backed-up boot image, I get the initramfs prompt again and can boot from the encrypted root.
The second issue is that I did not properly configure dropbear; it appears to be configured to use DHCP. This means that when I log in it gets a random IP address. I need to update the configuration to a fixed IP address so that I can log into the Pi headless after a reboot, but without the ability to update the initramfs I don't know how to fix this.
Given that I can't even get an initramfs prompt after the update, I'm really not sure how to even start solving this problem, so any hints would be great. I'll provide whatever information that will be helpful to solving this issue.
systemd
, the defaultinit
system going forward from the current "Jessie" version of Debian and thus Raspbian which is derived from it once had problems with encrypted file-systems. I'm guessing that at least some part of the issues were resolved but in your particular case you might wish to consider switching back to the sysVinit
which is what that 2013 article would be expecting (it mentions the "Wheezy" version of Raspbian which is the previous version which would have had a default init of the sysV one)... – SlySven Jan 06 '17 at 19:07systemd
; I run several different standard Debian 8 systems with encrypted root partitions without problems. My suspicion is that the code to prompt for the encryption passphrase either isn't there or isn't compatible with whatever's putting up the splash screen logo. (I get a text mode prompt for the passphrase during the system boot.) When I get a chance, I'll compare the startup scripts on my Pi and on one of my Debian laptops. – cjs Apr 05 '17 at 16:07