Dortania's OpenCore Install Guide

repository·master·Indexed 26 days ago

https://github.com/dortania/opencore-install-guide

A comprehensive technical resource for installing macOS on unsupported non-Apple X86-based hardware using the OpenCore boot loader. The guide provides detailed instructions on creating and populating config.plist files using ProperTree, configuring SMBIOS for various platforms (Intel Desktop, Laptop, HEDT, and AMD), and resolving specific compatibility issues for macOS Big Sur, including SATA support, kernel panics, and ACPI requirements.

Tokens
98.5K
Snippets
68
Records
621
Agent score
87%

What's inside OpenCore-Install-Guide

  1. Understand OpenCore and the purpose of this guide

    master

    OpenCore is a boot loader used to prepare X86-based PC systems for macOS. It functions by injecting critical data such as SMBIOS, ACPI tables, and kexts (kernel extensions). Unlike other boot loaders like Clover, OpenCore is designed to support macOS security features like System Integrity Protection and FileVault.

    Key considerations for users:

    • Complexity: This is not a one-click installation. It requires manual configuration and learning the underlying mechanics of your Hackintosh setup.
    • Beta Status: OpenCore is frequently updated. Configuration settings (such as specific 'quirks') may change between versions.
    • Primary Goals: The guide focuses on installing macOS on X86 PCs and understanding the technical components that make the installation work.
  2. Choose between Online and Offline macOS installers

    master

    Decide on an installer type based on your current operating system and hardware availability:

    Offline Installer

    • Description: Contains a complete copy of macOS.
    • Platform Requirement: Can only be created using macOS. Windows and Linux lack the necessary APFS/HFS drivers to assemble a full installer.

    Online Installer

    • Description: A small recovery image (~500MB) that downloads macOS from Apple servers after booting.
    • Platform Requirement: Can be created on macOS, Linux, or Windows.
    • Requirement: The target machine must have a working internet connection via a macOS-supported network adapter.
  3. Configure Kernel Kexts for AMD Ryzen/Threadripper

    master

    In the Kernel -> Add section of your config.plist, you specify which kexts to load.

    Critical Requirements:

    • Load Order: Dependencies must load before the plugins that use them. For example, Lilu.kext must be listed before VirtualSMC.kext, AppleALC.kext, or WhateverGreen.kext.
    • ProperTree Tip: Use Cmd/Ctrl + Shift + R in ProperTree to automatically add kexts in the correct order.

    Kext Configuration Keys:

    • Arch: Supported values are Any, i386 (32-bit), and x86_64 (64-bit).
    • BundlePath: The name of the kext (e.g., Lilu.kext).
    • Enabled: Boolean to enable or disable the kext.
    • ExecutablePath: The path to the executable within the kext (e.g., Contents/MacOS/Lilu). Note: .plist only kexts do not require this.
    • MinKernel / MaxKernel: Defines the version range for injection. Use the kernel support table to determine values (e.g., 12.00.00 for OS X 10.8).
    • PlistPath: Path to the info.plist (e.g., Contents/Info.plist).
  4. Download macOS Recovery files using macrecovery.py

    master

    To create a macOS installer on Linux, use the macrecovery.py script from the OpenCorePkg repository.

    1. Navigate to the macrecovery directory within your OpenCore folder.
    2. Run the python3 ./macrecovery.py command with the appropriate -b (Build ID) and -m (Model ID) flags for your target macOS version.

    Important Notes:

    • The downloaded files will be BaseSystem.dmg and BaseSystem.chunklist (or RecoveryImage files). Both function identically for this process.
    • For macOS 12 and above, it is highly recommended to map your USB ports using USBToolBox before installation.
    • CAUTION: XhciPortLimit is broken in macOS 11.3+ and causes boot loops. Use a mapped USB configuration instead.
  5. Convert Clover Firmware Drivers (.efi) to OpenCore

    master

    Firmware drivers must be specified in your config.plist. Note that incorrect drivers can break the booting process.

    Supported Drivers

    Ensure you use drivers from the OpenCorePkg repository. Specifically, for AudioDxe.efi, do not use versions from Goldfish64 or Clover.

    • AudioDxe.efi
    • CsmVideoDxe.efi (Note: BiosVideo.efi from DuetPkg may be preferred)
    • EnhancedFatDxe.efi
    • ExFatDxe.efi / ExFatDxeLegacy.efi
    • GrubEXFAT.efi / GrubISO9660.efi / GrubNTFS.efi / GrubUDF.efi
    • HiiDatabase.efi
    • HfsPlus.efi / HfsPlusLegacy.efi
    • NTFS.efi
    • NvmExpressDxe.efi
    • OpenRuntime.efi
    • OpenUsbKbDxe.efi
    • OsxFatBinaryDrv.efi
    • Ps2MouseDxe.efi
    • TbtForcePower.efi
    • UsbMouseDxe.efi
    • VBoxExt2.efi / VBoxExt4.efi / VBoxHfs.efi / VBoxIso9600.efi
    • XhciDxe.efi

    Drivers no longer needed (Merged into OpenCore)

    Do not include these in your config.plist as they are already integrated:

    • APFS.efi, ApfsDriverLoader.efi, AppleEvent.efi, AppleGenericInput.efi, AppleImageCodec.efi, AppleKeyMapAggregator.efi, AppleUiSupport.efi, AppleUITheme.efi, AptioInputFix.efi, AptioMemoryFix.efi, AudioDxe.efi (use OpenCorePkg version), BootChimeDxe.efi, DataHubDxe.efi, EmuVariableUEFI.efi, EnglishDxe.efi, FirmwareVolume.efi, HashServiceFix.efi, SMCHelper.efi, OcQuirks.efi, VirtualSMC.efi.

    Unsupported Drivers

    Do not use these; they have been replaced or are incompatible:

    • AppleUsbKbDxe.efi $\rightarrow$ use OpenUsbKbDxe.efi
    • FwRuntimeServices.efi $\rightarrow$ use OpenRuntime.efi
    • UsbKbDxe.efi $\rightarrow$ use OpenUsbKbDxe.efi
    • osxaptiofixdrv.efi (and variants like osxaptiofix2drv.efi, osxaptiofix3drv.efi, osxaptiofixdrv-free2000.efi)
    • FSInject.efi
    • OsxFatBinaryDrv.efi
    • OsxLowMemFixDrv.efi
  6. Download macOS using the Command Line Software Update Utility

    master

    If you cannot use the App Store, you can download macOS installers via the terminal. This command lists available full installers and prompts you to enter the version number you wish to download. The downloaded installer will be saved in your /Applications folder.

    softwareupdate --list-full-installers; echo; echo "Please enter version number you wish to download:"; read REPLY; [ -n "$REPLY" ] && softwareupdate --fetch-full-installer --full-installer-version "$REPLY"
  7. Configure ACPI Add for Laptop Sandy Bridge

    master

    To boot macOS on a Sandy Bridge laptop, you must add specific SSDTs to your config.plist under ACPI -> Add. These files must be placed in EFI/OC/ACPI and have a .aml extension.

    Required SSDTs:

    • SSDT-PM: Required for CPU power management (generate using ssdtPRGen.sh during post-install).
    • SSDT-EC: Fixes the embedded controller.
    • SSDT-XOSI: Redirects Windows-specific _OSI calls to macOS (Darwin) to enable features like XHCI.
    • SSDT-PNLF: Fixes brightness control (not required for Intel NUCs).
    • SSDT-IMEI: Required only for Sandy Bridge CPUs with 7-series motherboards to add the missing IMEI device. Not needed for 6-series motherboards.
  8. Configure Intel BIOS settings for Kaby Lake Laptops

    master

    Adjust your Intel BIOS settings as follows:

    Disable:

    • Fast Boot
    • Secure Boot
    • Serial/COM Port
    • Parallel Port
    • VT-d (unless DisableIoMapper is set to YES in Kernel Quirks)
    • CSM (Compatibility Support Module) - Must be OFF
    • Thunderbolt (for initial install)
    • Intel SGX
    • Intel Platform Trust
    • CFG Lock (If no option exists, enable AppleXcpmCfgLock under Kernel -> Quirks)

    Enable:

    • VT-x
    • Above 4G Decoding
    • Hyper-Threading
    • Execute Disable Bit
    • EHCI/XHCI Hand-off
    • OS type: Windows 8.1/10 UEFI Mode (or "Other OS")
    • DVMT Pre-Allocated (iGPU Memory): 64MB or higher
    • SATA Mode: AHCI
  9. Download macOS using Munki's InstallInstallMacOS utility

    master

    Munki's installinstallmacos.py script allows you to select and download specific macOS versions.

    For macOS Monterey 12.3 or above: Apple removed python2.7, so you must install Command Line Tools for Xcode and the xattr module for Python 3 to avoid errors:

    1. Run xcode-select --install in Terminal.
    2. Run pip3 install xattr.

    Execution Command: Use the following command to download the script and run it with python3:

    mkdir -p ~/macOS-installer && cd ~/macOS-installer && curl https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py > installinstallmacos.py && sudo python3 installinstallmacos.py

    Once finished, a DMG containing the installer will be in ~/macOS-installer/. It is recommended to move the Install macOS.app into the /Applications folder.

  10. Install debug kernel and kexts

    master

    After mounting the root partition, install the KDK components and rebuild the kernel cache.

    For Big Sur and newer:

    1. Copy KDK files: sudo ditto /Library/Developer/KDKs/<KDK Version>/System ~/livemount/System
    2. Rebuild cache: sudo kmutil install --volume-root ~/livemount --update-all
    3. Create snapshot: sudo bless --folder ~/livemount/System/Library/CoreServices --bootefi --create-snapshot

    For Catalina and older:

    1. Copy KDK files: sudo ditto /Library/Developer/KDKs/<KDK Version>/System /Volumes/<Target Volume>/System
    2. Rebuild cache: sudo kextcache -invalidate /Volumes/<Target Volume>
    # Big Sur+ Example
    sudo ditto /Library/Developer/KDKs/<KDK Version>/System ~/livemount/System
    sudo kmutil install --volume-root ~/livemount --update-all
    sudo bless --folder ~/livemount/System/Library/CoreServices --bootefi --create-snapshot
  11. Configure OpenCore for AMD Bulldozer (15h) and Jaguar (16h) CPUs

    master

    This guide provides the configuration requirements for AMD CPUs with Family 15h (Bulldozer) and 16h (Jaguar).

    Compatibility:

    • Initial macOS Support: macOS 10.13 High Sierra
    • Last Supported OS: macOS 12 Monterey
    • Note: macOS 13 Ventura and later are not supported for these CPUs.

    Core Principles for OpenCore Configuration:

    • Define all properties: OpenCore does not use fallback defaults; do not delete sections unless explicitly instructed.
    • Do not use configurators: Avoid third-party GUI tools that may add Clover properties or corrupt the config.plist. Use ProperTree instead.
    • Customization: The Sample.plist provided with OpenCore must be manually configured for your specific hardware.