- 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:
- Open up a terminal window, using the
Utilities > Terminal
menu option. - 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
- Go back and attempt to reinstall OS X again, and it should work.
This is probably the most succinct and useful gist I've ever seen. Is the
createinstallmedia
bin a brand new feature? I stumbled upon this when I discovered that simply restoring from the InstallESD.dmg file no longer worked.Thanks! ✨