Creating a UEFI booting installation of RHL (on a Mac)
I'm installing RedHat Linux on my Mac Pro. I've found it won't boot to a USB OS installation stick, but, the standard RedHat DVD iso will boot, though only after a bit of coaxing, and waiting (and pulling all the possible alternative boot drive options from the machine) as Macs are natively EFI based machines, and will only boot in a legacy BIOS style after a longish wait, allowing them to support Windows.
Trouble is after going through the Linux install in that way, the installation that follows produces a legacy BIOS configured Linux installation - which is not what I want - I want it to be installed in UEFI mode, so that I can select it with an EFI-based Mac boot loader (in particular, Clover), in a triple or dual boot situation on my machine.
I don't have access to a modern UEFI-based Windows machine to do the installation there, and transfer it to my Mac. (I already tried installing on a BIOS-based PC I have here, and that results naturally enough in a legacy BIOS style Linux install, with no extra options being visible as far as I could see from the install that I went through on my Mac.)
I read in the DOCs that a UEFI RedHat Linux install needs a EFI boot partition, and a GUID partition map for the rest of the drive, and I prepared that for the drive I wanted to install Linux on on my Mac.
During installation, I chose manual drive setup, and selected the EFI partition I had created earlier, and set formatting of it to vfat, and manually added the other required partitions i.e. the /boot (not LVM) 4 gig, / (root) 60 gig LVM, /home 500 GB LVM, and swap 128 GB LVM, which all still resulted in a legacy booting system, not UEFI.
How can I tell the installer to create a UEFI Linux installation on my Mac (or anywhere for that matter), rather than a legacy BIOS one?
Responses
Disclaimer: I've done a plenty of UEFI Linux installations and have a Mac, but I haven't so far tried to actually install Linux on Intel Mac hardware.
The problem might be that most Linux installers, including RedHat, will determine the type of installation (UEFI vs. legacy) by determining which mechanism the installer was booted with. So, if your Intel Mac boots the RHEL installer using legacy BIOS mode, then the installer is automatically pre-disposed to make a legacy-style installation.
As far as I know, Macs don't use Secure Boot so that's one less problem compared to modern PC hardware. But there's one Mac-specific thing you should be aware of and, if necessary, work around: the System Integrity Protection. Please see: http://www.rodsbooks.com/refind/sip.html
Another unique problem to Mac UEFI is that configuring it requires Apple's proprietary bless command. The recommended workaround seems to be to first install a boot manager like rEFInd, bless it, and then use it to boot the Linux installation media in UEFI mode:
https://www.howtogeek.com/187410/how-to-install-and-dual-boot-linux-on-a-mac/
In a UEFI system, the bootloader - or at least its first component - is supposed to be located in an ESP partition on the disk containing the OS to be booted. In order to have a valid ESP partition, the disk must have a GPT-style partition table the ESP partition should be formatted as FAT32 (unless the firmware is capable of reading other filesystem types).
In Linux, a common convention seems to be to mount the ESP partition as /boot/efi: RHEL 7 does this. (Some other distributions have chosen to do as Windows does, i.e. not mount the ESP partition at all unless actually in the process of installing or updating the bootloader.)
Since Apple has decided to add extra capabilities to their UEFI firmware, the Mac OS X UEFI bootloader is not normally located in the ESP partition, but either on the main OS partition, or if disk encryption is used, on the recovery partition.
Your question on partitioning mostly depends on the capabilities of your Linux bootloader of choice. In principle, the UEFI bootloader needs to understand the filesystem the Linux kernel and initramfs files are stored on. You may solve this by either placing the kernel and initramfs files onto the ESP partition, or by using a separate /boot partition with a simple filesystem that is understood by the actual bootloader, or by just choosing to set up your root filesystem so that the bootloader can read it directly.
Apparently RHEL 7's version of GRUB can understand LVM and XFS filesystems, so there might be no need to set up a separate /boot partition at all any more. So you could let /boot be just another directory on the root filesystem, and /boot/efi would be a mount point for the ESP partition. Everything else, including the root filesystem, could then be on LVM.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
