streamline dropbear setup

master
lub 5 years ago
parent 6034e67c5c
commit 08449db44c

@ -0,0 +1 @@
DROPBEAR_OPTIONS="-p 222"

@ -22,7 +22,7 @@ apt-get -y install locales
### boot
apt-get -y install mdadm cryptsetup systemd systemd-sysv dropbear btrfs-tools firmware-linux
apt-get -y install mdadm cryptsetup systemd systemd-sysv dropbear-initramfs btrfs-tools firmware-linux
# generate minimal mdadm.conf
mdadm --examine --scan | perl -pe 's/.*\/dev\/md\/?([0-9]+) .*UUID\=(.+?) .*/ARRAY \/dev\/md$1 UUID=$2/' > /etc/mdadm/mdadm.conf
@ -30,9 +30,6 @@ mdadm --examine --scan | perl -pe 's/.*\/dev\/md\/?([0-9]+) .*UUID\=(.+?) .*/ARR
# concat user keys for cryptsetup unlocking at boot
cat /hardware-setup/authorized_keys/* > /etc/dropbear-initramfs/authorized_keys
# set dropbear port to something other than 22, because of openssh
sed -i 's/DROPBEAR_PORT=.*/DROPBEAR_PORT=222/' /etc/default/dropbear
# after cryptsetup, mdadm, ... because of update-initramfs
apt-get -y install linux-image-amd64

Loading…
Cancel
Save