Last active
October 17, 2024 08:46
-
-
Save julianxhokaxhiu/d8c4a986ddb1cfc87e19a50eb238217f to your computer and use it in GitHub Desktop.
Simple bash script to create a Bootable ISO from macOS Catalina Install Image from Mac App Store
This file contains hidden or 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. | |
#=========================================================================== | |
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\ Catalina.app/Contents/Resources/createinstallmedia --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 |
Tested it with the Big Sur installer from Apple, making the obvious naming and sizing adjustments (12700m worked for me) and it also works fine, thank you.
I've created the relative script for Big Sur and you can find it if you're interested: https://gist.github.com/julianxhokaxhiu/286017b9872474d2c9b9fa090f6802bf
Glad you made it up yourself :) Cheers
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
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
I do aim for the same. This is why I lowered the size back down again when I saw that 9000m was fitting. But maybe today is no more because of security patches and such. So 9200m sound plausible to me.