Debian – Dropbear terminates before LUKS password prompt on Debian Jessie

debiandropbearencryptionluks

I'm trying to use dropbear as a ssh server to unlock an encrypted partition which was created during Debian 8.2 setup. It boots to the password prompt (and unlocks if correct password is typed) but before the prompt appears, dropbear exits with Early exit: Terminated by signal. The system is pingable – I've added DROPBEAR=y, added correct DEVICE/IP settings in the initramfs conf file, did a NO_START=0 in /etc/default/dropbear file and did update-initramfs.

If I'm adding a sleep 60 in the /usr/share/initramfs-tools/scripts/init-premount/dropbear script I am able to connect to the dropbear ssh. But after the sleep it executes /usr/share/initramfs-tools/scripts/init-bottom/dropbear wich kills dropbear right before the password prompt appears.

Why is the init-bottom script called and how to avoid that?

Best Answer

After days of trying and testing, the solution (or the problem) is very simple: be sure to have your / mount point inside your encrypted volumes - if not, the init-bottom script is called right after the init-premount scripts (because the / doesn't need to be decrypted).

Related Question