Skip to content

Instantly share code, notes, and snippets.

@DaneWeber
Last active March 14, 2024 23:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaneWeber/cacfc33186e5d076abf480ec7b675bcd to your computer and use it in GitHub Desktop.
Save DaneWeber/cacfc33186e5d076abf480ec7b675bcd to your computer and use it in GitHub Desktop.
Create a MacOS Catalina install ISO
# Download the installer for MacOS Catalina
softwareupdate --fetch-full-installer --full-installer-version 10.15.7
# Create a directory for the VM installer
cd ~/
mkdir VMs
cd VMs
mkdir installers
cd installers
# Steps below from https://www.youtube.com/watch?v=anB5DQ7brf0
# Create a DMG
hdiutil create -o ~/VMs/installers/MacOS_Cats -size 14500mb -volname MacOS_Cats -layout SPUD -fs HFS+J
# Mount the DMG as a Volume
hdiutil attach MacOS_Cats.dmg -noverify -mountpoint /Volumes/MacOS_Cats
# Use createinstallmedia to turn the Volume into an installer
# You'll need to enter your password for the sudo:
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MacOS_Cats --nointeraction
# Eject the volume via the UI. You can see it in Finder on the left.
read -p "Please manually eject the MacOS_Cats volume. Hit Ctrl+C to abort this script. Otherwise press any key to continue. " -n 1 -r
# Convert the DMG to a CDR, Apple's format for CD images.
hdiutil convert MacOS_Cats.dmg -format UDTO -o MacOS_Cats.cdr
# Rename the CDR to ISO as expected by VirtualBox.
mv MacOS_Cats.cdr MacOS_Cats.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment