Fedora image: use UUIDs in /etc/fstab
This commit is contained in:
parent
177e50498c
commit
98cc55d01e
1 changed files with 4 additions and 3 deletions
|
@ -135,10 +135,11 @@ run_root dnf -y install openssh-server
|
||||||
run_root systemctl enable sshd
|
run_root systemctl enable sshd
|
||||||
|
|
||||||
# Generate fstab file.
|
# 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 <<EOF
|
cat >>/mnt/etc/fstab <<EOF
|
||||||
/dev/sda1 /boot ext4 rw,relatime,data=ordered 0 2
|
UUID=$boot_uuid /boot ext4 rw,relatime,data=ordered 0 2
|
||||||
/dev/sda2 / ext4 rw,relatime,data=ordered 0 1
|
UUID=$root_uuid / ext4 rw,relatime,data=ordered 0 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Make sure everything is written to disk before exiting.
|
# Make sure everything is written to disk before exiting.
|
||||||
|
|
Loading…
Reference in a new issue