Why does Fedora uses the HFS+ format for EFI system partition on Mac?

Fedora uses the HFS+ format for EFI system partition on Mac (Macbook pro).

It works, more or less, with some problems, since Linux does not handle well HFS+, which is proper to Apple.

Other Linux distributions use FAT32. Even Mac OS uses FAT32.

I checked the document

“Unified Extensible Firmware Interface
Specification
Version 2.9
March 2021”

page 504

EFI encompasses the use of FAT32 for a system partition, and FAT12 or FAT16 for removable media.

I conclude that Fedora does wrong but why this choice?

1 Like

Probably because some Mac’s require it.

1 Like

Do you dual boot macOS/Fedora?

Unless you are installing to an empty drive, Fedora should preserve the existing EFI partition with entries for other OS’s. If my (unreliable) memory is correct, HFS+ was used by legacy macOS versions. My iMac 14,2 got a fresh install of Catalina after the SSD in the “hybrid” drive failed. The new EFI partition is FAT. The system boots to either Fedora (37) or Catalina. MacOS no longer uses the EFI partition (it may have been needed for firmware updates after the move away from booting with EFI) so an EFI partition is not always used. I can image situtations where Fedora has to create or at least format an EFI parition, so could be using HFS+ for comaptibility with legacy macOS versions.

1 Like

Yes I use dual boot. However, I have first installed Fedora on an empty device and installed Mac OS only later (if not, we would see ubuntu under ./EFI since I used Ubuntu before Fedora). I had never seen a HFS+ EFI partition before Fedora but it may have existed hidden by Mac OS. Mac OS does not use EFI for booting.

Content of the EFI system partition created by Fedora:

% ls -lR 
.:
total 4
drwxr-xr-x 1 alba alba  4 jul 21  2022 EFI
-rw-r--r-- 1 alba alba 34 jul 21  2022 mach_kernel
drwxr-xr-x 1 alba alba  3 jul 21  2022 System

./EFI:
total 0
drwx------ 1 alba alba  6 jul 21  2022 BOOT
drwx------ 1 alba alba 15 jan 14 20:28 fedora

./EFI/BOOT:
total 1820
-rwx------ 1 alba alba 742064 jul  7  2022 BOOTIA32.EFI
-rwx------ 1 alba alba 946712 jul  7  2022 BOOTX64.EFI
-rwx------ 1 alba alba  70776 jul  7  2022 fbia32.efi
-rwx------ 1 alba alba  90280 jul  7  2022 fbx64.efi

./EFI/fedora:
total 15924
-rwx------ 1 alba alba     112 jul  7  2022 BOOTIA32.CSV
-rwx------ 1 alba alba     110 jul  7  2022 BOOTX64.CSV
-rwx------ 1 alba alba 2526528 dez 21 22:47 gcdia32.efi
-rwx------ 1 alba alba 3525952 dez 21 22:47 gcdx64.efi
-rw-r--r-- 1 alba alba     149 jan 14 20:28 grub.cfg
-rwx------ 1 alba alba 2526528 dez 21 22:47 grubia32.efi
-rwx------ 1 alba alba 3525952 dez 21 22:47 grubx64.efi
-rwx------ 1 alba alba  678576 jul  7  2022 mmia32.efi
-rwx------ 1 alba alba  857248 jul  7  2022 mmx64.efi
-rwx------ 1 alba alba  946712 jul  7  2022 shim.efi
-rwx------ 1 alba alba  742064 jul  7  2022 shimia32.efi
-rwx------ 1 alba alba  946712 jul  7  2022 shimx64.efi

./System:
total 0
drwxr-xr-x 1 alba alba 3 jul 21  2022 Library

./System/Library:
total 0
drwxr-xr-x 1 alba alba 8 dez  5 06:34 CoreServices

./System/Library/CoreServices:
total 3452
lrwxrwxrwx 1 alba alba      28 dez  5 06:34 boot.cfg -> ../../../EFI/fedora/grub.cfg
-rwx------ 1 alba alba 3525952 nov 23 21:28 boot.efi
-rw-r--r-- 1 alba alba     384 jul 21  2022 SystemVersion.plist

You can see a symbolic link (->), which would not be possible with FAT32. The directory name “System/Library/CoreServices” suggest some utility for Mac OS.

I can’t explain this complexity and the discrepancy with the UEFI specification.

For comparison, the EFI system partition created by Manjaro is much simpler:

% sudo ls -lR /boot/efi
[sudo] password for alba: 
/boot/efi:
total 4
drwx------ 5 root root 4096 jan 19 01:20 EFI

/boot/efi/EFI:
total 12
drwx------ 3 root root 4096 jan 20 21:27 APPLE
drwx------ 2 root root 4096 jan 19 01:20 boot
drwx------ 2 root root 4096 jan 19 01:20 Manjaro

/boot/efi/EFI/APPLE:
total 4
drwx------ 2 root root 4096 jan 20 21:27 EXTENSIONS

/boot/efi/EFI/APPLE/EXTENSIONS:
total 15364
-rwx------ 1 root root 15729264 jan 20 21:27 Firmware.scap

/boot/efi/EFI/boot:
total 148
-rwx------ 1 root root 151552 jan 19 01:20 bootx64.efi

/boot/efi/EFI/Manjaro:
total 148
-rwx------ 1 root root 151552 jan 19 01:20 grubx64.efi

However, it also contains Firmware.scap, which is not in Fedora.

Here:

% doas fdisk -l /dev/sda
doas (gnw3@imac) password: 
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: APPLE HDD ST1000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C2D8A416-B8BE-4245-90F3-B5087543502D

Device         Start        End   Sectors   Size Type
/dev/sda1         40     409639    409600   200M EFI System
/dev/sda2     411648  976975871 976564224 465.7G Apple APFS
/dev/sda3  976975872  978204671   1228800   600M Apple HFS/HFS+
/dev/sda4  978204672  980301823   2097152     1G Linux filesystem
/dev/sda5  980301824 1953523711 973221888 464.1G Linux filesystem

Fedora Disks says /dev/sda1 is FAT32 with type EFI System, while /dev/sda3 is HFS+ and gets mounted as /boot/efi. The EFI partion has:

% ls -lR EFI
EFI:
total 11% ls -lR EFI
EFI:
total 11
-rw-r--r--. 1 gnw3 gnw3 10029 Jun  7  2022 BOOTLOG
drwxr-xr-x. 3 gnw3 gnw3   512 Jun  7  2022 EFI

EFI/EFI:
total 1
drwxr-xr-x. 5 gnw3 gnw3 512 Jun  7  2022 APPLE

EFI/EFI/APPLE:
total 2
drwxr-xr-x. 3 gnw3 gnw3 512 Jun  7  2022 CACHES
drwxr-xr-x. 2 gnw3 gnw3 512 May 13  2021 EXTENSIONS
drwxr-xr-x. 2 gnw3 gnw3 512 May 13  2021 FIRMWARE

EFI/EFI/APPLE/CACHES:
total 1
drwxr-xr-x. 2 gnw3 gnw3 512 Jun  7  2022 CAFEBEEF

EFI/EFI/APPLE/CACHES/CAFEBEEF:
total 0

EFI/EFI/APPLE/EXTENSIONS:
total 15361
-rw-r--r--. 1 gnw3 gnw3 15729264 May 13  2021 Firmware.scap

EFI/EFI/APPLE/FIRMWARE:
total 8321
-rw-r--r--. 1 gnw3 gnw3 8520304 Jul 21  2022 IM142.scap

-rw-r--r--. 1 gnw3 gnw3 10029 Jun  7  2022 BOOTLOG
drwxr-xr-x. 3 gnw3 gnw3   512 Jun  7  2022 EFI

EFI/EFI:
total 1
drwxr-xr-x. 5 gnw3 gnw3 512 Jun  7  2022 APPLE

EFI/EFI/APPLE:
total 2
drwxr-xr-x. 3 gnw3 gnw3 512 Jun  7  2022 CACHES
drwxr-xr-x. 2 gnw3 gnw3 512 May 13  2021 EXTENSIONS
drwxr-xr-x. 2 gnw3 gnw3 512 May 13  2021 FIRMWARE

EFI/EFI/APPLE/CACHES:
total 1
drwxr-xr-x. 2 gnw3 gnw3 512 Jun  7  2022 CAFEBEEF

EFI/EFI/APPLE/CACHES/CAFEBEEF:
total 0

EFI/EFI/APPLE/EXTENSIONS:
total 15361
-rw-r--r--. 1 gnw3 gnw3 15729264 May 13  2021 Firmware.scap

EFI/EFI/APPLE/FIRMWARE:
total 8321
-rw-r--r--. 1 gnw3 gnw3 8520304 Jul 21  2022 IM142.scap

[The convoluted history of Apple EFI partitions](https://eclecticlight.co/2020/06/16/% doas fdisk -l /dev/sda
doas (gnw3@imac) password:
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: APPLE HDD ST1000
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C2D8A416-B8BE-4245-90F3-B5087543502D

Device Start End Sectors Size Type
/dev/sda1 40 409639 409600 200M EFI System
/dev/sda2 411648 976975871 976564224 465.7G Apple APFS
/dev/sda3 976975872 978204671 1228800 600M Apple HFS/HFS+
/dev/sda4 978204672 980301823 2097152 1G Linux filesystem
/dev/sda5 980301824 1953523711 973221888 464.1G Linux filesystem
efi-system-partitions-a-hidden-problem/) suggests the EFI partition may have been used for firmware updates after being abandoned for use in booting macOS.

Starting with Fedora 38 we are going to use the “standard” FAT EFI partition on Macs too, see 2140462 – Anaconda uses the wrong filesystem for the EFI System Partition on intel mac models after 2018.

1 Like