Computer/Making a bootable macOS installer ISO image and installer USB memory drive

From Mamin LAB
Jump to navigation Jump to search

How to Make a bootable macOS installer ISO image and installer USB memory drive.[edit | edit source]


Main_Page > Computer > Making a bootable macOS installer ISO image and installer USB memory drive



Prepare some drive if you want to use some external drive to make installer[edit | edit source]

You have to prepare some drive to make the macOS installer drive. Such as... USB memory stick or SD card, HDD, SSD drive.

And if you just want to make a macOS installer USB memory or some drive, then you can run section 6.


Download from AppleStore or Apple official website[edit | edit source]

If you want to download more than High Sierra, then you will use AppleStore app on your macOS (It's free and no need to use Apple Account).

https://support.apple.com/HT211683


Create the macOS installer on terminal[edit | edit source]

1, If the macOS installer is opened, then exit from the menu.


2, Run the terminal on macOS and enter root user (administrator privilage).

sudo bash


3, Set USB memory on the USB connector on your mac computer or your drive that you want to create the installer on it.

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


4, Create a 8900 MB DMG disk image. (You can also change the name "Catalina" to another name.)

if you want to make Big Sur installer image (12.25GB), then you may need to create more than 13000 MB disk image (8900m to 13000m).

And you need to check there is some enough space on your internal drive.

hdiutil create -o /tmp/Catalina -size 8900m -volname Catalina -layout SPUD -fs HFS+J


5, Mount it to your macOS.

hdiutil attach /tmp/Catalina.dmg -noverify -mountpoint /Volumes/Catalina


6, Create macOS Catalina Installer.

Please choose which macOS installer you want.

  • Big Sur
/Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --nointeraction
  • Catalina
/Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --nointeraction
  • Mojave
/Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --nointeraction
  • High Sierra
/Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --nointeraction
  • El Capitan
/Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction

If you get "Erasing disk error number (22, 0), then the disk image size is too small. Try to make another bigger size disk image.

(For example. The output when I made the Big Sur installer dmg file.)

bash-3.2# /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/BigSur --nointeraction
Erasing disk: 0%... 10%... 20%... 30%... 100%
Copying to disk: 0%... 10%... 20%... 30%... 40%... 50%... 60%... 70%... 80%... 90%... 100%
Making disk bootable...
Install media now available at "/Volumes/Install macOS Big Sur" 

7, Unmount Catalina Disk (You can absolutely ignore this step)

hdiutil detach /Volumes/Install\ macOS\ Catalina\

Now you have bootable macOS Catalina.DMG image (/tmp/Catalina.dmg).


8, Convert the dmg file to a iso file

hdiutil convert /tmp/Catalina.dmg -format UDTO -o /tmp/Catalina.cdr

(For example. The output when I made the Big Sur installer iso file from BigSur.dmg.)

bash-3.2# hdiutil convert /tmp/BigSur.dmg -format UDTO -o /tmp/BigSur.cdr
Reading Driver Descriptor Map (DDM : 0)…
Reading Apple (Apple_partition_map : 1)…
Reading  (Apple_Free : 2)…
Reading disk image (Apple_HFS : 3)…
.............................................................................................................................................................................
Elapsed Time:  1m 11.921s
Speed: 180.8Mbytes/sec
Savings: 0.0%
created: /tmp/BigSur.cdr 


9, Rename and move to your destination folder, desktop or somewhere.

mv /tmp/Catalina.cdr ~/Desktop/Catalina.iso


If you want to make macOS installer on USB stick or some drive from ISO images[edit | edit source]

1, Plugin the drive to your mac computer.


2, check the device name for the drive on the terminal. (For example... USB memory stick.)

diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         28.0 GB    disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            27.6 GB    disk0s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3
/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:          Apple_CoreStorage Macintosh HD            597.4 GB   disk1s2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      FDisk_partition_scheme                       *31.9 GB    disk2
   1:             Windows_FAT_32 NO NAME                 31.9 GB    disk2s1

You have to check which drive name is belonging to the USB memory stick.

!!! CAUTION !!! if you mistake the drive name, then you may loose your data or macOS.

In above example, you have to choose the last one "disk2". If you can't distinguish which drive name is belonging to it, then you can remove the USB memory stick and run "diskutil list" again. if the drive name is disappeared after remove it, then the disappeared name was the USB memory stick device name.


3, Get the directory to where the iso image is. For example, if it is on the Desktop, then put "~/Desktop" before "/name.iso". (Please change the name.iso to your iso filename.) And run the below command.

!!! CAUTION !!! if you mistake the drive name, then you may loose your data or macOS.

dd if=~/Desktop/name.iso of=/dev/disk2

Wait a minute to finish the writing the image on the USB memory stick....

That's it!!


References[edit | edit source]