(Guest post by Allister Banks)
We’re several years in to Apple distributing its installer through its (formerly with the ‘Mac’ prefix) App Store, which if you right-click the bundle you can show package contents, and then navigate to the packages involved in the install as part of an Electronic Software Distribution image(or InstallESD.dmg for short.) Guidance remains the same, however, regarding getting the proper version of the OS to reinstall on your computer – in almost all cases, the newest hardware will only be supported by a ‘forked‘ version of the operating system. That means the process outlined here on Rich Trouton’s DerFlounder blog is still 100% applicable if you need to create and image with a tool like AutoDMG or perform a clean install for those models.
For the Lion releases of the OS, there was not really a functional difference between the InstallESD.dmg you’d find in the Install OS X {Mountain Lion,Lion}.app, and the old physical discs the installer was previously distributed on. Since the dmg was a bootable system unto itself, it had the normal complement of files with which you could query for what build it would install. In specific you could look at the same ProductBuildVersion key in the /System/Library/CoreServices/SystemVersion.plist file you’d find on any Mac(as of this writing, that number is 13B42 for most models released before the late 2013 Retina MacBook Pros and new MacPro.)
For the regular ‘universal’ builds (which would be listed here,) you can unflatten the OSInstall.mpkg you’d find in the Shared Support folder in the Contents folder within the app. (I have an automator service for expanding packages that may be of use to folks for this process, described here.)
Inside of the expanded OSInstall.mpkg you could open the Distribution file in your text editor of choice and look at the end of (currently) line three for the osBuildVersion value. (CreateOSXInstallPkg uses python’s minidom for this)
As of Mavericks, there’s a different directory structure inside the InstallESD.dmg, which confuses some folks who collect one for each of their forked models, and will need to continue to grab those specific builds from Internet Recovery for the foreseeable future. Fortunately, the only thing this new layout actually requires is a slight tweak to query:
The actual dmg that gets dropped on the destination (to boot from) is there at the root, but hidden from the Finder when the InstallESD.dmg is mounted. Another way of navigating to it(besides turning on hidden files) is to run this command from the terminal after mounting InstallESD.dmg:
open /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg
Inside that BaseSystem.dmg there is the regular SystemVersion.plist at the path you’d traditionally find it, as mentioned above.
And there you go! Now you can make sense of all these InstallESD.dmg’s you’ve been stockpiling to serve the forked models in your fleet.