From 08449db44cc97e394f57a150bddb2a4fcbafbe4e Mon Sep 17 00:00:00 2001 From: lub Date: Sat, 21 Dec 2019 09:23:40 +0100 Subject: [PATCH] streamline dropbear setup --- config/etc/dropbear-initramfs/config | 1 + post-debootstrap-installer.sh | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 config/etc/dropbear-initramfs/config diff --git a/config/etc/dropbear-initramfs/config b/config/etc/dropbear-initramfs/config new file mode 100644 index 0000000..318b34d --- /dev/null +++ b/config/etc/dropbear-initramfs/config @@ -0,0 +1 @@ +DROPBEAR_OPTIONS="-p 222" \ No newline at end of file diff --git a/post-debootstrap-installer.sh b/post-debootstrap-installer.sh index 37db0ca..bc3cbfe 100755 --- a/post-debootstrap-installer.sh +++ b/post-debootstrap-installer.sh @@ -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