From c00aa93389260573349303e95cb3e6e3cb805b09 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sat, 9 Jan 2021 16:59:17 -0600 Subject: [PATCH] Debian/Ubuntu: Update /boot/efi fstab entry I made Debian follow the Ubuntu approach, which comes from the Ubuntu installer. There was a report (#99) of a problem with the old approach used on Debian. In that issue, user foo-git linked to a Fedora feature request which discusses automounting /boot/efi instead. I've offered that as an alternative. I am not switching to that outright, as following the Ubuntu installer (where possible) is a goal of mine. Suggested-by: foo-git Closes #99 --- .../Debian/Debian Buster Root on ZFS.rst | 13 +++++++++++-- .../Ubuntu/Ubuntu 20.04 Root on ZFS.rst | 19 +++++++++++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/docs/Getting Started/Debian/Debian Buster Root on ZFS.rst b/docs/Getting Started/Debian/Debian Buster Root on ZFS.rst index 7ebced4..a58207a 100644 --- a/docs/Getting Started/Debian/Debian Buster Root on ZFS.rst +++ b/docs/Getting Started/Debian/Debian Buster Root on ZFS.rst @@ -650,8 +650,8 @@ Step 4: System Configuration mkdosfs -F 32 -s 1 -n EFI ${DISK}-part2 mkdir /boot/efi - 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 + echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part1) \ + /boot/efi vfat defaults 0 0 >> /etc/fstab mount /boot/efi apt install --yes grub-efi-amd64 shim-signed @@ -661,6 +661,15 @@ Step 4: System Configuration 4 KiB logical sectors (“4Kn” drives) to meet the minimum cluster size (given the partition size of 512 MiB) for FAT32. It also works fine on drives which present 512 B sectors. + - An alternate approach is to have ``/boot/efi`` automounted. This + `reduces the risk of corruption of the ESP + `__. To do so, add + it to ``/etc/fstab`` this way instead:: + + echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part1) \ + /boot/efi vfat \ + x-systemd.idle-timeout=1min,x-systemd.automount,noauto \ + 0 1 >> /etc/fstab - For a mirror or raidz topology, this step only installs GRUB on the first disk. The other disk(s) will be handled later. diff --git a/docs/Getting Started/Ubuntu/Ubuntu 20.04 Root on ZFS.rst b/docs/Getting Started/Ubuntu/Ubuntu 20.04 Root on ZFS.rst index 598f980..56f9043 100644 --- a/docs/Getting Started/Ubuntu/Ubuntu 20.04 Root on ZFS.rst +++ b/docs/Getting Started/Ubuntu/Ubuntu 20.04 Root on ZFS.rst @@ -753,10 +753,21 @@ Step 4: System Configuration For a mirror or raidz topology, repeat the `mkdosfs` for the additional disks, but do not repeat the other commands. - **Note:** The ``-s 1`` for ``mkdosfs`` is only necessary for drives which - present 4 KiB logical sectors (“4Kn” drives) to meet the minimum cluster - size (given the partition size of 512 MiB) for FAT32. It also works fine on - drives which present 512 B sectors. + **Notes:** + + - The ``-s 1`` for ``mkdosfs`` is only necessary for drives which present + 4 KiB logical sectors (“4Kn” drives) to meet the minimum cluster size + (given the partition size of 512 MiB) for FAT32. It also works fine on + drives which present 512 B sectors. + - An alternate approach is to have ``/boot/efi`` automounted. This + `reduces the risk of corruption of the ESP + `__. To do so, add + it to ``/etc/fstab`` this way instead:: + + echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part1) \ + /boot/efi vfat \ + x-systemd.idle-timeout=1min,x-systemd.automount,noauto \ + 0 1 >> /etc/fstab #. Put ``/boot/grub`` on the EFI System Partition: