Repository

Looks good to me!

User Tools

Site Tools


kb:intranet:platforms:hackintosh

Hackintosh

Two main options available, either using the Clover bootloader, or the OpenCore bootloader. For why a custom bootloader is necessary:

  • Bootloader is in reference to bootstrapping, i.e. loading the initial software that can install other software, e.g. OS, applications.
    • Modern Windows systems (Vista to 11) use BOOTMGR (Windows Boot Loader), typically loaded by Rufus when burning bootable images
    • Modern Linux distro (Ubuntu, Kali, Arch, blah) commonly use GRUB 2 (which in turn may have been chain-loaded by, say, rEFIt)
    • Modern MacOS systems seems to use iBoot, which may be chain-loaded by BootX (Apple). Other bootloaders for other chipsets may exist.
  • Apple maintains an incredibly strong lockdown on what the bootloader does when loading Apple software. That includes checking software compatibility, verifying Apple-signed OSes, etc.
    • The iBoot bootloader itself on iPhone seems to also be loaded in read-only memory SecureROM with tight-access on dumping that code and that code is also cryptographically signed by Apple. This makes exploits on boot ROM notable since it opens up avenues for JTAG access + jailbreaking.
    • Might be difficult for Apple M1-based bootloader, for which there is (initial) difficulty booting Linux platforms due to the use of a bespoke (read: undocumented) bootloading mechanism.
  • Note that booting other OSes is possible, e.g. for Debian, rEFIt is first chain-loaded by MacOS firmware, then onto BIOS-version of GRUB, which finally loads BIOS-based OS.

To perform this bootloading, a custom bootloader is necessary to load MacOS. Notably, OpenCore supports creation of MacOS images on the Windows platform (yay), as opposed to Clover only on Linux and Mac.

Note an interesting article on the necessity of USB mapping for newer OSes since macOS 11.3.

OpenCore installation steps

The tutorial is best referenced from the official documentation. Replicating here for a summary only.

# Download OpenCore release, from https://github.com/acidanthera/OpenCorePkg/releases

# Download Catalina (macOS 10.15) base image
cd OpenCorePkg/Utilities/macrecovery/
python macrecovery.py -b Mac-00BE6ED71E35EB86 -m 00000000000000000 download

# ... alternatively, download Big Sur (macOS 11.2) base image from
# https://archive.org/details/base-system_202102 (link provided by OpenCore)

Subsequently:

  1. Clear all partitions from a USB flash drive, then copy the .dmg and .chunklist files into a parent directory named com.apple.recovery.boot in the USB root.
  2. Copy OpenCorePkg/X64/EFI directory into the USB root as well (if using 32-bit system, use the EFI folder under IA32 instead), from either the DEBUG or the RELEASE editions of OpenCorePkg.
    • Debug mode adds 3-5 seconds for boot time but allows easier troubleshooting, plus it's easy to transition back to release edition.

Clean up OpenCore files that are not used in macOS, i.e. leave the following files:

EFI
+-- BOOT/
|   +-- BOOTx64.efi
+-- OC/
    +-- ACPI/  (empty)
    +-- Drivers/
    |   +-- OpenRuntime.efi
    |   +-- OpenPartitionDxe.efi  (only for macOS 10.7-10.9)
    |   +-- OpenUsbKbDxe.efi  (only for non-UEFI/pre-2012 macOS)
    +-- Kexts/  (empty)
    +-- Resources/  (empty subdirectories)
    +-- Tools/
    |   +-- OpenShell.efi  (recommended for debugging)
    + OpenCore.efi

...and I am now stuck because documentation only specifies up to Comet Lake (10th gen) devices, while I'm on Alder Lake (12th gen)... The documentation seems to suggest that spoofing an Intel CPU as a supported model seems to work... but nope! My discrete GPU does not work (due to Nvidia/Apple not working together to attain driver support anymore), so need to rely on the integrated GPU on my Intel chip, but framebuffer patches for UHD Graphics 770 not out yet, as of 2022-07-25. Will just have to wait and see.

Now looking for virtualization alternatives.

Virtualization

Some alternatives:

Others

kb/intranet/platforms/hackintosh.txt · Last modified: 18 months ago ( 2 May 2023) by 127.0.0.1