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!
- Create a Vanilla 10.8 DMG that is hardware agnostic using InstaDMG
- Create a Vanilla 10.8 Recovery partition that is also hardware agnostic using the command line ‘installer’ program
- Wrap both DMGs into a single workflow in DeployStudio
- 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:
- A Mac running OS X 10.8
- DeployStudio v1.0rc133
- InstaDMG 1-6rc1 (r453)
- Install Mac OS X Mountain Lion.app (This link will likely be dead once 10.9 is released)
- Either an external 8GB drive, or enough free space on your internal drive to create an 8GB partition on it
Creating a Vanilla 10.8 DMG
- 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.
- Right click your Install Mac OS X Mountain Lion.app icon and choose Show Package Contents
- In the resulting window, copy Contents/SharedSupport/InstallESD.dmg into ~/Downloads/instadmg/InstallerFiles/BaseOS/
- In Terminal, run the following command: sudo ~/Downloads/instadmg/instadmg.bash
- 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.
- 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 Utility.app 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”.
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
- Use DeployStudio to capture a new image of the “Recovery Build” volume that you just used in the previous section.
- Once complete, you will have two images in your Masters/HFS directory in DeployStudio’s repo; filename.hfs.dmg and filename.recovery.dmg.
- 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
- Setup a new workflow in DeployStudio and at a minimum, add a Restore action to it.
- Select your new filename.hfs.dmg image from the Image list
- 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.