Created
June 10, 2019 09:36
-
-
Save dwolke/00d374691db0ed8fa6d73205f83454f4 to your computer and use it in GitHub Desktop.
Create a bootable ISO for macOS Mojave
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 | |
hdiutil attach /Applications/Install\ macOS\ Mojave\.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/mojave | |
hdiutil create -o ./MojaveBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach ./MojaveBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
asr restore -source /Applications/Install\ macOS\ Mojave\.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
rm -rf /Volumes/macOS\ Base\ System/System/Installation/Packages | |
mkdir -p /Volumes/macOS\ Base\ System/System/Installation/Packages | |
cp -R /Volumes/mojave/Packages/* /Volumes/macOS\ Base\ System/System/Installation/Packages/ | |
hdiutil detach /Volumes/macOS\ Base\ System/ | |
hdiutil detach /Volumes/mojave/ | |
mv ./MojaveBase.cdr.dmg ./BaseSystem.dmg | |
hdiutil create -o ./Mojave.cdr -size 8965m -layout SPUD -fs HFS+J | |
hdiutil attach ./Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
asr restore -source /Applications/Install\ macOS\ Mojave\.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
cp ./BaseSystem.dmg /Volumes/macOS\ Base\ System | |
hdiutil detach /Volumes/macOS\ Base\ System/ | |
hdiutil convert ./Mojave.cdr.dmg -format UDTO -o ./Mojave.iso | |
mv ./Mojave.iso.cdr ~/Downloads/Mojave.iso | |
rm ./Mojave.cdr.dmg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment