Debian/Ubuntu: Use /dev/disk/by-uuid

This is how the Ubuntu 20.04 installer configures the ESP to mount at
/boot/efi, so it should be fine to use this convention everywhere.

/dev/md0's /dev/disk/by-uuid entry does not show up immediately, so I
removed the swapon there.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
This commit is contained in:
Richard Laager
2020-12-05 17:12:22 -06:00
parent a4f8837031
commit d86f52c207
2 changed files with 8 additions and 9 deletions

View File

@@ -609,8 +609,8 @@ Step 4: System Configuration
apt install --yes cryptsetup
echo luks1 UUID=$(blkid -s UUID -o value ${DISK}-part4) none \
luks,discard,initramfs > /etc/crypttab
echo luks1 /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part4) \
none luks,discard,initramfs > /etc/crypttab
The use of ``initramfs`` is a work-around for `cryptsetup does not support
ZFS <https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1612906>`__.
@@ -634,7 +634,7 @@ Step 4: System Configuration
apt install dosfstools
mkdosfs -F 32 -s 1 -n EFI ${DISK}-part2
mkdir /boot/efi
echo UUID=$(blkid -s UUID -o value ${DISK}-part2) \
echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part2) \
/boot/efi vfat nofail,x-systemd.device-timeout=1 0 1 >> /etc/fstab
mount /boot/efi
apt install --yes grub-efi-amd64 shim-signed

View File

@@ -746,8 +746,8 @@ Step 4: System Configuration
apt install --yes cryptsetup
echo luks1 UUID=$(blkid -s UUID -o value ${DISK}-part4) none \
luks,discard,initramfs > /etc/crypttab
echo luks1 /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part4) \
none luks,discard,initramfs > /etc/crypttab
The use of ``initramfs`` is a work-around for `cryptsetup does not support
ZFS <https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1612906>`__.
@@ -763,7 +763,7 @@ Step 4: System Configuration
mkdosfs -F 32 -s 1 -n EFI ${DISK}-part1
mkdir /boot/efi
echo UUID=$(blkid -s UUID -o value ${DISK}-part1) \
echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part1) \
/boot/efi vfat umask=0022,fmask=0022,dmask=0022 0 1 >> /etc/fstab
mount /boot/efi
@@ -835,7 +835,7 @@ Step 4: System Configuration
- For an unencrypted single-disk install::
mkswap -f ${DISK}-part2
echo UUID=$(blkid -s UUID -o value ${DISK}-part2) \
echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part2) \
none swap discard 0 0 >> /etc/fstab
swapon -a
@@ -847,9 +847,8 @@ Step 4: System Configuration
mdadm --create /dev/md0 --metadata=1.2 --level=mirror \
--raid-devices=2 ${DISK1}-part2 ${DISK2}-part2
mkswap -f /dev/md0
echo UUID=$(blkid -s UUID -o value /dev/md0) \
echo /dev/disk/by-uuid/$(blkid -s UUID -o value /dev/md0) \
none swap discard 0 0 >> /etc/fstab
swapon -a
- For an encrypted (LUKS or ZFS native encryption) single-disk install::