Created
November 4, 2015 02:51
-
-
Save mattieb/d6e0aa895b30106967f0 to your computer and use it in GitHub Desktop.
Create a DMG installer for installing El Capitan into a VM
This file contains hidden or 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
# Based on Tim Sutton's prepare_iso.sh from the excellent osx-vm-templates | |
# <https://github.com/timsutton/osx-vm-templates/blob/master/prepare_iso/prepare_iso.sh> | |
hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg | |
hdiutil create -o tmp.dmg -size 10g -layout SPUD -fs HFS+J | |
hdiutil attach tmp.dmg | |
asr restore --source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg --target /Volumes/untitled --erase | |
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages | |
cp -Rv /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation/ | |
cp -v /Volumes/OS\ X\ Install\ ESD/BaseSystem.* /Volumes/OS\ X\ Base\ System/ | |
hdiutil detach /Volumes/OS\ X\ Base\ System | |
hdiutil detach /Volumes/OS\ X\ Install\ ESD | |
hdiutil convert -format UDZO -o InstallOSXElCapitan.dmg tmp.dmg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment