How-to: Make a bootable macOS drive

Use a USB flash drive (or other removable media) as a startup disk from which to install macOS.

macOS is distributed through the App Store which will download an installer app to the /Applications folder.
Links to download older versions [Macworld]

If you run the macOS installer from the /Applications folder, the installer app will be deleted. Therefore your first step after downloading the installer should be to cancel the install. Then copy the installer App somewhere else so that you won't have to download it again.

Installer App names:

Install macOS
Install macOS
Install macOS High
Install OS X El

At the command line, spaces must be escaped so these become:

Install\ macOS\
Install\ macOS\
Install\ macOS\ High\

Install\ OS\ X\ El\

Prepare the empty drive

You need a Mac-formatted drive big enough to hold the installer and its data - 8 GiB.
This can be a hard drive, an SSD, or a USB stick.
The drive must be formatted as a Mac OS Extended (Journaled) volume with a GUID Partition Table.

Name the drive 'Untitled' this name will be changed when the new volume is initialised. The Terminal commands below assume that the drive is named Untitled. You could name the drive to something different as long as you adjust the command line syntax below to match.

The program used to create a bootable drive (createinstallmedia) is supplied as part of the installer App.

Create the drive

Open the terminal and copy one of the following, single line commands. Becasue we are using sudo you will be prompted for a password:

Create a Catalina drive:

sudo /Applications/Install\ macOS\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ --nointeraction

Create a Mojave drive:

sudo /Applications/Install\ macOS\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ --nointeraction

Create a High Sierra drive:

sudo /Applications/Install\ macOS\ High\ High --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ High\ --nointeraction

Create a Sierra drive:

sudo /Applications/Install\ macOS\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ --nointeraction

Create an El Capitan drive:

sudo /Applications/Install\ OS\ X\ El\ --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ --nointeraction

If you see the message “To continue we need to erase the disk at /Volumes/Untitled.” Type the letter Y and press Return.

The build process can take 20 minutes or so to complete, wait for the 'Done' message

Erasing Disk: 0%... 10 percent...
Copying boot files...
Copy complete.

To boot from an alternate drive restart your Mac while holding down the Option key.
The macOS Startup Manager will then appear and you can select a startup drive.

Related macOS commands:

HT201372 - Create a bootable installer for macOS.
SP803 - macOS Catalina 10.15 - Technical Spec. /requirements.
SP777 - macOS Mojave 10.14 - Technical Spec. /requirements.
SP765 - macOS High Sierra 10.13- Technical Spec. /requirements.
SP742 - macOS Sierra 10.12 - Technical Spec. /requirements.

sw_vers - Print macOS operating system version.

Copyright © 1999-2021
Some rights reserved