Created
December 14, 2015 04:42
-
-
Save kfriend/0c81cd0b0bcd5dec2b9f to your computer and use it in GitHub Desktop.
OS X: Create El Capitan ISO compatible with VirtualBox
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
#!/usr/bin/env bash | |
# All credit goes to http://apple.stackexchange.com/a/211722, and thanks to Jesse Web | |
# for posting the article at http://apple.stackexchange.com/questions/198737/install-el-capitan-in-virtual-box-for-testing-purposes | |
hdiutil attach "/Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" -noverify -nobrowse -mountpoint /Volumes/esd | |
hdiutil create -o elcapitan.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach elcapitan.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/iso | |
asr restore -source /Volumes/esd/BaseSystem.dmg -target /Volumes/iso -noprompt -noverify -erase | |
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages | |
cp -rp /Volumes/esd/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
cp -rp /Volumes/esd/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/ | |
cp -rp /Volumes/esd/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/ | |
hdiutil detach /Volumes/esd | |
hdiutil detach /Volumes/OS\ X\ Base\ System | |
hdiutil convert elcapitan.cdr.dmg -format UDTO -o elcapitan.iso | |
mv elcapitan.iso.cdr elcapitan.iso |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment