Last active
February 5, 2021 13:47
-
-
Save coolaj86/d1966cbce851e16ec23786daaae3bcff to your computer and use it in GitHub Desktop.
How to create a bootable macOS Mojave Installer from MacOS. See https://bootableinstaller.com
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
######################### | |
# bootableinstaller.com # | |
######################### | |
set -e | |
set -u | |
# Create an empty | |
hdiutil create -o /tmp/empty -size 8400m -volname "Mojave" -layout SPUD -fs HFS+J | |
# Rename to .img since this isn't a compressed disk image | |
mv /tmp/empty.dmg /tmp/mojave.img | |
# Mount the empty disk image | |
hdiutil attach /tmp/mojave.img -noverify -nobrowse -mountpoint '/Volumes/Install macOS Mojave/' | |
# Create the installer image | |
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --nointeraction --volume '/Volumes/Install macOS Mojave/' | |
# Detach the installer | |
hdiutil detach '/Volumes/Install macOS Mojave/' | |
# This is actually already in the correct format | |
mv /tmp/mojave.img mojave.iso | |
# Many thanks to https://support.apple.com/en-us/HT201372 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment