Skip to content

Instantly share code, notes, and snippets.

@julianxhokaxhiu
Created October 3, 2018 12:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save julianxhokaxhiu/08c63e646afdfb91f746e0685baa414a to your computer and use it in GitHub Desktop.
Save julianxhokaxhiu/08c63e646afdfb91f746e0685baa414a to your computer and use it in GitHub Desktop.
Simple bash script to create a Bootable ISO from macOS Mojave Install Image from Mac App Store
#!/bin/bash
#
# How to use:
# 1. copy this shell file somewhere in your Mac
# 2. chmod +x create-iso.sh
# 3. $ sudo ./create-iso.sh
#
# The ISO file will be located in your Desktop when the script will be complete
hdiutil create -o /tmp/Mojave.cdr -size 6000m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/Mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ Mojave
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Mojave.iso
mv ~/Desktop/Mojave.iso.cdr ~/Desktop/Mojave.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment