Skip to content

Instantly share code, notes, and snippets.

Last active March 11, 2023 00:42
  • Star 64 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
Star You must be signed in to star a gist
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\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ --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.

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.


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.
Copy link

cobyism commented Oct 7, 2013

@searls Yeah, I’m pretty sure that createinstallmedia binary is a new addition.

Copy link

I found this today and had issues with the installer saying "This copy of the Install OS X Mavericks application can't be verified" - as per here the fix is to go into terminal and set the system time correctly. Just recording this in case others have similar issues.

Copy link

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