Skip to content

Instantly share code, notes, and snippets.

@evangwt
Last active January 6, 2022 03:26
Show Gist options
  • Save evangwt/dae8efea4bc06a016b488df2ab9f6fc4 to your computer and use it in GitHub Desktop.
Save evangwt/dae8efea4bc06a016b488df2ab9f6fc4 to your computer and use it in GitHub Desktop.
Create macOS Mojave ISO Image Shell Script
#!/bin/bash
# Create DMG Disk with Terminal
hdiutil create -o /tmp/mojave -size 7900m -volname mojave -layout SPUD -fs HFS+J
# Mount DMG Disk to your macOS
hdiutil attach /tmp/mojave.dmg -noverify -mountpoint /Volumes/mojave
# Create macOS Mojave Installer
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/mojave --nointeraction
# Unmount Disk
hdiutil detach /volumes/Install\ macOS\ mojave
# Convert DMG Disk to ISO Disk
hdiutil convert /tmp/mojave.dmg -format UDTO -o ~/Desktop/mojave.cdr
# Rename and Move Image File to macOS Desktop
mv ~/Desktop/mojave.cdr ~/Desktop/mojave.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment