Skip to content

Instantly share code, notes, and snippets.

@julianxhokaxhiu
Last active June 18, 2023 08:11
Show Gist options
  • Save julianxhokaxhiu/286017b9872474d2c9b9fa090f6802bf to your computer and use it in GitHub Desktop.
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
#!/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
@entianbucali
Copy link

great job Julian. Love your contribution.

@cangaceirobrabo
Copy link

cangaceirobrabo commented Oct 31, 2021

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.

@julianxhokaxhiu
Copy link
Author

julianxhokaxhiu commented Oct 31, 2021

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