Backtrack:  
 
by lunarg on November 3rd 2020, at 16:16

It is well-known and well-documented that it's possible to create a bootable USB flash drive allowing you to create an installation media to install or re-install macOS on a Mac. Using the same and native tools, it is also possible to create a bootable ISO image. While you won't be using this very often, it could be handy in several cases (e.g. when running a specific version of macOS in VMware Fusion).

In short, instead of writing to an USB drive, you can create a disk image and write the installer to that image, and then convert it to an ISO image file (technically it's CDR, but in nowadays modern systems they are the same). Subsequently, it is possible to write the ISO to an image (but that would defeat the point of this exercise because you can very well write it directly to the device).

Follow these steps to get the work done:

  1. First, download the macOS installer of your choice (direct links for Mojave or Catalina here). Note that you need to do this on a supported Mac with an Apple ID. The installer app will be placed in your Applications folder.
  2. After downloading, the installer will automatically be launched: ⌘ + Q out of it.
  3. Fire up Terminal, which is were you will perform all the tasks.
  4. Create a disk image (DMG) large enough to hold the bootable installer. Newer versions may require a large disk image size.
    hdiutil create -o /tmp/macOS -size 8500m -volname macOS -layout SPUD -fs HFS+J
    Note that the names mentioned here are temporary and can be renamed if needed.
  5. Mount the freshly created disk image (DMG). The createinstallmedia expects it (just like with an USB flash device):
    hdiutil attach /tmp/macOS.dmg -noverify -mountpoint /Volumes/macOS
  6. Next, like with a regular USB flash media, run the createinstallmedia command to create the installation media inside the mounted disk image:
    sudo /Applications/Install macOS Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/macOS --nointeraction
  7. When the process has completed, the disk image will now hold a bootable copy of the installation media. Unmount the disk image before continuing with the conversion to ISO. Note that the mountpoint will be renamed to whatever version of macOS you're creating the installation media for, so adjust accordingly:
    hdiutil detach /volumes/Install macOS Mojave
  8. After unmounting the disk image, run the conversion:
    hdiutil convert /tmp/macOS.dmg -format UDTO -o ~/Desktop/macOS.cdr
  9. After the conversion is completed, you can decide to keep or delete the original disk image (DMG) /tmp/macOS.dmg. If necessary, rename the CDR file to ISO to be able to use it in VMware Fusion or VirtualBox.
 
 
« November 2020»
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22232425262728
2930     
 
Links
 
Quote
« Most people tend to avoid true conflict. Ironically this breeds more conflict. »