1. Download the installers from the Mac App Store. If they are no more listed, below links are for:
UPDATE: to ease up macos downloads, use gibMacOS. Link at the end of this article.
For those of you using gibMacOS to download the needed macOS, there are two important notes:
- Apple has changed the way they distribute macOS, starting macOS 11 (Big Sur): internet recovery USBs can no longer be built via MakeInstall on Windows. macOS versions through Catalina will still work though.
- Also, Apple distributes the OS via an InstallAssistant.pkg file. BuildmacOSInstallApp.command is not needed to create the install application when in macOS in this case - and you can simply run InstallAssistant.pkg, which will place the install app in your /Applications folder on macOS.
2. Create a dmg image and mount it:
For Monterey, the volume must be bigger: hdiutil create -o /tmp/Monterey -size 16384m -volname Monterey -layout SPUD -fs HFS+J
The example below is for Mojave but apart from the image size, the method is similar.
fmbp16:tmp florian$ hdiutil create -o Mojave -size 8500m -volname Mojave -layout SPUD -fs HFS+J ............................................................................................................................................... created: /Volumes/data.1/tmp/Mojave.dmg
fmbp16:tmp florian$ hdiutil attach Mojave.dmg -noverify -mountpoint /Volumes/Mojave /dev/disk6 Apple_partition_scheme /dev/disk6s1 Apple_partition_map /dev/disk6s2 Apple_HFS /Volumes/Mojave
3. Run createinstallmedia from within the macos installer and unmount the media afterwards:
fmbp16:tmp florian$ sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Mojave --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... Copying boot files... Install media now available at "/Volumes/Install macOS Mojave"
fmbp16:tmp florian$ hdiutil detach /volumes/Install\ macOS\ Mojave "disk6" ejected. fmbp16:tmp florian$
4. Convert DMG to ISO and rename it to have iso extension afterwards:
fmbp16:tmp florian$ hdiutil detach /volumes/Install\ macOS\ Mojave "disk6" ejected. fmbp16:tmp florian$ hdiutil convert Mojave.dmg -format UDTO -o Mojave.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: 8m 30.045s Speed: 16.7Mbytes/sec Savings: 0.0% created: /Volumes/data.1/tmp/Mojave.cdr fmbp16:tmp florian$ mv Mojave.cdr Mojave.iso
Now enjoy ;)
Extra:
https://github.com/corpnewt/gibMacOS
https://support.apple.com/en-us/HT201372