#!/bin/bash set -e echo "first boot: starting" echo "first boot: generating ssh host keys" systemctl stop sshd rm -f /etc/ssh/ssh_host_* ssh-keygen -q -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key ssh-keygen -q -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key ssh-keygen -q -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key ssh-keygen -q -t ed25519 -N "" -f /etc/ssh/ssh_host_ed25519_key systemctl start sshd echo "first boot: generating dbus machine-id" rm -f /var/lib/dbus/machine-id dbus-uuidgen --ensure echo "first boot: expanding root file system" fdisk /dev/mmcblk0 <