Skip to content

Instantly share code, notes, and snippets.

@devomman
Last active February 16, 2024 14:39
Show Gist options
  • Save devomman/03d1ac3fdc5c232c8fcb71d2614f203f to your computer and use it in GitHub Desktop.
Save devomman/03d1ac3fdc5c232c8fcb71d2614f203f to your computer and use it in GitHub Desktop.
macOS Command for ISO file
  • Sonoma.iso
hdiutil create -o /tmp/Sonoma -size 16384m -volname Sonoma -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sonoma.dmg -noverify -mountpoint /Volumes/Sonoma
sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/Sonoma --nointeraction
hdiutil eject -force /Volumes/Install\ macOS\ Sonoma
hdiutil convert /tmp/Sonoma.dmg -format UDTO -o ~/Desktop/Sonoma
mv -v ~/Desktop/Sonoma.cdr ~/Desktop/Sonoma.iso
rm -fv /tmp/Sonoma.dmg
  • Ventura.iso
hdiutil create -o /tmp/Ventura -size 14384m -volname Ventura -layout SPUD -fs HFS+J
hdiutil attach /tmp/Ventura.dmg -noverify -mountpoint /Volumes/Ventura
sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/Ventura --nointeraction
hdiutil eject -force /Volumes/Install\ macOS\ Ventura
hdiutil convert /tmp/Ventura.dmg -format UDTO -o ~/Desktop/Ventura
mv -v ~/Desktop/Ventura.cdr ~/Desktop/Ventura.iso
rm -fv /tmp/Ventura.dmg
  • Monterey.iso
hdiutil create -o /tmp/Monterey -size 16384m -volname Monterey -layout SPUD -fs HFS+J
hdiutil attach /tmp/Monterey.dmg -noverify -mountpoint /Volumes/Monterey
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Monterey --nointeraction
hdiutil eject -force /Volumes/Install\ macOS\ Monterey
hdiutil convert /tmp/Monterey.dmg -format UDTO -o ~/Desktop/Monterey
mv -v ~/Desktop/Monterey.cdr ~/Desktop/Monterey.iso
rm -fv /tmp/Monterey.dmg
  • BigSur.iso
hdiutil create -o /tmp/BigSur -size 13500m -volname BigSur -layout SPUD -fs HFS+J
hdiutil attach /tmp/BigSur.dmg -noverify -mountpoint /Volumes/BigSur
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/BigSur --nointeraction
hdiutil eject -force /Volumes/Install\ macOS\ Big\ Sur
hdiutil convert /tmp/BigSur.dmg -format UDTO -o ~/Desktop/BigSur
mv -v ~/Desktop/BigSur.cdr ~/Desktop/BigSur.iso
rm -fv /tmp/BigSur.dmg
  • Catelina.iso
Create a DMG Disk Image:
hdiutil create -o /tmp/Catalina -size 8500m -volname Catalina -layout SPUD -fs HFS+J
Mount it to your macOS:
hdiutil attach /tmp/Catalina.dmg -noverify -mountpoint /Volumes/Catalina
Create macOS Catalina Installer:
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/Catalina --nointeraction
Unmount Catalina Disk:
hdiutil eject -force /volumes/Install\ macOS\ Catalina
Convert the DMG file to an ISO file:
hdiutil convert /tmp/Catalina.dmg -format UDTO -o ~/Desktop/Catalina.cdr
Rename and Move to Desktop:
mv ~/Desktop/Catalina.cdr ~/Desktop/Catalina.iso
Clean Temp File:
rm -fv /tmp/Catalina.dmg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment