Skip to content

Instantly share code, notes, and snippets.

@MrTechGadget
Forked from agentsim/highsierra_bootable.sh
Last active November 26, 2017 02:55
Show Gist options
  • Save MrTechGadget/95653e3673fe13b06c2b32bd159a42c9 to your computer and use it in GitHub Desktop.
Save MrTechGadget/95653e3673fe13b06c2b32bd159a42c9 to your computer and use it in GitHub Desktop.
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
# Restore the 10.13 Installer's BaseSystem.dmg into file system and place custom BaseSystem.dmg into the root
hdiutil create -o /Volumes/Untitled/HighSierra.cdr -size 8965m -layout SPUD -fs HFS+J
hdiutil attach /Volumes/Untitled/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp /tmp/BaseSystem.dmg /Volumes/OS\ X\ Base\ System
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil convert /Volumes/Untitled/HighSierra.cdr.dmg -format UDTO -o /Volumes/Untitled/HighSierra.iso
mv /Volumes/Untitled/HighSierra.iso.cdr /Volumes/Untitled/HighSierra.iso
rm /Volumes/Untitled/HighSierra.cdr.dmg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment