Booting to OSX from GRUB2

Last month, I try to install Fedora 21 on MacBook Air machine. It’s pretty easy. Just resize OSX partition, give it a empty partition. Boot to USB drive that I made before with Fedora’s LiveUSB Creator. The rest, just follow the instruction from installer.

But the problem is GRUB2 cannot boot to OSX. So, if I want to boot to OSX, I need to hold down option-key and choose OSX partition at boot time. I set Fedora 21 partition as default partition to boot. I also don’t use tools like rEFInd or rEFIt.

But, after hours of Googling, there is a way to boot to OSX from GRUB2. In /etc/grub.d/40_custom, I need to add some line like:

menuentry "MacOS X" {
insmod hfsplus
set root=(hd1,gpt2)
chainloader /System/Library/CoreServices/boot.efi
boot
}

After that, I should re-create grub configuration with command:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg.

Once done, I could boot to OSX from GRUB2.

1 thought on “Booting to OSX from GRUB2”

Leave a Reply

Your email address will not be published. Required fields are marked *