From 98cc55d01ed36dfcae42d33ccc796d94d20a7c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 5 Dec 2019 11:40:55 +0100 Subject: [PATCH] Fedora image: use UUIDs in /etc/fstab --- fedora-build-opennebula-image.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fedora-build-opennebula-image.sh b/fedora-build-opennebula-image.sh index 419e193..84d8d57 100755 --- a/fedora-build-opennebula-image.sh +++ b/fedora-build-opennebula-image.sh @@ -135,10 +135,11 @@ run_root dnf -y install openssh-server run_root systemctl enable sshd # Generate fstab file. -# TODO: use UIDs instead of /dev/vdaX, current scheme is very fragile. +boot_uuid=$(blkid --match-tag UUID --output value "${NBD_DEVICE}p1") +root_uuid=$(blkid --match-tag UUID --output value "${NBD_DEVICE}p2") cat >>/mnt/etc/fstab <