Official way to obtain an OS X ISO file

Does not work on Mavericks and Yosemite

There is no way to legitimately get the file without having access to a Mac, and a licensed copy of the OS via a purchase (unless you are a member of the Developer Program, for which you can expect to pay far more than the cost of the OS, what with it being free).

But if you can blag some access time on a Mac, then you can download the OS from the Mac App Store (You may need to Option+Click the Purchased section to force it to reshow them if you have downloaded them at least once already). Once you have the installer downloaded and sat in your dock, you can simply pick it apart and get to the image file that is inside it.

This is the official way to get the file direct from Apple, but there is still work to do to make it into an ISO:

  1. Once you’ve downloaded Mavericks, find the installer on your Mac. It’s called Install OS X Mavericks.app and it should have been downloaded to your main Applications folder or be sat in your Dock.

  2. Right-click (or Control+click) the installer, and choose Show Package Contents from the resulting contextual menu.

  3. In the folder that appears, open Contents > Shared Support; you’ll see a disk image file called InstallESD.dmg

    This dmg file is in essence an ISO file in s slightly different format. We'll need to convert it. Open up Disk Utility and:

  4. From the menu bar, select Images > Convert and point it to your .dmg file

  5. In the Save As dialog that follows, select DVD/CD master. Disk Utility will insist on saving the new ISO as a .cdr file, but it is really an ISO.

  6. When complete, you can rename it to .iso in Finder.

  7. Use an external HD or thumb drive which is in ExFAT format (Compared to FAT format, this allows for single files larger than 4GB). Copy the .iso file and access it on the other system.

For clarity, you can do the above on any version of OS X from 10.6.8 (Snow Leopard) onwards, so you can use an old image to get hold of a new image for example, if you have access to a different OS version than Mavericks.


The answer above by @stuffe won't work on Mavericks. Apparently Apple has changed the format of the ESD image and it's no longer bootable.

Looking around I've found a couple of pointers on how to do the necessary conversions to get the result as something you can boot a VM off.

Depending on what's the purpose of the ISO file, if it's to reinstall a computer, it might be more useful to use a Bootable USB- For that, check How to: Create a bootable installation for OS X Mavericks 10.9 and above.

For the ISO file itself, I've mostly used the information found on this post on the InsanelyMac site, augmented with the information/tip on creating a Recovery Partition found on the Apple Support Communities.

Basically the process is to get the ESD image, and rebuild it to include some info that is now packaged as symlinks, and get that out as a ISO file. The author of the InsanelyMac post has automated the process into a bash script, that I'm pasting here for convenience/reference:

#!/bin/bash
ESD=$1
TMP=$2

if [ -z "$ESD" ] || [ -z "$TMP" ]; then
    echo usage: "'$0' /path/to/esd /path/to/tmpdir"
    exit 1
fi
if ! [ -e "$ESD" ]; then
    echo "file '$ESD' does not exist"
    exit 1
fi
if ! [ -e "$TMP" ]; then
    echo "dir '$TMP' does not exist"
    exit 1
fi

MPAPP=/Volumes/install_app
MPIMG=/Volumes/install_img
IMGSPARSE=$TMP/install.sparseimage
IMGDVD=$TMP/install.cdr

detach_all() {
  if [ -d "$MPAPP" ]; then hdiutil detach "$MPAPP"; fi
  if [ -d "$MPIMG" ]; then hdiutil detach "$MPIMG"; fi
}
exit_all() {
  echo +++ Command returned with error, aborting ...
  exit 2
}

trap detach_all EXIT
trap exit_all ERR

echo +++ Trying to unmount anything from previous run
detach_all

echo +++ Mount the installer image
hdiutil attach "$ESD" -noverify -nobrowse -readonly -mountpoint "$MPAPP"


echo +++ Convert the boot image to a sparse bundle
rm -f "$IMGSPARSE"
hdiutil convert "$MPAPP"/BaseSystem.dmg -format UDSP -o "$IMGSPARSE"


echo +++ Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g "$IMGSPARSE"

echo +++ Mount the sparse bundle for package addition
hdiutil attach "$IMGSPARSE" -noverify -nobrowse -readwrite -mountpoint "$MPIMG"

echo +++ Remove Package link and replace with actual files
rm -f "$MPIMG"/System/Installation/Packages
cp -rp "$MPAPP"/Packages "$MPIMG"/System/Installation/

echo +++ Unmount the installer image
hdiutil detach "$MPAPP"

echo +++ Unmount the sparse bundle
hdiutil detach "$MPIMG"

echo +++ Resize the partition in the sparse bundle to remove any free space
hdiutil resize -sectors min "$IMGSPARSE"

echo +++ Convert the sparse bundle to ISO/CD master
rm -f "$IMGDVD"
hdiutil convert "$IMGSPARSE" -format UDTO -o "$IMGDVD"

echo +++ Remove the sparse bundle
rm "$IMGSPARSE"

echo "Done"
echo "Find your DVD at '$IMGDVD'"

I can confirm that the resulting image is indeed bootable within Fusion; it's in the process of being installed so I'm yet to see whether other "tricks" are needed to make it work (for example, if the result is lacking a Recovery Partition as stated in some of the threads).

UPDATE: The resulting VM boots, and appears to work "well". I have used the method described to create a recovery partition, but even though Carbon Copy "sees" a Recovery Partition on the (virtual) HD, it doesn't appear to work all that well, as booting the VM with Option key pressed doesn't do anything. Will look into it if I have time, but for the time being it appears that the .iso file I got is working.