From 2596c370a37754fcdb4d2a41a3f49dfcead24171 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Mon, 19 Oct 2020 18:12:45 +0200 Subject: [PATCH] Use UUID instead of device path for boot partition --- debian/chroot.install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/chroot.install b/debian/chroot.install index 3e39a70..44a0ee5 100755 --- a/debian/chroot.install +++ b/debian/chroot.install @@ -129,8 +129,9 @@ mountpoint -q /target || mount -- /dev/mapper/"${vgname}"-root /targe ### boot - grub mkdir -p -- /target/boot mountpoint -q /target/boot || mount -- ${hdd}1 /target/boot +boot_uuid=$(blkid | grep "${hdd}1" | sed 's/.*1.*UUID="\(.*\)" TYPE.*/\1/') ### Prepare an fstab file -printf '%b\n' "${hdd}1 /boot ext3 defaults 0 0" > /tmp/target.fstab +printf '%b\n' "UUID=${boot_uuid} /boot ext3 defaults 0 0" > /tmp/target.fstab ### Prepare the base system tree according to the expected file system if [ "${manage_btrfs}" -eq 0 ]; then