Last active
October 20, 2018 12:48
-
-
Save skube/dc3dfd06fee46b2c1de26fcfb4a93af6 to your computer and use it in GitHub Desktop.
Bash script to create a Bootable ISO from macOS Install Image from Mac App Store
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 | |
# | |
# Bash script to create a Bootable ISO from macOS Install Image from Mac App Store | |
# Version: macOS v10.13 (High Sierra) | |
# | |
# INSTRUCTIONS: | |
# - save as a text file | |
# - open terminal | |
# - on command line, enter: sh bootable_macos_highsierra.sh | |
# | |
# DOES NOT WORK YET! | |
hdiutil attach /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil create -o /tmp/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build | |
asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages | |
cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/ | |
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist | |
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg | |
hdiutil detach /Volumes/install_app | |
hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
hdiutil convert /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso | |
mv /tmp/HighSierra.iso.cdr ~/Desktop/HIghSierra.iso |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment