From b9542eb837ae5e2c7bde8016aef88afdaee1c5c7 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Tue, 7 Apr 2026 11:27:35 -0500 Subject: [PATCH 1/2] Touch up discussion of UEFI partition in fstab. Add a note to say UEFI partition only needs to be mounted when running grub-install or to inspect the partition. It may be needed in BLFS when using efibootmgr. It is definitly not needed to be in fstab for the boot process to work. I also needed to remove several unneeded options in the example fstab line because it ran off the right side of the page. It's a bit unfortunate that fstab does not have the capability of understanding backslash-newline. --- chapter10/fstab.xml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/chapter10/fstab.xml b/chapter10/fstab.xml index ad5ae2a41..c5128ebbd 100644 --- a/chapter10/fstab.xml +++ b/chapter10/fstab.xml @@ -89,33 +89,42 @@ EOF interpreted in the UTF-8 locale. - When booting with UEFI, the ESP must be formatted as a FAT filesystem, most + When installing GRUB with UEFI, the ESP must be formatted as a FAT filesystem, most commonly VFAT. This file sees it as VFAT regardless. An example of how you would go about an entry for the ESP would look like this: cat >> /etc/fstab << "EOF" -/dev/<zzz> /boot/efi vfat rw,relatime,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2 +/dev/<zzz> /boot/efi vfat rw,relatime,codepage=437,iocharset=iso8859-1 0 2 EOF The iso8859-1 IO charset is used here since UEFI firmware implementations search for \EFI\BOOT\BOOT...EFI, which in a - case-sensitive environment would not be satisfied. So that charset is used - to ensure the EFI image can be found. + case-sensitive environment would not be satisfied. - + --> It is also possible to specify default codepage and iocharset values for some filesystems during kernel configuration. The relevant parameters From 45fd83b871a86784a601bffb1f5edbc37fab7ca0 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 8 Apr 2026 01:34:37 +0800 Subject: [PATCH 2/2] fstab: drop a stale para and fix the desc for iocharset The iocharset option has nothing to do with what the firmware will see. It only changes the way the kernel reports the file names to the user-space. So techincally it should match the locale, we're lucky here because most common locales treat 7-bit ASCII in the same way. P.S. the UEFI spec says the file names stored onto the ESP (controlled by codepage instead of iocharset) must be either (7-bit) ASCII or UCS-2. CP437 actually has more characters than ASCII (it's "DOS extended 8-bit ASCII") so if you create a file with 8-bit name in ESP you may wreck havoc. UCS-2 is a subset of UTF-16 which is CP1200, but Linux does not support CP1200 (yet) and even if we can use CP1200 it still contains more characters than UCS-2 so the issue will still exist. We can only trust the boot loader installers (like grub-install) and the user for avoiding 8-bit file names. --- chapter10/fstab.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/chapter10/fstab.xml b/chapter10/fstab.xml index c5128ebbd..43822d8c2 100644 --- a/chapter10/fstab.xml +++ b/chapter10/fstab.xml @@ -99,10 +99,14 @@ EOF EOF - The iso8859-1 IO charset is used here since UEFI - firmware implementations search for \EFI\BOOT\BOOT...EFI, which in a - case-sensitive environment would not be satisfied. + The iso8859-1 IO charset is used here as we'll + enable it as a part of the kernel UEFI configuration in + . Technically the IO charset should + match your locale as we've discussed above. However the name of all the + files in the ESP only contains 7-bit ASCII characters, so things will + be OK as long as the character set for your locale treats 7-bit ASCII + characters in the same way as ISO-8859-1. For example, UTF-8 is such + a character set. @@ -115,9 +119,9 @@ EOF - In the latter case, the kernel emits the following message: +