Last active
June 20, 2023 22:30
-
-
Save coolaj86/399b451723c9dfa2ba8d2c3ee13b83cc to your computer and use it in GitHub Desktop.
How to create a bootable macOS High Sierra 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 5200m+ volume | |
hdiutil create -o high-sierra -size 5500m -volname "Install macOS High Sierra" -layout SPUD -fs HFS+J | |
# Rename since this isn't a compressed disk image | |
mv high-sierra.dmg high-sierra.img | |
# Mount the empty disk image | |
hdiutil attach high-sierra.img -noverify -nobrowse -mountpoint '/Volumes/Install macOS High Sierra/' | |
# Create the installer image | |
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --nointeraction \ | |
--volume '/Volumes/Install macOS High Sierra/' | |
# Detach the installer | |
hdiutil detach '/Volumes/Install macOS High Sierra/' | |
# This is already in the correct format | |
mv high-sierra.img high-sierra.iso | |
# Make read-only | |
chmod a-w high-sierra.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