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
This commit is contained in:
Richard Laager
2021-01-09 16:59:17 -06:00
parent 2c76e5de97
commit c00aa93389
2 changed files with 26 additions and 6 deletions

View File

@@ -650,8 +650,8 @@ Step 4: System Configuration
mkdosfs -F 32 -s 1 -n EFI ${DISK}-part2 mkdosfs -F 32 -s 1 -n EFI ${DISK}-part2
mkdir /boot/efi mkdir /boot/efi
echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part2) \ echo /dev/disk/by-uuid/$(blkid -s UUID -o value ${DISK}-part1) \
/boot/efi vfat nofail,x-systemd.device-timeout=1 0 1 >> /etc/fstab /boot/efi vfat defaults 0 0 >> /etc/fstab
mount /boot/efi mount /boot/efi
apt install --yes grub-efi-amd64 shim-signed 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 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 (given the partition size of 512 MiB) for FAT32. It also works fine on
drives which present 512 B sectors. drives which present 512 B sectors.
- An alternate approach is to have ``/boot/efi`` automounted. This
`reduces the risk of corruption of the ESP
<https://bugzilla.redhat.com/show_bug.cgi?id=1077984>`__. 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 - For a mirror or raidz topology, this step only installs GRUB on the
first disk. The other disk(s) will be handled later. first disk. The other disk(s) will be handled later.

View File

@@ -753,10 +753,21 @@ Step 4: System Configuration
For a mirror or raidz topology, repeat the `mkdosfs` for the additional For a mirror or raidz topology, repeat the `mkdosfs` for the additional
disks, but do not repeat the other commands. disks, but do not repeat the other commands.
**Note:** The ``-s 1`` for ``mkdosfs`` is only necessary for drives which **Notes:**
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 - The ``-s 1`` for ``mkdosfs`` is only necessary for drives which present
drives which present 512 B sectors. 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
<https://bugzilla.redhat.com/show_bug.cgi?id=1077984>`__. 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: #. Put ``/boot/grub`` on the EFI System Partition: