Page 1 of 1

MacOS – How to create bootable macOS install media

MacOS – How to create bootable macOS install media
   5

In this article, I’ll show you the steps to create macOS install Media …

As most Mac users will know; each new macOS version comes with a few challenges. For some it’s nothing, for other it’s a disaster.

Catalina is one of the latter, a disaster for quite few amongst us, due to changed security rules and the lack of support of 32 bit applications.
Some of my favorite tools simply no longer work, and as a developer this makes me nervous when considering switching to the latest and greatest.

For this purpose I always create a virtual machine in VMWare Fusion, running the macOS version that I ran before the update.
This comes with challenges though, since Apple, in their infinite wisdom, does not simply provide macOS install media (eg. a DMG or ISO file) so you can install another version of macOS. We have to create our own.

Note: Here I describe how to create macOS install media, either as a bootable USB stick to do a fully clean macOS install for your Mac, or a DMG file, for example to setup a virtual machine.




Getting the right file to create macOS install media

To create macOS install media we will need to extract the right files from the application which would execute the “upgrade” for us (for when the user originally intended to upgrade their macOS).
With this I mean: when upgrading to a newer macOS, we usually get (or your Mac does it for you) an application called something like “Install macOS Mojave”, which can be found in your Applications folder, before executing the update.

 

Abort Installation! 

Depending on a few things, your Mac may or may not start the installation process after downloading.
Abort this installation, as it will overwrite your current OS and the needed files will automatically be removed after that, preventing you from creating install media.
You can quit the application/installer by making sure the installer is the active window and pressing the ⌘-key and the “Q”-key.

Only download from the Apple App Store! 

There are several shady files and/or DMG’s out there, which may spare you the work.
My advise: Only use the version from the Apple App Store! Do NOT use 3rd party files unless you know what you’re doing!
Downloading from a 3rd party invites shady and malicious versions.

Required disk space … 

I’m estimating that worse case scenario, you’ll need up to 16Gb of free space on your disk before you start this process.
In reality it will be a little less, but better safe than sorry.

Cleanup when done … 

Once you have your Install Media, be it USB stick or DMG image file, you can delete the file you downloaded in this step – it takes up quite a bit of space.
It is located in your Application folder and called something like “Install <macOS version>“, for example “Install Mojave”.

 

Since these are no longer listed in the Apple App Store – yet still exist in the Apple Store – here a few direct links to the right files for some macOS versions in the Apple App Store:

Option 1 – The Apple Script – Creating macOS Install Media on a USB drive

After downloading the right file from the Apple App Store:

Now Apple is not totally ignoring the end user when it comes to making install media – it’s well hidden (in my opinion) in this Apple Knowledge Base article.

The Install application would have been much more user friendly experience, if Apple would have just offered the option “Create Bootable macOS Install Media”, but instead we need to resort to Terminal.

Prepare a USB stick – This method will write to a USB stick or drive! 

The listed commands below will create a bootable install media on a USB disk/stick that has been insert already AND is mounted as “/Volumes/MyUSBDrive” – obviously, this will be named differently on your Mac.

This USB stick or drive also needs to be at least 8Gb and should be formatted for use with your Mac
To properly format the disk in “Disk Utility“, use “Erase” to erase and format the disk with Format: “Mac OS Extended (Journaled)“,  Scheme: “Master Boot Record“.

  It is recommended to use a USB 3.x stick or drive when your Mac supports this – installation will go a lot faster.

  If your Mac is using macOS Sierra or earlier, include the --applicationpath  argument, similar to the way this argument is used in the command examples for Sierra and El Capitan.

Catalina (10.15)


sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSBDrive

Mojave (10.14)


sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSBDrive

High Sierra (10.13)


sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSBDrive

Sierra (10.12)


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

El Capitan (10.11)


sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSBDrive --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

 

 

Option 2 – Manually – Creating macOS Install Media as a DMG

As with option 1, we of course first will need to download the right file from the Apple App Store.

This option is useful in case we do not want a USb stick or drive – for example for a Virtual Machine, we’d rather have a DMG, as it’s much faster when installing macOS on your Virtual Machine.
The Apple script doesn’t provide for this (it kinda does, but you might as well follow these steps).

  We use “sudo” on Terminal, for which we will need an account with admin rights and “sudo” will ask for your password!

  I’m labeling the DMG “InstallMedia“, for example purposes. You can use a different name (eg. Mojave, Sierra, etc) in the scripts, or to avoid typos: simply rename the resulting DMG to your liking after all these steps.

Short version for the impatient

Here all steps combined, please note that you will have to make sure the proper filename is chosen to create the macOS install media.

  Just a warning: simply copying and pasting is a bad idea unless you know what each step really does.

  This example is for Mojave:


1
2
3
4
5
6
7
cd ~/Downloads/
sudo hdiutil create -o InstallMedia -size 8G -layout SPUD -fs HFS+J -type SPARSE
sudo hdiutil attach InstallMedia.sparseimage -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
sudo hdiutil detach /Volumes/Install\ macOS\ Mojave/
sudo hdiutil convert InstallMedia.sparseimage -format UDZO -o InstallMedia.dmg
sudo rm InstallMedia.sparseimage

 

Step 1 – Find a nice location for your macOS install media DMG

As far as I know, you can create this file in most of the user-accessible directories.
I did it on the Desktop, but doing it in your Downloads directory may be a good (or even better) location as well.
We need to tell Terminal first to go there:


cd ~/Downloads/

 

Step 2 – Create a Sparse Disk

First we will need to create an empty disk image that can grow and only takes up the amount of space really used – a so called Sparse Disk.

From the Wiki page:

Unlike a full image file (.dmg), which takes up as much actual space as the real disk it represents (regardless of the amount of unused space), a sparse image file (.sparseimage) takes up only as much actual disk space as the data contained within, up to a maximum of the capacity assigned during creation.

 

In Terminal:


sudo hdiutil create -o InstallMedia -size 8G -layout SPUD -fs HFS+J -type SPARSE

This will output something like this:


created: /Users/hans/Downloads/InstallMedia.sparseimage

 

Step 3 – Attach the Sparse Disk as a Disk

In Terminal:


sudo hdiutil attach InstallMedia.sparseimage -noverify -mountpoint /Volumes/install_build

Which results in something like this (different on your Mac):


/dev/disk4              Apple_partition_scheme          
/dev/disk4s1            Apple_partition_map            
/dev/disk4s2            Apple_HFS                       /Volumes/install_build

 

Step 4 – Run the Apple Script (see Option 1 for variations)

In Terminal, for Mojave (change “/Applications/Install\ macOS\ Mojave.app” with the filename of the macOS version you are using):


sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build

It will ask if you want to continue, type “Y” key and press Enter.

Depending on your Mac this may take a few seconds, and will show something like this:


Ready to start.
To continue we need to erase the volume at /Volumes/install_build.
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%... 100%
Making disk bootable...
Copying boot files...
Install media now available at "/Volumes/Install macOS Mojave"

 

Step 5 – Detach the Sparse Disk of your new macOS install media

So we can create a macOS install media DMG file, we will need to detach the Sparse Disk:

Again in Terminal (the name “Install\ macOS\ Mojave” depends on the macOS version you’re creating install media for – if unsure, see what is in the “/Volumes” directory):


sudo hdiutil detach /Volumes/Install\ macOS\ Mojave/

Which just give a simple “disk ejected” message.

 

Step 6 – Convert the Sparse Disk of your macOS install media to a DMG file

After this step we will have a macOS install media in the shape of a DMG file.
Feel free to rename, copy and/or move it around as any other file.

Execute this in Terminal:


sudo hdiutil convert InstallMedia.sparseimage -format UDZO -o InstallMedia.dmg

This shouldn’t take too much and time, and is this is what the output could look like:


Preparing imaging engine…
Reading Driver Descriptor Map (DDM : 0)
   (CRC32 $F2D81FEC: Driver Descriptor Map (DDM : 0))
Reading Apple (Apple_partition_map : 1)
   (CRC32 $4F4E610B: Apple (Apple_partition_map : 1))
Reading  (Apple_Free : 2)
..
   (CRC32 $00000000:  (Apple_Free : 2))
Reading disk image (Apple_HFS : 3)
.....................................................................................................................................................
   (CRC32 $3552A74F: disk image (Apple_HFS : 3))
Adding resources…
.....................................................................................................................................................
Elapsed Time: 18.098s
File size: 6068404389 bytes, Checksum: CRC32 $36434964
Sectors processed: 16777216, 11917929 compressed
Speed: 321.5Mbytes/sec
Savings: 29.4%
created: /Users/hans/Downloads/InstallMedia.dmg

 

Step 7 – Cleanup!

The last step is removing the Sparse Image of your macOS install media.
Don’t forget to also remove the installatie application in your Applications Folder (it takes up quite a bit of space).


sudo rm InstallMedia.sparseimage

 

Creating a Virtual Machine running macOS in VMWare Fusion

Since I use VMWare Fusion, here the quick steps to create a new Virtual Machine from your DMG.
It is super simple, so here a short video to get you started – make sure to select the correct macOS version in the VMWare Fusion window (here I use macOS 10.14 – Mojave)…

Support Us ...


Your support is very much appreciated, and can be as easy as sharing a link to my website with others, or on social media.

Support can also be done by sponsoring me, and even that can be free (e.g. shop at Amazon).
Any funds received from your support will be used for web-hosting expenses, project hardware and software, coffee, etc.

Thank you very much for those that have shown support already!
It's truly amazing to see that folks like my articles and small applications.

Please note that clicking affiliate links, like the ones from Amazon, may result in a small commission for us - which we highly appreciate as well.

Comments


There are 5 comments. You can read them below.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.

  • Oct 31, 2020 - 7:58 AM - Ottomanmint Comment Link

    Hi
    BB,

    Thank
    you for the instructions on “MacOS – How to create bootable
    macOS install media”!

    I
    got the macOS.High.Sierra.10.13.6.dmg from “themacgo.com” site,
    claiming it was a good clean image. I could not reach the Appstore
    using the Macbook Pro form 2011 I was trying to upgrade from Maverics.

    Once
    I’
    ve
    tried to use the install media
    I
    have created your instructions, I
    got
    this error “This copy of the Install macOS .app application is
    damaged, and can’t be used to install macOS.”. Anyhow deleting
    the“InstallInfo.plist” in the package under “Contents” /
    “Shared Support”
    got
    me sailing into the sunset :) The error has to do with the expired
    certificate etc.

    Sultani

    Reply

    Ottomanmint

    • Nov 1, 2020 - 4:34 AM - Hans - Author: Comment Link

      Hi Sultani,

      thanks for the tip.

      Note on downloading images from other websites: some of these will be totally fine, but the hard part will be to determine which ones are the totally fine ones.
      There will be images out there that are compromised.
      Since you didn’t manage to download it from Apple, I can understand why you went this route though.

      Note: I’ve started backing up the downloaded Apple install files each time my Mac wants to upgrade to a new version.
      I too ran into scenario’s where I wasn’t able to download older MacOS versions (which I use for testing when I develop a MacOS application). 

      Reply

      Hans

  • Aug 22, 2023 - 5:54 AM - erik Comment Link

    Hi there

    Looking for these instructions for a long time and happy to have found them.

    I have an old 2011 iMac on which I like to install El Capitan

    But on issuing the command

    sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia –volume /Volumes/MyUSBDrive –applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

    sudo: /Applications/Install OS X El Capitan.app/Contents/Resources/createinstallmedia: command not found

    Which command is not found. In applications tiger is no Install.app

    I do have the origineel dmg for El Capitan.

    erikschott~$ ls -al |grep Install   

    -rw-r–r–@ 1 erikschott staff 6204629298 22 aug 08:58 InstallMacOSX.dmg

    erikschott~$ 

    I don’t understand. It happens on the old Mac from 2011 as wel as my new minimal from 2023.

    Your help is much appreciated.

    I do have an official copy of the El Captitan installer dmg

    Reply

    erik

    • Aug 23, 2023 - 10:55 AM - Hans - Author: Comment Link

      Hi Erik,

      The install from a DMG works different. The method described here is based on the installer from the Apple Store, which is by default being downloaded/placed in your Application directory.

      Also: the DMG is (probably) already considered “installer media” on its own.

      How, or for what purpose would you like to use your installer?
      Just asking to see if I can help get you started with the DMG.

      Note: one can still get El Capitan (and others) DMGs legit from this page on the Apple Website.

      Reply

      Hans

    • Aug 23, 2023 - 11:14 AM - Hans - Author: Comment Link

      Just did a test myself …

      1) Downloading the DMG from the Apple website (link) (or use your own if it has a PKG file in it as well).
      2) Double clicked the DMG to get it mounted.
      3) Double click the “InstallMacOSX.pkg” file, just follow the instruction and don’t be worried. It will only install the “Install OS X El Capitan.app” in your Applications directory.

      Once that completed, you can follow the instructions from before. So this line will now work properly:

      sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia –volume /Volumes/MyUSBDrive –applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

      Hope this helps 😉 

      Reply

      Hans



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.