grub
grub copied to clipboard
Add macOS related features
I have some suggestions (maybe for the future) for macOS related features like:
- APFS support
- macOS loader (possibility to inject Kext files)
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.
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."));
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.
https://forums.bunsenlabs.org/viewtopic.php?id=5136 maybe you could 'chainload' the efi file?
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.
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.
https://github.com/acidanthera/OpenCorePkg another bootloader for macOS