Skip to content

Instantly share code, notes, and snippets.

@christopher-baek
Created February 3, 2022 17:02
Show Gist options
  • Save christopher-baek/e63cdccfd0817935b6a55301cfda9136 to your computer and use it in GitHub Desktop.
Save christopher-baek/e63cdccfd0817935b6a55301cfda9136 to your computer and use it in GitHub Desktop.

Create DMG Disk Image

sudo hdiutil create -o /tmp/disk -size 16384m -volname MacOSMonterey -layout SPUD -fs HFS+J

Mount Disk Image

sudo hdiutil attach /tmp/disk.dmg -noverify -mountpoint /tmp/disk

Create Install Media

sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /tmp/disk --nointeraction

Eject Install Media

hdiutil eject /Volumes/Install\ macOS\ Monterey

Convert DMG Disk Image to CD/DVD Master

hdiutil convert /tmp/disk.dmg -format UDTO -o /tmp/disk

Rename For Sanity

mv /tmp/disk.cdr /tmp/disk.iso

Clean Up

mv /tmp/disk.iso ~/Desktop
sudo rm /tmp/disk.dmg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment