a1ive / grub

Fork of GRUB 2 to add various features.
GNU General Public License v3.0
138 stars 38 forks source link

Add macOS related features #6

Open Sporesirius opened 5 years ago

Sporesirius commented 5 years ago

I have some suggestions (maybe for the future) for macOS related features like:

a1ive commented 5 years ago

Apple didn't yet document the disk format of APFS. There is only one experimental open source driver for APFS: https://github.com/sgan81/apfs-fuse Maybe we should wait.

a1ive commented 5 years ago

Some posts on internet said that the 'xnu' module could boot macOS, but I haven't tested it yet. https://web.archive.org/web/20100316172850/http://grub.enbug.org/XNUSupport

from grub-core/loader/xnu.c: grub_register_command ("xnu_kernel", grub_cmd_xnu_kernel, 0, N_("Load XNU image.")); grub_register_command ("xnu_kernel64", grub_cmd_xnu_kernel64, 0, N_("Load 64-bit XNU image.")); grub_register_command ("xnu_mkext", grub_cmd_xnu_mkext, 0, N_("Load XNU extension package.")); grub_register_command ("xnu_kext", grub_cmd_xnu_kext, 0, N_("Load XNU extension.")); grub_register_command ("xnu_kextdir", grub_cmd_xnu_kextdir, N_("DIRECTORY [OSBundleRequired]"), N_("Load XNU extension directory.")); grub_register_command ("xnu_ramdisk", grub_cmd_xnu_ramdisk, 0, N_("Load XNU ramdisk. " "It will be available in OS as md0.")); grub_register_extcmd ("xnu_splash", grub_cmd_xnu_splash, 0, 0, N_("Load a splash image for XNU."), xnu_splash_cmd_options); grub_register_command ("xnu_resume", grub_cmd_xnu_resume, 0, N_("Load an image of hibernated" " XNU."));

Sporesirius commented 5 years ago

Okay, thanks for the search. I'll check it out and get back to you.

EDIT: So I had tried some versions (macOS High Sierra, OS X El Capitan and OS X Yosemite). The newer versions High Sierra and El Capitan don't have the XNU kernel in the same place as Yosemite, so I try to get Yosemite to work first, but VMware only gives me "The firmware encountered an unexpected exception. The virtual machine cannot boot."

Maybe it's the Kext files.

a1ive commented 5 years ago

https://forums.bunsenlabs.org/viewtopic.php?id=5136 maybe you could 'chainload' the efi file?

Sporesirius commented 5 years ago

If Yosemite is already installed in the VM I can chainload the efi file. When trying to install Yosemite e.g. with an ISO file it doesn't work.

vmware_2019-07-13_19-43-51

a1ive commented 5 years ago

This is a known issue (https://msfn.org/board/topic/173593-boot-winpe-efi-form-grub2-cddvd). GRUB2 couldn't find the correct DevicePath of efi files on CD. Even if GRUB2 can chainload it, I don't think we can loopback boot a macOS ISO.

a1ive commented 5 years ago

https://github.com/acidanthera/OpenCorePkg another bootloader for macOS