Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save volure/875328a599fbb334d8801b2d64bff03e to your computer and use it in GitHub Desktop.
Save volure/875328a599fbb334d8801b2d64bff03e to your computer and use it in GitHub Desktop.
hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/El\ Capitan
hdiutil resize -size 9g /tmp/El\ Capitan.sparseimage
hdiutil attach /tmp/El\ Capitan.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/install_build
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/install_build
hdiutil detach /Volumes/install_app
hdiutil detach /Volumes/install_build
hdiutil resize -size `hdiutil resize -limits /tmp/El\ Capitan.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/El\ Capitan.sparseimage
hdiutil convert /tmp/El\ Capitan.sparseimage -format UDTO -o /tmp/El\ Capitan
rm /tmp/El\ Capitan.sparseimage
mv /tmp/El\ Capitan.cdr ~/Desktop/El\ Capitan.iso
sudo drutil burn ~/Desktop/El\ Capitan.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment