Updated on July 26th 2016 for macOS Sierra (and changed OS X to macOS)
Every IT admin has a toolkit of hardware and software used to troubleshoot issues. Common problems require us to use Terminal or Disk Utility fix odd problems. These fixes can be done easily with NetBoot or a Snow Leopard (10.6) DVD. However, many organizations don’t allow NetBoot and almost all Macs ship without DVD drives. In this post, we will create a bootable macOS installer for your IT bag!
Mavericks (10.9) and Newer
Instructions below work with these versions of macOS:
- Sierra (10.12)
- El Capitan (10.11)
- Yosemite (10.10)
- Mavericks (10.9)
With Mavericks, Apple released a binary to create a bootable OS X installer called createinstallmedia. The binary is hidden within the Install app for each version of macOS since 10.9. Apple has a short support article called Create a bootable installer for OS X on their support site that you can use as well.
To find out how to create the bootable partition with this binary, open Terminal and type in:
/Applications/Install\ macOS\ Sierra\ Public\ Beta.app/Contents/Resources/createinstallmedia
When you hit return, the binary will give you it’s basic help documentation. The screenshot below shows an example output with additional flags and commands that we won’t use in this post.
Let’s break down the bare bones of what we need for the command to work. Please note, that there are additional flags and commands.
- Need to run this as root (sudo)
- Know the path to the createinstallmedia binary
- Have a volume we want to use (one without important data)
- Know the path to where Install.app is located
Your command should look something like mine below. Please note that you might need to change the path of your install media if you moved it and the name of your destination volume. You also do not need to worry about formatting the partition before running your command. The binary will take care of erasing the partition. Lastly, the partition that you use should be at least 8GB in size.
sudo /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/10.12 --applicationpath /Applications/Install\ macOS\ Sierra\ Public\ Beta.app
When you hit enter, you will be required to put in your admin password and verify that you want to proceed. You will see this screen with a generic progress message after you accept.
This process of copying files to your external drive or partition will take some time. In my case, it took between 20 and 30 minutes with a USB 2.0 flash drive. Once finished copying, you will have a bootable partition that you can use for troubleshooting, re-imaging, or some quick hard drive diagnostics. The image below shows what the copy complete message looks like.
Mountain Lion (10.8) and Lion (10.7)
Note – Screenshots from this section were taken on macOS El Capitan (10.11). For older versions, Disk Utility will look different.
This process will work for both Mountain Lion (10.8) and Lion (10.7). Since the createintallmedia binary was new with Mavericks, we will not need Terminal. First thing we need to do is to track down a file called InstallESD.dmg. To find this, we will want to right click (or control click) on our Install OS X Mountain Lion.app in the Applications folder. You should see an option that says, “Show Package Contents.” Below is a screen shot of what this should look like for you!
Once we have opened the application, we will want to drill down into Contents and then into SharedSupport. In here we will find a file called InstallESD.dmg. This file should be rather large, like around 4.5 GB. Option+drag this file out of its current location and place it on your desktop or another safe place.
Now that we have found what we need, we will want to open Disk Utility. We will want to select the partition that you want use for your bootable installer. Please note, we do not need to worry about the partition format. Disk Utility is very smart and will take care of that for us! Also, the partition that you use should be at least 8GB in size.
Once we have the partition selected, go to the Menu Bar, click on Edit, and then Restore. A new dialog box will appear for the selection of the image or volume you would like to restore. Click Image on the right and navigate to the InstallESD.dmg file. Please see the image below for my setup.
Once you have selected Restore, Disk Utility will validate the source and target of the restore and start the copy. This process should take five to ten minutes to complete. Once it is finished, we should have a partition called Mac OS X Install ESD that we can boot just like the Mavericks installer!