grub icon indicating copy to clipboard operation
grub copied to clipboard

Add macOS related features

Open Sporesirius opened this issue 4 years ago • 7 comments

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

  • APFS support
  • macOS loader (possibility to inject Kext files)

Sporesirius avatar Jul 12 '19 11:07 Sporesirius

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 avatar Jul 12 '19 12:07 a1ive

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."));

a1ive avatar Jul 12 '19 12:07 a1ive

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.

Sporesirius avatar Jul 12 '19 13:07 Sporesirius

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

a1ive avatar Jul 13 '19 11:07 a1ive

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

Sporesirius avatar Jul 13 '19 17:07 Sporesirius

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 avatar Jul 13 '19 23:07 a1ive

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

a1ive avatar Aug 12 '19 00:08 a1ive