Skip to content

Instantly share code, notes, and snippets.

@interstateone
Forked from jamieparfet/macOS-mojave-iso.sh
Last active June 23, 2020 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save interstateone/5dfced401abc2c8896ec2800fdb3bc7d to your computer and use it in GitHub Desktop.
Save interstateone/5dfced401abc2c8896ec2800fdb3bc7d to your computer and use it in GitHub Desktop.
Create an ISO from the mojave installer app
#!/bin/bash
# This assumes that the ~10GB Big Sur installer is in the /Applications folder.
hdiutil create -o /tmp/bigsur.cdr -size 10g -layout SPUD -fs HFS+J
hdiutil attach /tmp/bigsur.cdr.dmg -noverify -mountpoint /Volumes/InstallBigSur
# You need to manually erase the new volume in Disk Utility otherwise the next command will fail
# The use of /Volumes/untitled is deliberate, because that's what its name will be after the preceding commands
# Not sure why that is
sudo /Applications/Install\ macOS\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/untitled
mv /tmp/bigsur.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ Beta
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/bigsur.iso
mv ~/Desktop/bigsur.iso.cdr ~/Desktop/bigsur.iso
rm ~/Desktop/InstallSystem.dmg
# Now there should be an ISO on your desktop called bigsur.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment