Madgwick.xyz

December 21, 2021 (2021-12-21)

Using GRUB on a MacPro 1,1

For the most part, installing Linux - on (U)EFI platforms - requires installing GRUB and Linux distros pretty much always require GRUB. Though for some time now the Linux kernel has supported being booted directly. While all modern UEFI platforms with 64-bit CPUs support booting 64-bit .efi files, early Intel Macs do not. For the MacPro, these are the 1,1 & 2,1 models. This page gives a few tips on using installing Linux and using GRUB on early Intel MacPros.

Preparing for Installation

Creating a normal installer USB and using it with an early Intel Mac will not work as expected. This is because the version of EFI GRUB present will be 64-bit. Early Intel Macs support only 32-bit EFI and so installers cannot work as-is. In addition to this, the Mac firmware only looks at a single path for the .efi file; usually the installer will have put GRUB in a different place.

To fix this a 32-bit version of GRUB needs to be acquired (or compiled) and placed at /EFI/BOOT/BOOTIA32.EFI in the EFI partition of the installer. Any other path or filename won’t work. The fact the EFI binary itself is 32-bit does not prevent it from booting a 64-bit kernel.

To boot the GRUB EFI file itself, hold alt when booting and you’ll be able to select the EFI file manually on the Mac firmware provided boot menu. Note this menu is only visible if an original Mac video card is installed.

Installation

For the most part installation should work the same as with any other system. It might be necessary to use the noefi kernel parameter in some cases to avoid a crash. The primary problem is with GRUB installation. For Debian/Ubuntu the installer will likely install the usual 64-bit version of GRUB, resulting in an unbootable system. Depending on how the installation is done, it may be possible to manually select the 32-bit GRUB package (for Debian this is grub-efi-ia32) instead of the default.

As with the above section, the location of the GRUB EFI file is important. The installer (via the install-grub command) will place this file in the wrong place for the Mac firmware. It needs to be relocated; or if running ‘install-grub’ manually the proper path can be specified directly.

The other way to fix things is to use the 32-bit GRUB on the USB to boot the new OS installation instead of the installer. This would be done by manually specifying the disk and kernel to load using the GRUB console. Once the OS is booted, the wrong GRUB version/package can be swapped out. You could also just remove the hard disk and do the above on a separate system.

Future Housekeeping

When you come to install a new version of GRUB, you might find the new EFI file is placed in the wrong directory again and isn’t seen by the Mac firmware (this is at least a problem I had). In this situation the old version of GRUB wasn’t overwritten and was still booted by the firmware, but it was unable to load properly because it couldn’t load its modules - they had been replaced with ones for the new version. Fortunately, this is pretty easy to fix; just rename/move the new EFI file to have the correct path again.

There’s a lot of useful info on the original Ubuntu UEFIBooting wiki page. Much of the page is outdated, but the Mac sections are still relevant. There’s also some further info in the GRUB manual itself, although overall this is a pretty incomplete manual.