My Raspberry Pi (which is 10,000 km away from me right now) works as follows:
- It is running Raspbian (July 2016's version)
- The SD card contains
- An encrypted hard disk drive (using LUKS
- When the Pi boots, I can unlock the HDD remotely using
dropbearover SSH. It asks for the HDD's password and then the boot sequence continues normally.
For more info about how I did all of this, read http://blog.romainpellerin.eu/raspberry-pi-the-ultimate-guide.html.
TL;DR here is a shortened version:
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 here... mkinitramfs -o /boot/initramfs.gz $(uname -r) update-initramfs -u
Up until yesterday, everything was working fine. I could reboot it and unlock the HDD over SSH.
However, yesterday I did
aptitude update && aptitude upgrade. As far as I know, this does not upgrade the kernel. Anyway, I rebooted it. Now, I'm stuck at the unlocking step. Even though I type the right password, it immediately says
Can't change directory to <something/a kernel version> and
Cannot initialize device-mapper. Is dm_mod kernel module loaded? and keeps asking again for the password.
I cannot tell you what kernel it is running as I set up a while ago and do not use it that much.
Sorry for the lack of details, I do not have a physical access to my Raspberry and I turned it off yesterday, thus I am telling from what I remember.
I am pretty sure I could fix it by tweaking
/boot/initramfs.gz but I do not know how. Can you help me please? Thank you very much.