This time we will take a look on simple but very useful procedure, how to prepare bootable installer on USB flash drive for macOS.
macOS Recovery flash drive comes really handy in cases when your normal (internal) system Startup Disk has problems, becomes corrupted because you have maybe messed something up or you simply want to reinstall your system, with no need for internet connection during reinstallation (maybe because it might be slow, sometimes unstable, etc.) Such recovery flash drive can be used as many times as you like to repair or reinstall multiple machines without downloading the installer each time.
First you need to obtain macOS installer if you don’t have one already in your Applications folder, but even though it’s good idea maybe to download it new, just to make sure that you are using most current version available.
Where from can we get the macOS installer(s) downloaded?
Links to previous versions of macOS are available from Apple as well, they are listed below. Preferably use the macOS that came with your Mac, or a compatible newer version:
If the installer opens after downloading, quit it without continuing installation with ⌘+Q or from menu Install macOS Catalina – Quit Install macOS.
Connect your USB flash drive or other external volume/drive which you would like to use for your bootable installer, just make sure it has at least 10GB of storage available. Also make sure there are no important data on your USB disk or you have good working backup because your USB flash drive will be erased with following procedure!!!
Actual idea is to use external disk (flash drive for portability) because if you want do some job later on your internal Startup Disk, you have to boot your Mac from something else, otherwise you won’t be able to make certain changes to your normal Startup volume(s).
Open Terminal from Applications – Utilities folder or via Spotlight (⌘+Space) and type Term…
Use ‘diskutil list’ command to identify your USB flash disk device.
(Before you begin it’s better to disconnect all external USB storage devices you don’t need at the moment, that will largely reduce confusion and possible mistakes leading to data loss!)
You should see an output similar to one on the picture below:
Our external USB flash disk is easy to identify as ‘disk2’ (your disk number could be different, so use what you get in your actual output).
Description in brackets should say external and storage capacity should agree with declared one usually written somewhere on the USB flash disk, that’s what you would probably expect.
Now, what ever is on your USB flash disk, let’s get a rid of it and reformat that disk with proper filesystem which is ‘Mac OS Extended (Journaled)’ with GUID Partition Map and let’s give the volume name “MyVolume”.
First we have to unmount our USB flash disk as follows:
userName@MyMac ~ % diskutil umountDisk disk2
Unmount of all volumes on disk2 was successful
(Commands you type in the terminal are bold.)
Next erase USB flash disk with proper filesystem and give it the name you want. (But to keep it simple let’s call it “MyVolume”.)
Make sure you type disk number which is correct on your system so you won’t erase unintentionally something else!!!
userName@MyMac ~ % diskutil eraseDisk JHFS+ MyVolume disk2
Started erase on disk2
Creating the partition map
Waiting for partitions to activate
Formatting disk2s2 as Mac OS Extended (Journaled) with name MyVolume
Initialized /dev/rdisk2s2 as a 28 GB case-insensitive HFS Plus volume with a 8192k journal
Finished erase on disk2
Now use ‘createinstallmedia’ command
It will create bootable USB installer. Let’s assume that the installer is still in your Applications folder, and MyVolume is the name of the USB flash drive.
You have to use sudo with ‘createinstallmedia’ command to give it root access to your USB flash drive. So it’s necessary for this to use user account which belongs to ‘Admin’ group and you will be asked for this user’s password when ‘createinstallmedia’ command starts.
‘createinstallmedia’ command reminds you once again that it will erase the volume at /Volumes/MyVolume and if you wish to continue type (Y) then press return.
Then you will see output similar to the one below, it informs exactly what is doing and gives you progress indication of whole task, now only wait until it’s finished.
userName@MyMac ~ % sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Ready to start.
To continue we need to erase the volume at /Volumes/MyVolume.
If you wish to continue type (Y) then press return: Y
Erasing disk: 0%... 10%... 20%... 30%... 100%
Copying to disk: 0%... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100%
Making disk bootable...
Copying boot files...
Install media now available at "/Volumes/Install macOS Catalina"
Congratulation, your macOS Recovery USB flash drive is ready!
You should see device icon named “Install macOS Catalina” (or other macOS depending on what you chose to download) placed usually in upper left corner of the screen.
Eject USB flash disk with either ⌃+click on device icon and choose “Eject” or you can also type following in the terminal:
userName@MyMac ~ % diskutil eject disk2
Disk disk2 ejected
Then you can disconnect safely your USB flash disk from Mac.
For additional information I would advice to check article on Apple’s website How to create a bootable installer for macOS.
Startup your Mac with your Recovery USB Flash Drive
If your Mac is running then Shut it Down first.
Connect your macOS bootable installer USB flash drive.
Hold ⌥ (option) while Powering On your Mac. It will take you to Mac’s built in boot manager.
If you have Firmware Password set, then you need to type it in the grey box with padlock above.
Then you should see icons of available boot volumes. One should look like Featured Image at the top of this post caring the name “Install macOS Catalina” (depending on the version you have downloaded). Click it and it will boot in to the macOS Recovery Utilities.
Now you can do anything to your Mac’s internal Startup Disk. Perform ‘First Aid’ checks on system volumes from Disk Utility or from Terminal, Install or Upgrade your macOS, Restore from Time Machine, if necessary, completely erase your internal Startup Disk, and many more command line tasks which are normally not possible on live system. I will cover some of those hopefully soon in my future posts…
If you like this ‘How to…’ or you got stacked somewhere or have problem related to this post, let me know in comments section.