set -e
set -u
# Create an empty
hdiutil create -o /tmp/empty -size 8400m -volname "Monterey" -layout SPUD -fs HFS+J
# Rename to .img since this isn't a compressed disk image
mv /tmp/empty.dmg /tmp/monterey.img
# Mount the empty disk image
hdiutil attach /tmp/monterey.img -noverify -nobrowse -mountpoint '/Volumes/Install macOS Monterey/'
# Create the installer image
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --nointeraction --volume '/Volumes/Install macOS Monterey/'
# Detach the installer
hdiutil detach '/Volumes/Install macOS Monterey/'
# This is actually already in the correct format
mv /tmp/monterey.img monterey.iso
Created
October 27, 2021 06:18
-
-
Save coolaj86/b465bc3906419dcb6bc2bab70ae3fe19 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hdiutil create -o /tmp/empty -size 20000m -volname "Monterey" -layout SPUD -fs HFS+J fixes the error