#!/bin/sh trap 'exec sh' EXIT export PATH="/usr/sbin:/usr/bin:/sbin:/bin" mount -t proc proc /proc mount -t devtmpfs devtmpfs /dev # use -p to avoid "directory exists" error mkdir -p /dev/pts # /dev/pts for dropbear mount -t devpts devpts /dev/pts ( ip link set eth0 up udhcpc -i eth0 # -p 2222 to avoid host key clash dropbear -p 2222 ) >/dev/null 2>&1 & root=$(findfs UUID=ec8fb072-1200-4275-9494-f6f869187806) || exit cryptsetup open --tries 65535 --allow-discards "$root" root # in case of /sbin/unlock [ -e /dev/mapper/root ] || exit e2fsck -C 0 -E inode_count_fullmap -p /dev/mapper/root || exit mount -o nodev /dev/mapper/root /mnt || exit kill -9 -1 ip link set eth0 down cd /mnt || exit umount -n /dev/pts /dev /proc exec switch_root . /usr/lib/systemd/systemd