diff --git a/install.sh b/install.sh index d840572..9a22601 100755 --- a/install.sh +++ b/install.sh @@ -3,6 +3,10 @@ # assume that /mnt and /mnt/boot is mounted TARGET=/mnt +DEVICE=$(findmnt -n -o SOURCE $TARGET | sed 's/\[.*//') +UUID=$(blkid -s UUID -o value ${DEVICE}) +echo $UUID +echo $DEVICE debootstrap stable $TARGET http://deb.debian.org/debian/ @@ -21,4 +25,9 @@ cp ./chroot-commands.sh $TARGET/root/ chmod +x $TARGET/root/chroot-commands.sh chroot $TARGET /bin/bash -l -c '/root/chroot-commands.sh' +# fix systemd-boot +for ENTRY in $TARGET/boot/loader/entries/*.conf; do + sed -i "s/root=UUID=[a-zA-Z0-9-]*/root=UUID=${UUID}/" "${ENTRY}" +done + echo "Done! Should be good to reboot now and run post-install scripts."