storaged-project / blivet

A python module for configuration of block devices
GNU Lesser General Public License v2.1
106 stars 86 forks source link

Cannot install F38 on efi macs ( "macefi" vs "efi" issue ) #1139

Closed sidt4 closed 9 months ago

sidt4 commented 1 year ago

I cannot install F38 on couple of my macs. They are 2011, 2012 models. Manual disk partitioning fails with below error.

apple-macefi-vs-efi

Looking into the anaconda / blivet code, it appears that my macs are not treated as normal "efi" systems ( ESP fat32 partitions ), but as "mactel" systems which need special "macefi" partitions ( Linux HFS+ ESP ?? ).

I am not sure why this is the case. I've been multibooting various macOS versions and linux distros successfully for years on these machines, without any issues. This is the first time I tried installing Fedora, and landed into this issue.

There are lot of old Intel macs ( not only the new T2 chip macs - https://github.com/storaged-project/blivet/pull/1090 ), which have normal EFI fat32 partitions. I think someone needs to do some groundwork on which exact macs should be classified as "mactel", leaving all others as regular EFI systems.

The pre-UEFI Apple–Intel architecture (mactel) EFI subsystem used to require the EFI system partition to be formatted in HFS+

Source: https://en.wikipedia.org/wiki/EFI_system_partition

So, our "mactel" macs are mostly pre-UEFI Intel macs.

Background

After Intel dropped its EFI (v1.10) in 2005 and embraced the UEFI standard ( available from 2006 onwards ), I think Apple should have also gone with UEFI too, which should have mandated more open standards ( like using FAT32 ESP for universal compatibility ), than HFS+ for EFI partitions. So, my guess is that macs around 2008/09 should have switched to normal EFI, from the previous "mactel" efi. Again, this is just a rough guess. Someone, more familiar on this topic can provide more accurate information on this.

Temporary fix:

Live patching the live install USB image as below, seems to let the installation succeed.

diff --git a/blivet/arch.py b/blivet/arch.py
index 6c2a584e..2ee13906 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -241,7 +241,7 @@ def is_mactel():
             mactel = ("apple" in buf.lower())
         except UnicodeDecodeError:
             mactel = False
-    return mactel
+    return False

 def is_efi():

The above file is in /usr/lib/python3.11/site-packages/blivet/ location in the installer image.

vojtechtrefny commented 9 months ago

This was fixed in Anaconda which now uses FAT for all Apple devices: https://github.com/rhinstaller/anaconda/pull/4865