Last active
January 6, 2022 03:26
-
-
Save evangwt/dae8efea4bc06a016b488df2ab9f6fc4 to your computer and use it in GitHub Desktop.
Create macOS Mojave ISO Image Shell Script
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
#!/bin/bash | |
# Create DMG Disk with Terminal | |
hdiutil create -o /tmp/mojave -size 7900m -volname mojave -layout SPUD -fs HFS+J | |
# Mount DMG Disk to your macOS | |
hdiutil attach /tmp/mojave.dmg -noverify -mountpoint /Volumes/mojave | |
# Create macOS Mojave Installer | |
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/mojave --nointeraction | |
# Unmount Disk | |
hdiutil detach /volumes/Install\ macOS\ mojave | |
# Convert DMG Disk to ISO Disk | |
hdiutil convert /tmp/mojave.dmg -format UDTO -o ~/Desktop/mojave.cdr | |
# Rename and Move Image File to macOS Desktop | |
mv ~/Desktop/mojave.cdr ~/Desktop/mojave.iso |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment