summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Spöhel <simon@spoehel.ch>2021-04-20 13:11:12 +0000
committerSakirnth Nagarasa <sakirnth@gmail.com>2021-09-01 08:24:59 +0000
commitfe4b59b52c1c0457d0dbc675f854d74c2f6a869a (patch)
tree408e368d583644610ccd19be03129a8f7eba2524
parentAdding basic functionality to start a VM. (diff)
downloadcompute-tools-fe4b59b52c1c0457d0dbc675f854d74c2f6a869a.tar.xz
compute-tools-fe4b59b52c1c0457d0dbc675f854d74c2f6a869a.zip
Fstab fixup for efi.
Diffstat (limited to '')
-rwxr-xr-xshare/build-scripts/qemu35
1 files changed, 19 insertions, 16 deletions
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).
+#
+# <file system> <mount point> <type> <options> <dump> <pass>
+
+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).
-#
-# <file system> <mount point> <type> <options> <dump> <pass>
-
-UUID=$(lsblk --fs --noheadings --output UUID /dev/mapper/loop0${SYSTEM_PARTITION}) / ext4 errors=remount-ro 0 1
-EOF
-
Cleanup_system "${MACHINES}/${NAME}"