From fe4b59b52c1c0457d0dbc675f854d74c2f6a869a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Sp=C3=B6hel?= Date: Tue, 20 Apr 2021 15:11:12 +0200 Subject: Fstab fixup for efi. --- share/build-scripts/qemu | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'share') diff --git a/share/build-scripts/qemu b/share/build-scripts/qemu index 3bfa046..f9ab4b4 100755 --- a/share/build-scripts/qemu +++ b/share/build-scripts/qemu @@ -1066,6 +1066,22 @@ Configure_system "${MACHINES}/${NAME}" Configure_network "${MACHINES}/${NAME}" Configure_systemd_networkd "${MACHINES}/${NAME}" +# Configure fstab + +# FIXME DIRECTORY +cat > "${DIRECTORY}/etc/fstab" << EOF +# /etc/fstab: static file system information. +# +# Use 'blkid' to print the universally unique identifier for a +# device; this may be used with UUID= as a more robust way to name devices +# that works even if disks are added and removed. See fstab(5). +# +# + +UUID=$(lsblk --fs --noheadings --output UUID /dev/mapper/loop0${SYSTEM_PARTITION}) / ext4 errors=remount-ro 0 1 +EOF + + # configure grub cat > "${MACHINES}/${NAME}/tmp/device.map" << EOF (hd0) /dev/loop0 @@ -1087,7 +1103,9 @@ case "${BOOT_METHOD}" in # FIXME chroot "${MACHINES}/${NAME}" /bin/sh -c 'DEBIAN_FRONTEND=noninteractive; apt-get install grub-efi -y' chroot "${MACHINES}/${NAME}" grub-install --efi-directory=/boot/efi --no-bootsector --target x86_64-efi --no-nvram --no-uefi-secure-boot --force-extra-removable - echo "pass" + + # FIXME DIRECTORY + echo "UUID=$(lsblk --fs --noheadings --output UUID /dev/mapper/loop0${EFI_PARTITION}) /boot/efi vfat umask=0077 0 0" >> "${DIRECTORY}/etc/fstab" ;; *) @@ -1097,21 +1115,6 @@ esac chroot "${MACHINES}/${NAME}" update-grub -# Configure fstab - -# FIXME DIRECTORY -cat > "${DIRECTORY}/etc/fstab" << EOF -# /etc/fstab: static file system information. -# -# Use 'blkid' to print the universally unique identifier for a -# device; this may be used with UUID= as a more robust way to name devices -# that works even if disks are added and removed. See fstab(5). -# -# - -UUID=$(lsblk --fs --noheadings --output UUID /dev/mapper/loop0${SYSTEM_PARTITION}) / ext4 errors=remount-ro 0 1 -EOF - Cleanup_system "${MACHINES}/${NAME}" -- cgit v1.2.3