# Making the installer in macOS

While you don't need a fresh install of macOS to use OpenCore, some users prefer having a fresh slate with their boot manager upgrades.

To start we'll want to grab ourselves a copy of macOS. You can skip this and head to formatting the USB if you're just making a bootable OpenCore stick and not an installer. For everyone else, you can either download macOS from the App Store or with Munki's script.

# Downloading macOS: Modern OS

This method allows you to download macOS 10.13 and newer, for 10.12 and older see Downloading macOS: Legacy OS.

From a macOS machine that meets the requirements of the OS version you want to install, go directly to the App Store:

For machines that need a specific OS release or can't download from the App Store:

# Using App Store

From a macOS machine that meets the requirements of the OS version you want to install, go directly to the App Store and download the desired OS release and continue to Setting up the installer.

# Command Line Software Update Utility

Open a terminal window then copy and paste the below command:

softwareupdate --list-full-installers;echo;echo "Please enter version number you wish to download:";read;$(if [ -n "$REPLY" ]; then; echo "softwareupdate --fetch-full-installer --full-installer-version "$REPLY; fi);

This gives you a list of available releases you can choose from. Once downloaded it will be saved in your Applications folder. You can continue to Setting up the installer.

# Munki's InstallInstallMacOS utility

Note for users running macOS Monterey 12.3 or above

Starting from macOS Monterey 12.3, Apple removed support for python2.7, so without it installinstallmacos.py will throw the following error:

This tool requires the Python xattr module. Perhaps run 'pip install xattr' to install it.

To overcome the issue, we recommend to install Command Line Tools for Xcode by running xcode-select --install in a Terminal and then run pip3 install xattr

After that you can run the same command below but with python3 instead of just python:

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

In order to run it, just copy and paste the below command in a terminal window:

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

As you can see, we get a nice list of macOS installers. If you need a particular versions of macOS, you can select it by typing the number next to it. For this example we'll choose 10:

This is going to take a while as we're downloading the entire 8GB+ macOS installer, so it's highly recommended to read the rest of the guide while you wait.

Once finished, you'll find in your ~/macOS-Installer/ folder a DMG containing the macOS Installer, called Install_macOS_11.1-20C69.dmg for example. Mount it and you'll find the installer application.

  • Note: We recommend to move the Install macOS.app into the /Applications folder, as we'll be executing commands from there.
  • Note 2: Running Cmd+Shift+G in Finder will allow you to easily jump to ~/macOS-installer

From here, jump to Setting up the installer to finish your work. If you want to check the integrity of your download, you can check this repository of checksums (opens new window), although do note that these are crowdsourced checksums and may not be a reliable way to check for authenticity.

# Downloading macOS: Legacy OS

# Setting up the installer

Now we'll be formatting the USB to prep for both the macOS installer and OpenCore. We'll want to use macOS Extended (HFS+) with a GUID partition map. This will create two partitions: the main MyVolume and a second called EFI which is used as a boot partition where your firmware will check for boot files.

  • Note 1: The EFI partition created by formatting the USB is hidden until you mount it. This will be mounted later when Setting up OpenCore's EFI environment
  • Note 2: By default, Disk Utility only shows partitions – press Cmd/Win+2 to show all devices (alternatively you can press the View button)
  • Note 3: Users following "Legacy macOS: Online Method" section can skip to Setting up OpenCore's EFI environment

Formatting the USB

Next run the createinstallmedia command provided by Apple (opens new window). Note that the command is made for USB's formatted with the name MyVolume:

sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Note for users on Apple Silicon installing macOS older than Big Sur

If the createinstallmedia fails with zsh: killed or Killed: 9 then it's most likely an issue with the installer's code signature. To fix this, you can run the following command:

cd /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/
codesign -s - -f --deep /Applications/Install\ macOS\ Big\ Sur.app

You will need the command line tools for Xcode installed:

xcode-select --install

This will take some time so you may want to grab a coffee or continue reading the guide (to be fair you really shouldn't be following this guide step by step without reading the whole thing first).

You can also replace the createinstallmedia path with that of where your installer's located (same idea with the drive name).

Legacy createinstallmedia Commands

Pulled from Apple's own site: How to create a bootable installer for macOS (opens new window)

# Ventura
sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

# Monterey
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

# Big Sur
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

# Catalina
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

# Mojave
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

# High Sierra
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume

# Sierra
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ macOS\ Sierra.app

# El Capitan
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

# Yosemite
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Yosemite.app

# Mavericks
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction

# Legacy Setup

For systems not supporting UEFI boot, see below:

Setting up Legacy Boot

To start, you need the following:

  • BootInstall_IA32.tool or BootInstall_X64.tool
    • This can be found in OpenCorePkg under /Utilties/LegacyBoot/
  • Install USB(Created above)

Within your OpenCore build folder, navigate to Utilities/LegacyBoot. Here you'll find a file called BootInstall_ARCH.tool. What this does is install DuetPkg to your desired drive.

BootInstall Location

Now run this tool in terminal with sudo(This tool will likely fail otherwise):

# Replace X64 with IA32 if you have a 32-Bit CPU
sudo ~/Downloads/OpenCore/Utilities/legacyBoot/BootInstall_X64.tool

Disk Selection/writing new MBR

This will give you a list of available disks, choose yours and you will be prompted to write a new MBR. Choose yes[y] and you'll be finished.

Finished Installer

Base EFI

This will provide you with an EFI partition with either a bootia32 or bootx64 file

# Setting up OpenCore's EFI environment

Setting up OpenCore's EFI environment is simple – all you need to do is mount our EFI system partition. This is automatically made when we format with GUID but is unmounted by default, this is where our friend MountEFI (opens new window) comes in:

MountEFI

You'll notice that once we open the EFI partition, it's empty. This is where the fun begins.

Empty EFI partition

# Now with all of this done, head to Setting up the EFI to finish up your work