I would like to create a bootable ISO image to do a clean install on VMware.
The code from this thread worked perfectly for Yosemite and the first beta of El Capitan https://forums.macrumors.com/threads/how-to-create-yosemite-os-x-bootable-dvd.1763439/
Now it doesn't work anymore. When I boot to the created ISO image, it goes into the EFI shell menu, as if the ISO image weren't bootable.
I'd love to see the experts out there tweak it for El Capitan
The code from this thread worked perfectly for Yosemite and the first beta of El Capitan https://forums.macrumors.com/threads/how-to-create-yosemite-os-x-bootable-dvd.1763439/
Code:
#!/bin/bash
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint
/Volumes/install_app
# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/ElCapitan
# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 10g /tmp/ElCapitan.sparseimage
# Mount the sparse bundle for package addition
hdiutil attach /tmp/ElCapitan.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build
# Remove Package link and replace with actual files
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/
# Copy ElCapitan installer dependencies
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/install_build/BaseSystem.chunklist
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/install_build/BaseSystem.dmg
# Unmount the installer image
hdiutil detach /Volumes/install_app
# Unmount the sparse bundle
hdiutil detach /Volumes/install_build
# Resize the partition in the sparse bundle to remove any free space
hdiutil resize -size `hdiutil resize -limits /tmp/ElCapitan.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/ElCapitan.sparseimage
# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/ElCapitan.sparseimage -format UDTO -o /tmp/ElCapitan
# Remove the sparse bundle
rm /tmp/ElCapitan.sparseimage
# Rename the ISO and move it to the desktop
mv /tmp/ElCapitan.cdr ~/Desktop/ElCapitan.iso
Now it doesn't work anymore. When I boot to the created ISO image, it goes into the EFI shell menu, as if the ISO image weren't bootable.
I'd love to see the experts out there tweak it for El Capitan