Skip to content

Instantly share code, notes, and snippets.

Last active November 8, 2023 10:09
  • Star 33 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Simple bash script to create a Bootable ISO from macOS Catalina 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.
hdiutil create -o /tmp/Catalina.cdr -size 9000m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ --volume /Volumes/install_build --nointeraction
hdiutil detach "/Volumes/Install macOS Catalina"
hdiutil convert /tmp/Catalina.cdr.dmg -format UDTO -o /tmp/Catalina.iso
mv /tmp/Catalina.iso.cdr ~/Desktop/Catalina.iso
rm /tmp/Catalina.cdr.dmg
Copy link

julianxhokaxhiu commented Nov 17, 2020

I've created the relative script for Big Sur and you can find it if you're interested:

Glad you made it up yourself :) Cheers

Copy link

ammgws commented Aug 31, 2023

Instead of specifying the size, I tried -type SPARSE and was able to have the ISO be the perfect size:

>hdiutil create -o /tmp/Catalina.cdr -type SPARSE -layout SPUD -fs HFS+J

I haven't been able to boot into it yet, but don't think it's because of -type SPARSE

Copy link

Logically the parameter makes sense, if someone could please test the resulting ISO I'd be happy to update the script. Thank you for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment