InstaDMG and Mountain Lion

This is mainly just a followup to derflounder’s excellent post on the same topic for 10.7. For the most part, the details on that page work perfectly for OS X 10.8, but I felt it was a good idea to update it just a little and basically repost it here. After all, Googling for this topic currently shows quite a few people specifically asking about InstaDMG and 10.8, but very few people answering. The reason there aren’t many answers? It’s really not that hard to do!


  1. Create a Vanilla 10.8 DMG that is hardware agnostic using InstaDMG
  2. Create a Vanilla 10.8 Recovery partition that is also hardware agnostic using the command line ‘installer’ program
  3. Wrap both DMGs into a single workflow in DeployStudio
  4. Go to RiverRoad

Setting Up Your Environment

This is pretty much the same as what’s linked in the parent article, but with a few version changes. Here’s what I’m using:

Creating a Vanilla 10.8 DMG

  1. Let’s assume you’ve downloaded instadmg, uncompressed it, but left it in your ~/Downloads folder. Yes, let’s assume you’re as lazy as I am.
  2. Right click your Install Mac OS X Mountain icon and choose Show Package Contents
  3. In the resulting window, copy Contents/SharedSupport/InstallESD.dmg into ~/Downloads/instadmg/InstallerFiles/BaseOS/
  4. In Terminal, run the following command: sudo ~/Downloads/instadmg/instadmg.bash
  5. Once complete, you’ll find ~/Downloads/instadmg/OutputFiles/<today’s date=””>.dmg – this is the never booted version of 10.8 that you’ll be deploying to machines.
  6. As recommended in the original post, reboot your computer at this point to make sure there are no artifacts left over from InstaDMG’s run.

Creating the 10.8 Recovery Partition

This step is a little misleading. We’ll be installing a very minimal base OS X installation on the Restore Build volume and then using DeployStudio to extract the recovery partition. So don’t panic if the image you end up with from this step is 5 or 6 gigabytes. Once DeployStudio is done, the recovery partition will be less than 1GB in size.

As mentioned in the Setting Up Your Environment section at the top, you’ll need to either plug in your external drive at this point, or use Disk to create an 8GB partition at the end of your computer’s internal disk. For the sake of this post, call the new volume “Restore Build”.

Creating Choices.xml

We’re going to use the same OSInstall.mpkg that was used to install a full 10.8 instance in the previous section, only this time we just want to install the recovery partition. We can do that by capturing, editing, and using a choices.xml file.

installer -verbose -pkg "/Volumes/Mac OS X Install ESD/Packages/OSInstall.mpkg" -tgt "/Volumes/Recovery Build" -showChoiceChangesXML > /tmp/Choices.xml

Next, you’ll need to edit /tmp/Choices.xml such that each attributeSettings key values are set to 0 (that’s a zero) except for EssentialSystemSoftware and EssentialSystemSoftwareGroup – those two should have an attributeSettings value of 1.

Install 10.8 Using Choices.xml

installer -verbose -pkg "/Volumes/Mac OS X Install ESD/Packages/OSInstall.mpkg" -tgt "/Volumes/Recovery Build" -applyChoiceChangesXML /tmp/Choices.xml

Capturing the Recovery Partition With DeployStudio

  1. Use DeployStudio to capture a new image of the “Recovery Build” volume that you just used in the previous section.
  2. Once complete, you will have two images in your Masters/HFS directory in DeployStudio’s repo; filename.hfs.dmg and filename.recovery.dmg.
  3. Rename the dmg you created in the first section using InstaDMG to filename.hfs.dmg, then copy it to Masters/HFS on your DeployStudio repo so that it overwrites the existing file. Now you’re ready to setup your imaging workflow in DeployStudio Admin.

Deploying Your New 10.8 Image

  1. Setup a new workflow in DeployStudio and at a minimum, add a Restore action to it.
  2. Select your new filename.hfs.dmg image from the Image list
  3. Check the box to Restore system recovery partitions

At this point you’re ready to boot your machines to DeployStudio and run your new workflow on them. This will install the clean, never before booted 10.8 system as well as the recovery partition.



  1. I’ve noticed that with the latest version of instadmg, r458, the process creates a multi-partition .dmg with the OS in one partition and a recovery partition. What is the best method to deal with this scenario, if I don’t want to restore the recovery partition, or would prefer to have the two partitions as separate disk images. I like the ability to have the Recovery Partition created, but having them both together in the same disk image seems a little odd to me.

  2. I’ll have to play with the new version to find out for sure, but it seems to me like it should be possible to capture the image the using the same methods. Would it be acceptable in your opinion to simply uncheck the “Restore system recovery partitions” checkbox during deployment? That is assuming that checkbox still exists in the latest version of course.

    If all else fails, I’d think you should be able to use Disk Utility to capture an image of either of those two partitions which you could then prep manually for asr deployment. If that’s the route you want to go, I’ll need to dive into the the problem a little deeper.

    1. I think you’re asking if the “Restore system recovery partitions” checkbox is unchecked in DeployStudio, and that doesn’t restore the recovery partition, then I think that is acceptable.

      In my reading, but not actual testing, I was getting the feeling that because the Disk Image is multi-partition, that it would restore the Recovery HD regardless and just use 650 MB of the target partition to do it.

      1. Yep, that’s exactly what I meant. Let me know if that isn’t an option with the build you’re using.

        I’m also curious, where did you find r458? The nightly builds all have versions numbers with a “NB” prefix, and the latest version available on is still 1.0r133.

      2. The r458 is instadmg’s version, not deploystudio. There is a new DS 1.0rc134 now. instadmg is now at r462. I usually download a read only copy of their latest svn repository contents.

  3. I’m having issues, first, InstaDMG is not putting the image into Output, secondly it can’t find the Recovery Build.

    1. I’m probably not the best resource for InstaDMG; I’ve stopped using it since the time of this post in favor of createOSXinstallPkg ( I do still use DeployStudio, and I can say that if it’s not finding the Recovery Build volume, then you might be running into an issue with Fusion Drives. If you’re using Fusion Drives, you’ll need to upgrade DS to the latest revision and make sure it’s built on an OS X 10.8 machine. Either way, you might want to ask over on InstaDMG’s mailing list (, MacEnterprise (, or if you’re comfortable using IRC, a lot of the developers who make these tools hang out on ##osx-server and are always happy to help.

      1. Thanks, I just created the image and restore image using DeployStudio.
        I also have my concerns about the whole “thin client” way of setting up Macs, as it seems to take longer, pushing packages, and settings down, rather then having everything you need in a golden master. But I’m experimenting….

      2. Yep, there’s always a tradeoff. Monolithic imaging will always be faster to deploy, hands down. But the flexibility you get with thin imaging, or “no-imaging”, does some amazing things for you and your time. Of course it takes a while to build all of the initial stuff, but after that you never need to spend days tweaking an image again. Realizing I’m biased, I’d strongly encourage you to investigate the thin-image route (which is an area where InstaDMG can still help you if you prefer).

  4. Thanks, I will. I like InstaDMG, and combined with DeployStudio, it seems to be the right solution.
    We were also looking a Casper as the all-inone solution.

Leave a Reply

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

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s