Skip to content

Instantly share code, notes, and snippets.

@loilo
Last active January 12, 2023 05:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loilo/2e6aa3f70cd73d45c4496abe4e90e8d9 to your computer and use it in GitHub Desktop.
Save loilo/2e6aa3f70cd73d45c4496abe4e90e8d9 to your computer and use it in GitHub Desktop.
Create an installation ISO file for macOS High Sierra
  1. Prerequisites:

    • You need a running macOS system.
    • I assume you're familiar with using the terminal.
    • All the examples below refer to installing macOS High Sierra, you may need to adjust them to your needs if you want to install another macOS version.
  2. Download macOS High Sierra from the AppStore.

  3. The macOS installer will start after the download finiashes. We don't need it, so we can close it.

  4. We need an empty image where we'll put the installer. Let's create one using the macOS DiskUtil CLI:

    hdiutil create -o /tmp/HighSierra -size 8G -layout SPUD -fs HFS+J -type SPARSE
  5. Now that we got an empty image at /tmp/HighSierra.sparseimage, we need to mount it as a volume:

    open /tmp/HighSierra.sparseimage

    This will mount our image as a volume named undefined.

  6. To copy the installer over to the mounted volume, we use the createinstallmedia tool built into the installer. Note that we need sudo to do so:

    sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/untitled
  7. We should now have a full-blown installer macOS image. Before converting it to an ISO, we need to unmount it:

    umount /Volumes/Install\ macOS\ High\ Sierra

    Unmounting via command line led to the following steps failing. I needed to unmount the volume via the Finder's sidebar instead.

  8. As a final step, we convert the image to ISO, again with the help of DiskUtil:

    hdiutil convert /tmp/HighSierra.sparseimage -format UDTO -o ~/HighSierra.iso
  9. We should now have a HighSierra.iso.cdr in our home folder. It can be used as an installation medium in apps like VirtualBox et al. Note that if you need an .iso (not .cdr), just rename the file to .iso.

If the above doesn't work for you, feel free to leave a comment and I'll try my best to help. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment