The officially official Devuan Forum!

You are not logged in.

#1 2023-11-17 06:10:54

Danielsan
Member
Registered: 2020-07-14
Posts: 172  

Dropbear-initramfs: criptroot-unlock: another workaround

Dear Devuanized

based on a friend of mine, that happens to be also an OpenBSD dev, I got a tip to make the script criptroot-unlock working!

As others already spotted out, the issue is in this block:

Original block

if [ ! -f "$TABFILE" ] || [ "$TABFILE" -ot "/proc/1" ]; then
	# Too early, init-top/cryptroot hasn't finished yet
	echo "Try again later" >&2
	exit 1
fi

My friend took a look briefly and suggested me to remove this section: || [ "$TABFILE" -ot "/proc/1" ]
And it actually worked! With the options -p 222 -c cryptroot-unlock in /etc/dropbear/initramfs/dropbear.conf, when you connect through SSH it will ask directly the passphrase:

Modified block

if [ ! -f "$TABFILE" ] ; then
	# Too early, init-top/cryptroot hasn't finished yet
	echo "Try again later" >&2
	exit 1
fi

The script is located in:
/usr/share/cryptsetup/initramfs/bin/cryptroot-unlock

👍

Offline

#2 2024-01-07 10:20:59

tux2bsd
Member
Registered: 2023-12-15
Posts: 18  

Re: Dropbear-initramfs: criptroot-unlock: another workaround

https://dev1galaxy.org/viewtopic.php?pid=46093#p46093

Last edited by tux2bsd (2024-01-08 04:36:11)

Offline

Board footer