Last active
June 18, 2023 08:11
-
-
Save julianxhokaxhiu/286017b9872474d2c9b9fa090f6802bf to your computer and use it in GitHub Desktop.
Simple bash script to create a Bootable ISO from macOS Big Sur Install Image from Mac App Store
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: ~13.5 GB | |
DISK_SIZE="13000m" | |
#=========================================================================== | |
hdiutil create -o /tmp/BigSur.cdr -size $DISK_SIZE -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/BigSur.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo "/Applications/Install macOS Big Sur.app/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction | |
hdiutil detach "/Volumes/Shared Support 1" | |
hdiutil detach "/Volumes/Shared Support" | |
hdiutil detach "/Volumes/Install macOS Big Sur" | |
hdiutil convert /tmp/BigSur.cdr.dmg -format UDTO -o /tmp/BigSur.iso | |
mv /tmp/BigSur.iso.cdr ~/Desktop/BigSur.iso | |
rm /tmp/BigSur.cdr.dmg |
Shrinked down to ~13.5GB now required for 11.1
great job Julian. Love your contribution.
Thank you! I changed a bit and it worked to make a Monterey ISO. Increased the size of the disk to 15361M, replaced BigSur / Big Sur for Monterey.
Thanks for the feedback, I'll now create the new gist for Monterey on top of your suggestions. Appreciated.
//EDIT: Done: https://gist.github.com/julianxhokaxhiu/d26a8974eb0d723285c6b06c99d7207e
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, I've personally tested this and works fine.