Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Command to create installable OS X USB drive.

Creating a bootable macOS USB installer

  • First, plug in an 8GB (or bigger) USB drive, and use Disk Utility to erase it
  • If you use the default settings, you should wind up with a blank drive at /Volumes/Untitled.

With that volume in place, and with the macOS installer sitting in /Applications/Install\ macOS\ [VERSION].app, run the following command in your terminal to create a bootable install media (for Sierra):

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction

You should see output like the following—it might take a while to finish.

Erasing Disk: 0%... 10%... 20%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.
Done.

To boot from the installer, reboot your Mac and hold down the alt/option key, and it will let you choose to boot from the USB disk.

Enjoy!


If you’re getting an error like this saying "This copy of the Install OS X El Capitan application can't be verified. It may have been corrupted or tampered with during downloading.", then it means that the system time on your laptop is too far in the future for the certificates contained in your installer image (they expire a certain time after you originally download the installer). To proceed, do the following:

  1. Open up a terminal window, using the Utilities > Terminal menu option.
  2. As outlined in this Stack Overflow answer use the date command to set the date back to a time closer to when you would have downloaded the installer (i.e. Jan 1st, 2016 worked for me with El Capitan). E.g. date 0101090016
  3. Go back and attempt to reinstall OS X again, and it should work.
@BlakeyBB8
Copy link

BlakeyBB8 commented Sep 5, 2020

Is it possible to create a bootable drive with multiple volumes, each containing a different version of OS X starting from, say, El Capitan to Catalina? That would give the installer the choice to install the version compatible with older macs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment