Skip to content

Instantly share code, notes, and snippets.

@jcherven
Last active August 25, 2020 15:39
Show Gist options
  • Save jcherven/a204083d418ad47096d53b933df6d9b2 to your computer and use it in GitHub Desktop.
Save jcherven/a204083d418ad47096d53b933df6d9b2 to your computer and use it in GitHub Desktop.
Adding a grub2 EFI launcher to the MacOS UEFI boot menu

Adding a gnu/linux entry to the apple uefi loader menu

This assumes you have a currently installed working linux on another partition or disk.

In the MacOS installation as root:

diskutil mount disk0s1
ls /Volumes

in /Volumes there should be a new mount called EFI or something like that. It could also be called NO NAME... regardless its interior folder structure will look like this:

/Volumes/EFI
├── EFI
│   ├── Boot
│   └── GRUB
└── grub
    ├── fonts
    ├── locale
    ├── themes
    │   └── starfield
    └── x86_64-efi

Create a folder named Boot in /Volumes/EFI/EFI

mkdir /Volumes/EFI/EFI/Boot

Somewhere in /Volumes/EFI/EFI there should be a grubx64.efi file, perhaps in a subdirectory folder named GRUB or whatever linux distro it was installed by. Copy grubx64.efi to /Volumes/EFI/EFI/Boot. In the new folder, it needs to be renamed to 'bootx64.efi'.

cp /Volumes/EFI/EFI/GRUB/grubx64.efi /Volumes/EFI/EFI/Boot/bootx64.efi

Optionally, you can use an iconset (.icns file) to make the menu items for the boot options have logos. There's a common set many people use at https://sourceforge.net/projects/mac-icns which might be the same ones used in boot managers like rEFInd or rEFIt. Place the .icns you want in /Volumes/EFI as .VolumeIcon.icns

Don't forget to unmount the volume:

diskutil umount disk0s1

Reboot into the boot menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment