fix: UUID in systemd-boot
This commit is contained in:
parent
4044a8e55e
commit
2fd5c0f094
@ -3,6 +3,10 @@
|
|||||||
# assume that /mnt and /mnt/boot is mounted
|
# assume that /mnt and /mnt/boot is mounted
|
||||||
|
|
||||||
TARGET=/mnt
|
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/
|
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
|
chmod +x $TARGET/root/chroot-commands.sh
|
||||||
chroot $TARGET /bin/bash -l -c '/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."
|
echo "Done! Should be good to reboot now and run post-install scripts."
|
||||||
|
Loading…
Reference in New Issue
Block a user