Skip to content

Instantly share code, notes, and snippets.

@julianxhokaxhiu
Created October 31, 2022 12:31
Show Gist options
  • Save julianxhokaxhiu/42332e67640daad8f18386eeec43ea73 to your computer and use it in GitHub Desktop.
Save julianxhokaxhiu/42332e67640daad8f18386eeec43ea73 to your computer and use it in GitHub Desktop.
Simple bash script to create a Bootable ISO from macOS Ventura Install Image from Mac App Store
#!/usr/bin/env bash
#===========================================================================
# Works only with the official image available in the Mac App Store.
# Make sure you download the official installer before running this script.
#===========================================================================
# Change this at your desire. Sometimes this works out of the box, sometimes not.
# Default size: ~16 GB
DISK_SIZE="15361m"
#===========================================================================
hdiutil create -o /tmp/Ventura.cdr -size $DISK_SIZE -layout SPUD -fs HFS+J
hdiutil attach /tmp/Ventura.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo "/Applications/Install macOS Ventura.app/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
hdiutil detach "/Volumes/Shared Support"
hdiutil detach "/Volumes/Install macOS Ventura"
hdiutil convert /tmp/Ventura.cdr.dmg -format UDTO -o /tmp/Ventura.iso
mv /tmp/Ventura.iso.cdr ~/Desktop/Ventura.iso
rm /tmp/Ventura.cdr.dmg
@shaunbharat
Copy link

Maybe you could add softwareupdate --fetch-full-installer --full-installer-version 13.0.1 before the rest of the lines so the installer doesn't need to be downloaded manually beforehand

@prynhart
Copy link

@shaunbharat Good suggestion, although maybe with the --download flag also ?

I used:

softwareupdate --download --fetch-full-installer

(Was only interested in the latest build, so didn't specify a particular version.)

@spencer1573
Copy link

thank you so much! this worked perfect!

@alex-salnikov
Copy link

$ softwareupdate --list-full-installers

Finding available software
Software Update found the following full installers:
* Title: macOS Sequoia, Version: 15.0.1, Size: 14138482KiB, Build: 24A348, Deferred: NO
* Title: macOS Sequoia, Version: 15.0, Size: 14138558KiB, Build: 24A335, Deferred: NO
* Title: macOS Sonoma, Version: 14.7, Size: 13343514KiB, Build: 23H124, Deferred: NO
* Title: macOS Sonoma, Version: 14.6.1, Size: 13340696KiB, Build: 23G93, Deferred: NO
* Title: macOS Sonoma, Version: 14.6, Size: 13339695KiB, Build: 23G80, Deferred: NO
* Title: macOS Sonoma, Version: 14.4.1, Size: 13298513KiB, Build: 23E224, Deferred: NO
...

.. & thank you all !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment