[CentOS] centos8 / anaconda EFI regression / HFS+ ESP

Thu Nov 12 14:09:44 UTC 2020
Leon Fauster <leonfauster at googlemail.com>

Am 11.11.20 um 14:41 schrieb Fabian Arrotin:
> On 10/11/2020 17:18, Leon Fauster via CentOS wrote:
>> Hi folks,
>>
>> years ago I had no problem installing CentOS7 on my
>> iMac workstation (iMac Late 2015). The installation
>> worked out of the box. Today I wanted to upgrade to
>> CentOS8 and while configuring the partitions I get an
>> error that the installation can not start because:
>> "HFS+ ESP needed and mounted on /boot/efi". In fact
>> they are the same partition as for CentOS7. Is this
>> a regression of anaconda, implying that the EFI partition
>> must be HFS based? I can boot CentOS7 with the vfat EFI
>> partition ...
>>
>> -- 
>> Leon
>>
> 
> Hi Leon,
> 
> Same problem for me on my wife's iMac (24" , 2018 model) : running
> CentOS 7 perfectly fine but I replaced original sata HDD with a SSD some
> months ago and wanted to reinstall with CentOS 8 and same result, so I
> finally reinstalled it with 7 again, and put that on my "TODO" list.
> 
> As you can see, some upstream changes landed in anaconda when detecting
> Mac/Apple hardware and it works fine with Fedora (tested already)
> because both hfs/hfs+ support exist in kernel and hfsplus-tools package
> too.


Yes, I also tested a F33 installation and it went smoothly.


> Of course it was removed from RHEL kernel (and packages list) so I have
> some ideas in mind but never had time to investigate further (as iMac
> also runs fine with CentOS 7)
> 
> One idea was to "modify" on the fly anaconda (with updates.img) to *not*
> use HFS+ part but instead vfat. There are ways to do that but one first
> need to find which python code to mod in anaconda (and then see if such
> method still works :
> https://arrfab.net/posts/2011/Jun/11/modifying-anaconda-behaviour-without-rebuilding-the-whole-install-media/)
> 
> Other idea : respin an iso/tree that would use different kernel and
> access to hfsplus-tools pkg and so no need to "hack" anaconda
> 
> So many ideas, but not enough time to investigate this for now ...


Because of the missing hfs support it would be the hard way to keep
everytime in mind that the kernel-plus is mandatory for having /boot/efi
mounted and the tools must be also provided.

So, I think the "easiest" way would be a fallback to vfat in anaconda.

A quick look into the code shows that this platform is recognized as 
"macefi". Forcing it to "efi" would allow anaconda going the path with vfat.

https://github.com/rhinstaller/anaconda/blob/55492ad6166f2cd7aed0e802bdf5b4875dc20f29/tests/nosetests/pyanaconda_tests/modules/storage/platform_test.py

Line 171 (efi) and 207 (macefi)


Not sure if upstream is interested but I filled a bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=1896960

--
Leon