Create an Install and Recovery Stick – Mac Kung Fu, 2nd Edition

Tip 140Create an Install and Recovery Stick

Recent versions of OS X have been sold primarily through direct download from Apple via the App Store as an upgrade to the version of OS X already installed on your system. The installer is downloaded as an installation package and added to the Applications list.

This creates a problem if your computer is somehow made unbootable: how do you reinstall OS X now that your applications list is inaccessible? Alternatively, what if you simply want to create a clean installation of OS X?

The answer is to create an install and recovery USB stick. To do so, you’ll need a USB stick 8GB or larger, and you’ll have to wipe it clean as part of the process so it can be used only for the purpose of recovery and reinstallation.

When it comes to making an install and recovery USB stick, there are two options:

  • You can create a copy of the recovery system that’s already on your hard disk. In addition to reinstalling OS X, this is useful for fixing problems such as disk corruption. However, to reinstall OS X, it requires a working Internet connection via Wi-Fi or Ethernet, because the installation files are downloaded as needed.

  • You can create a USB stick that contains all the installation files. This is almost identical to the old DVD installation discs that were once distributed with new Macs—you can use it to install OS X even if the computer is unable to get online. It offers some rescue facilities in the form of being able to repair a damaged filesystem, but not the ability to restore from a Time Machine backup.

Creating a Repair and Reinstall USB Stick

OS X installs a small set of tools on your hard disk that you can boot to should things go wrong. Just hold down the Option key when you start your computer, before you hear the chime sound and before the Apple logo appears. Then use the Left/Right cursor keys to select the recovery option from the choices that appear (you can release Option) and hit Return to boot.

Once the recovery system is running, you can access Disk Utility to scan the disk for errors, restore from a Time Machine backup, and get access to a Terminal window to carry out other repairs. You can even reinstall OS X from scratch, although the files will be downloaded as needed, so you’ll need an Internet connection.

You can write this recovery toolkit to a USB memory stick, from which you can boot the computer to get things back on the road should you find yourself not even able to boot the hard disk. Apple has released a free utility that can be used to do just this.[15] Just insert the memory stick, run the program, and follow the step-by-step instructions. You’ll need to enter your login password when prompted.

Creating a Full Reinstall USB Stick

Writing the entire installation system and files to a USB stick is perhaps the best guarantee of being able to get your system up and running in the event of a disaster, because no matter what happens you’ll be able to create a clean installation of OS X—without the need to install over an older version or download the files.

Creating a full reinstall stick works by writing to the USB stick a hidden file within the OS X installation package. Here’s how it’s done:

  1. Look in Applications within Finder for the Install Mac OS X Mountain Lion entry that appeared when you purchased Mountain Lion from the App Store. If it isn’t there, you’ll have to download the OS X Mountain Lion installer again—open the Mac App Store, click the Purchases icon at the top, and then click the Download button to the right of the OS X Mountain Lion entry. You’ll see a warning that Mountain Lion is already installed, but just click the Continue button to download regardless. Note that once the installer has completed downloading, it’ll automatically run, but you can quit it by clicking the entry on the application menu.

  2. When the download has finished, find it within the Applications list of Finder; then right-click it, and select Show Package Contents. Navigate to the SharedSupport folder, and you’ll see a file called InstallESD.dmg. This file is the entire Mountain Lion installation—you can ignore all the other files in the package. Leave the Finder window open showing the file while you perform the next few steps.

  3. Insert the USB stick you intend to use to make the installation stick. Remember that this will be blanked during the follow steps, so ensure no valuable files are on it.

  4. Open Disk Utility, which you’ll find in the Utilities folder of the Applications list within Finder.

  5. In the Disk Utility window, locate the USB stick in the list of drives on the left of the window. Select the USB stick itself, and not the partition, which will be slightly indented beneath it.

  6. Click the Partition tab in the upper middle of the window. From the Partition Layout drop-down, select 1 Partition. From the Format drop-down, select Mac OS Extended (Journaled). In the Name field, type something like OS X Install—this is what will appear in Finder whenever the USB stick is inserted.

  7. Click the Options button. In the dialog box that appears, ensure the GUID Partition Table radio button is selected. This makes the USB stick bootable. Click the OK button when done; then, in the main Disk Utility program window, click the Apply button at the bottom right. Formatting the USB stick will take a few seconds, and you’ll see a progress display at the bottom of the program window.

  8. When it’s finished, click the Restore tab. Return to the Finder window you opened later, which is browsing the installation package, and drag the InstallESD.img file to the Source text field. This will add it as the source from which you’re going to write the USB stick.

  9. Drag the entry for your USB memory stick from the left of the Disk Utility window to the Destination field. Then select the USB stick’s partition (that is, the entry indented beneath the main entry for the stick in the listing on the left of the Disk Utility window), and click the Unmount button on the toolbar.

  10. Click the Restore button at the bottom right of the window and then the Erase button on the warning dialog telling you that the USB stick will be erased. For an example taken from my test machine, see Figure 25, Creating a bootable OS X install USB stick.


Figure 25. Creating a bootable OS X install USB stick

It’ll take up to twenty minutes to write to your USB memory stick. Watch the Copying Blocks progress display in the bottom right of the screen. Once it’s finished, quit Disk Utility and eject the memory stick within Finder in the usual way.

To install or attempt recovery via the memory stick in the future, insert it into the computer, and then restart the machine. Hold the Option key when the computer starts; then select the USB stick from the menu that appears using the Left/Right cursor keys (hit Return to boot). Follow the on-screen installation instructions to install. If you want to scan the disk for errors, click the Apple menu, and select Disk Utility.