Skip to content

Instantly share code, notes, and snippets.

@krzysdb
Last active December 8, 2015 11:17
Show Gist options
  • Save krzysdb/5be2389c64d68d65e4cc to your computer and use it in GitHub Desktop.
Save krzysdb/5be2389c64d68d65e4cc to your computer and use it in GitHub Desktop.
Create Bootable ISO from El Capitan App.(PROBLEMS: Dvd is created but installer not work properly)
#!/usr/bin/env bash
# Original: http://www.insanelymac.com/forum/topic/308533-how-to-create-a-bootable-el-capitan-iso-fo-vmware/
echo "Mount the installer image"
sudo hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
echo "Create the ElCapitan Blank ISO Image of 7316mb with a Single Partition - Apple Partition Map"
hdiutil create -o /tmp/ElCapitan.cdr -size 7316m -layout SPUD -fs HFS+J
echo "Mount the ElCapitan Blank ISO Image"
hdiutil attach /tmp/ElCapitan.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
echo "Restore the Base System into the ElCapitan Blank ISO Image"
asr restore --source /Volumes/install_app/BaseSystem.dmg --target /Volumes/install_build --noprompt --noverify --erase
echo "Remove Package link and replace with actual files"
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -Rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
echo "Copy El Capitan installer dependencies"
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
echo "Unmount the installer image"
hdiutil detach /Volumes/install_app
echo "Unmount the ElCapitan ISO Image"
hdiutil detach /Volumes/OS\ X\ Base\ System/
echo "Convert the ElCapitan ISO Image to ISO/CD master (Optional)"
hdiutil convert /tmp/ElCapitan.cdr.dmg -format UDTO -o /tmp/ElCapitan.iso
echo "Rename the ElCapitan ISO Image and move it to the desktop"
mv /tmp/ElCapitan.iso.cdr ~/Desktop/ElCapitan.iso
echo done
@krzysdb
Copy link
Author

krzysdb commented Dec 8, 2015

No time to look why making bootable dvd doesn't work.Best way is to use usb to boot and install El Capitan

  1. Plug usb and it is mounted as /Volumes/Untitled
  2. El Capitan installer is in /Applications
  3. Run command
    sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment