OS X Yosemite In Bootable ISO format

Maybe you’re something like I am, and want to have a bootable ISO of OS X Yosemite to run under a VM on a Mac. (It’s not going to do very well on it’s own with PC architecture)
Nothing fancy, just an install that you don’t need to bend over backwards and pray to the deity of choice to make happen.  After looking around (since I’ve only really done it directly to USB flash and not to ISO really) I ran across this script made by someone else who wanted the same thing.  I don’t have the URL of where I got it, but I wanted to share.  Keep in mind, you will need to first download Yosemite through the Apple App Store, which will place it in the Applications folder.  Leave it there for the script to do it’s thing.

Just copy and paste this into a script and run it from the command line.  It will make an ISO called Yosemite.iso right on your desktop.  I have an SSD drive and it took approximately 2-3 minutes to complete.  I’m thinking on a regular harddrive with the amount of disk activity it will take longer, but well worth the wait.

Here it is (it’s all there, just not displaying properly.  When you select it all, it will copy fine):


# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ Yosemite.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/Yosemite

# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Yosemite.sparseimage

# Mount the sparse bundle for package addition
hdiutil attach /tmp/Yosemite.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 Yosemite 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/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Yosemite.sparseimage

# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite

# Remove the sparse bundle
rm /tmp/Yosemite.sparseimage

# Rename the ISO and move it to the desktop
mv /tmp/Yosemite.cdr ~/Desktop/Yosemite.iso

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.