Building an Official Mountain Lion USB Stick

For those who purchased OS X Mountain Lion through the App Store and wanted to do a Fresh (Clean) install have probably come across many methods of creating OS X Mountain Lion Bootable USB sticks. The one I have previously used for installation of Lion and Mountain Lion on my home Macs has been the Lion DiskMaker. This software automates the creation of a Bootable Mountain Lion USB key (or CD) using a purchased and downloaded through the Apple App Store.

When I attempted to install Lion using the USB Key I created using Lion DiskMaker I discovered that during the installation I would be prompted to connect to the internet, and then to sign on to a Apple App Store account that has Mountain Lion already purchased (this holds true for installations of Lion too).

There is nothing wrong with this process, as it confirms that you have indeed purchased the software you are trying to install (a form of rudimentary DRM), and for home or single user environments this is perfectly acceptable. However, in certain larger environments (such as corporate networks devoid of central Apple Server infrastructure, or on secure networks), this process is untenable.

Background

If you dont wish to read the preamble, skip straight to the instructions.

As I’m sure many who read my ramblings are aware, I’m a Systems Administrator in the School of Mathematics and Information Security at Royal Holloway. Central Computing Services at Royal Holloway offer a Windows-centric network to the departments within the University, however certain departments with more specialist IT requirements (such as Information Security, Computer Science, Media Arts, etc) have specialist IT Teams as part of their staff to help run their IT systems and to provide a more specialist and focused line of support to the Academic Staff and Students.

In the department I support, the number of Apple Computers requested by staff over the last 2 years has seen a dramatic increase. This is a trend that can be noticed over most departments at our university, and probably at universities nationwide.

Our departments server infrastructure has not however moved in the same direction as our clients. With 2013 right around the corner we find ourselves surrounded by Apple clients and no Apple servers to be seen (at least in our department).

The problem

When we began talking to our account manager at Apple about upgrading our existing Mac’s to Mountain Lion (from a mixture of Snow Leopard and Lion) we were aware of a price-break when purchasing more than a certain number of licenses. To aid other departments (some with less Macs than ourselves) we collated the Mountain Lion requirements of the whole university together so that all departments could take advantage of the price-break by purchasing the licenses all together. On paper, this was perfect.

Once the order was completed, we were emailed a secure PDF document with a single code to retrieve Mountain Lion from the App Store using an Apple App Store account. Unfortunately this code could only be retrieved in a single Apple App Store account, meaning that instead of nearly a dozen System Administrators having access to the software, only one would. Unfortunately giving other Administrators access to this account was not possible, as we’re restricted by the Apple iTunes Terms and Conditions, which state:

As a registered user of the App and Book Services, you may establish an account (“Account”). Don’t reveal your Account information to anyone else. You are solely responsible for maintaining the confidentiality and security of your Account, and for all activities that occur on or through your Account, and you agree to immediately notify Apple of any security breach of your Account. Apple shall not be responsible for any losses arising out of the unauthorized use of your Account.

My first solution to this was simple – use the Lion DiskMaker utility to create bootable USB keys for every Systems Administrator in the university.

Wrong

During testing I discovered that the installation procedure would request access to an Apple App Store account that has purchased Mountain Lion. This brings us back to the original problem with the Terms and Conditions.

My next solution was to contact Apple directly and request a dozen retrieval codes – one for each Systems Administrator that would be Installing / Upgrading the systems across the university.

No luck

Apple informed me that no matter how many licenses were purchased in a single order, only a single retrieval key would be issued. While I disagree with Apple’s decision / policy, I didn’t argue the toss.

The Solution

Apple did however put me in contact with one of their System Engineers, who was at least sympathetic to the issues we faced. After enquiring whether or not we had any Apple Server infrastructure available (presumably to suggest we use System Image Utility with NetBoot images for deployment), he suggested using USB keys to deploy the software. I informed him of Lion DiskMaker and the problem I had discovered requiring access to a Apple App Store account. Apple were aware of Lion DiskMaker, however their staff had been advised to avoid third-party utilities to create bootable USB sticks as they were not Apple utilities.

The engineer did however provide me with guidelines to creating an official OS X Mountain Lion USB Stick. I have since compiled the instructions I received into a cohesive document that will hopefully allow others (especially those looking at Volume Licensing and large scale deployments) to avoid the pitfalls that I experienced when solving this issue.


Building the OS X Mountain Lion (10.8) Install Media

For this, you will require:

  • Apple Computer (Desktop or Laptop) running OS X Mountain Lion (Lion and previous operating systems do not have the System Image Utility included)
  • An Apple App Store account with a purchased license of OS X Mountain Lion
  • USB Stick – 8GB or greater (Remaining space can be used to hold installers for other apps)

For the inexperienced user, this process will take about  45 minutes from start to finish. A rudimentary knowledge of Apple Automator can also be helpful.

  • Open the Apple App Store and download Mountain Lion
  • Once it has finished downloading, the Mountain Lion installer will automatically start – Close this
  • Open Safari (or another web browser) and download the following Automator action: http://macosxautomation.com/automator/examples/pkg/
    createnetrestoredisk/CreateNetRestoreDiskAction.zip
  • Unzip the Action. Double click the Action to install it. – You can now delete the ZIP file and the action it extracted – this is already installed into the system
  • Insert a 8GB USB Stick. Go to ‘Disk Utility‘ and erase the USB Sticks partitions, replacing it with a single ‘Mac OS Extended (Journaled)’ partition filling the whole stick.
  • Create a new folder on the desktop called ‘Build
  • In Finder click Go > Go to folder (top menu bar). enter ‘/System/Library/CoreServices‘ (without the single quotation marks), and click Go
  • Double click ‘System Image Utility
  • Under ‘Sources‘ in the left hand plane you should see Mountain Lion Installer – Highlight this
  • In the larger plane on the right side you should now see the option to build three types of image. Select ‘NetInstall Image‘ and click Customize.
    – Now Automator will open giving you a list of actions it will perform.
  • Drag the action ‘Create NetRestore Disk’ from the Automator Library into the System Image Utility workflow, dropping it below the ‘Create Image’ action.

System Image Utility with OS X Mountain Lion

Customize System Image Utility with Automator

Completed System Image Utility customization
  • Set the variables in the Automator process (see above image for examples)
    • Create Image > Save To: should be set to the Build folder you created earlier.
    • Create NetRestore Disk > Save to: should be set to the partition on the USB Memory stick that you created earlier
  • Click run, then go and make yourself a hot beverage – this takes a bit of time.

Installing OS X Mountain Lion (10.8)

Clean Install

  • Insert the OS X Mountain Lion USB Stick into the Mac
  • Power on the Mac and hold down the Option (Alt) key until the boot selection screen is displayed.
  • Using the arrow keys, choose ‘EFI Boot’ and press Return – This will start the Mountain Lion Installer
  • Once the Installer has started, choose the appropriate language and click Next.
  • Now start ‘Disk Utility’ from the Mac OS X Utilities
  • Select the hard disk partition (typically named ‘Macintosh HD’) and erase the contents of the partition, reformatting it as ‘Mac OS Extended (Journaled)’
  • Once complete, close Disk Utility and you will be returned to the Mac OS X Utilities screen.
  • Now choose ‘Reinstall Mac OS X’
  • If prompted, choose the newly reformatted partition as its destination.
  • Mac OS X will now be installed.

 

In-Place Upgrade

Method 1

  • Boot into the existing Mac OS X installation on the Mac.
  • Insert the OS X Mountain Lion USB Stick
  • Open the memory stick, and browse to the NBI Folder (usually ‘NetInstall of Install OS X Mountain Lion.nbi’)
  • Double click ‘NetInstall.dmg’ to open it.
  • Browse into the NetInstall DMG and run ‘Install OS X Mountain Lion
  • Follow the onscreen instructions, entering your Administrator Password where prompted.

Method 2

  • Insert the OS X Mountain Lion USB Stick into the Mac
  • Power on the Mac and hold down the Option (Alt) key until the boot selection screen is displayed.
  • Using the arrow keys, choose ‘EFI Boot’ and press Return – This will start the Mountain Lion Installer
  • Once the Installer has started, choose the appropriate language and click Next.
  • Now choose ‘Reinstall Mac OS X’
  • If prompted, choose the partition already containing Mac OS X as its destination.
  • Mac OS X will now be installed over the top of the previous Mac OS instance, effectively upgrading the system and preserving User Accounts, Files and Software.

Author: TFindley

Tristan is an IT Professional, Photographer and motorcycle enthusiast. Working full-time as a Systems Administrator for Royal Holloway, but running his own photography company, and the occasional IT Contract. Tristan has been riding motorcycles since 2016, and is the original author of "My First Motorcycle", the forerunner to this site. He built it with the intention of providing a resource to those interested in riding, and to give something back to the community that had helped get him started in the world of motorcycles.

Leave a Reply