Skip to content

Instantly share code, notes, and snippets.

@theguly
Forked from julianxhokaxhiu/create-iso.sh
Last active January 4, 2024 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save theguly/32d39d30ed640db63dfce307d436c2fa to your computer and use it in GitHub Desktop.
Save theguly/32d39d30ed640db63dfce307d436c2fa 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.
#===========================================================================
# softwareupdate --fetch-full-installer --full-installer-version 13.6.1
# softwareupdate --fetch-full-installer --full-installer-version
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment