As an IT admin, I repair Macs for my company and one of the common tasks in creating bootable USB drive. Fortunately, Apple provides a free command line tool called createinstallmedia for making bootable USB on Mac. This is the native solution to build OS X or macOS bootable installer. I have been doing this for a long time and no problem with this trick until I was trying to repeat the process on an M1 MacBook Air. At the time, I was going to make a High Sierra bootable USB on MacBook Air M1 with the createinstallmedia command, but it returned “killed: 9” error after entering the login password.
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia –volume /Volumes/USB
Password:
Killed: 9
At first, I doubled there was something wrong with the macOS High Sierra app. So I downloaded High Sierra installer app from Apple once again. The same error popped again on my M1 MacBook Air. This same error for macOS El Capitan, Sierra, Mojave and Catalina. However, createinstallmedia command does work well for modern macOS versions, including Big Sur, Monterey, Ventura and Sonoma. If you are planning to make an old macOS or OS X bootable USB on M1, M2 or M3 Mac, please keep reading.
The Root Reason for the “zsh killed: 9” error with createinstallmedia
When Apple launched its Apple Silicon Mac sieres, it came with a new challenging for Apple software restore (ASR). The “Apple Fabric” storage in these devices provides per-file encryption keys, much like what we see in iOS products. For several months, ASR struggled to function effectively with this storage. While macOS 11.3 brought some improvements, using ASR to restore the system back to the internal storage of these Macs still results in kernel panics.
In December, I had a conference call with Apple regarding the reliability and performance of ASR on macOS, specifically focusing on Apple Silicon Macs. During the discussion, they acknowledged ongoing efforts to address the ASR/Apple Fabric issue. However, they made it clear that the support for copying macOS system files would not extend into the future.
Many within the Mac community had already sensed this shift in Apple’s approach, and now we have official confirmation. In particular, since the advent of APFS, Apple has increasingly imposed restrictions on macOS system files, trading off some user convenience for enhanced security measures.
Helpful Solutions to Fix createinstallmedia Error on M1/M2/M3 Mac
After hours researching, I found out a couple of useful solutions if the same error message shows up on your Apple Silicon Mac.
Method 1: Download the Latest Version of Mac Installer App from Apple
Apple updates the Mac installer app and bootable dmg file from time to time on their website. You can download the latest version of the installer app from this official web page:
https://support.apple.com/en-us/102662
From the page, you can download installer app for macOS Sonoma, Ventura, Monterey, Big Sur, Catalina, Mojave and High Sierra or bootable dmg file for Sierra, El Capitan, Yosemite, Mountain Lion 10.8 and Lion.
If the download speed is too slow from Apple, you can use the third-party app such as MDS to download the latest version of macOS installer app.
Method 2: Run codesign Command from Terminal
One of the biggest issues for the createinstallmedia kill error is because the SSL certificate of old macOS versions was expired. Apple will verify the code signature when running createinstallmedia command. One effective way is to resign the certification with codesign command.
First, open the Terminal app and install the XCode command line tools:
xcode-select –install
After that, right click the macOS install app and choose “Show Package Content”.
Next, resign the macOS installer app with a valid certificate:
codesign -s – -f createinstallmedia
Finally, run the specific createinstallmedia command to make a bootable USB on Apple M1/M2/M3 Mac. Taking High Sierra for example:
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia –volume /Volumes/MyVolume
Method 2: Borrow an Old Mac Compatible with the Old OS Version
This has been proven the most effective way to create old macOS or OS X bootable USB nowadays. It comes for two main reasons. First, the old Installer app won’t be working on modern macOS like Ventura or Sonoma. Second, the signature of old OS has been expired. You have to download the latest version from Apple.
In short, you should go and find a Mac computer fully compatible with the Mac bootable USB. For example, if you want to create a High Sierra bootable USB with createinstallmedia command, then you should find a Mac supported by High Sierra.
- MacBook (Late 2009 or newer)
- MacBook Pro (Mid 2010 or newer)
- MacBook Air (Late 2010 or newer)
- Mac mini (Mid 2010 or newer)
- iMac (Late 2009 or newer)
- Mac Pro (Mid 2010 or newer)
The same rules applies to Catalina, Mojave, Sierra, Yosemite, El Capitan, etc… And the createinstallmedia instructions can be found out at here: https://support.apple.com/en-us/101578
Method 4: Download macOS DMG File and Burn it to USB
DMG is a type of bootable disk image similar to ISO on Windows. A lot of folks make bootable dmg file from the installer app. After that, you can use dmg burning app such as UltraDMG to burn macOS bootable dmg to USB on any Mac or Windows PC. Once the dmg file is burned to USB, the USB will become a bootable device and you can use it to reinstall macOS.
The most tricky part is how to download the correct macOS DMG file. You can search the Internet with the macOS version + dmg download to find the specific version of macOS dmg file.
Summary
It is fine to create a macOS bootable USB on Apple M1/M2/M3 Mac with the official createinstallmedia command, such as Sonoma, Ventura, Monterey and Big Sur. However, you have to deep further and make a few changes if createinstallmedia command failed to work on Apple Silicon Mac. This will cause problem when making bootable installer for macOS Catalina, Mojave, High Sierra, Sierra and El Capitan. You have to follow the above suggestions to fix the “zsh killed error” with createinstallmedia command.