Skip to main content

TIL: Creating Bootable ISO from macOS Installer

If the freedom of speech is taken away then dumb and silent we may be led, like sheep to the slaughter.
— George Washington.

Hi guys, I’ve been in a situation on where I want to create a separate portable macOS Mojave1 installer but I don’t know how. I’ve compiled this steps which I gathered from multiple sources to create a boot-able macOS installer. This article will assume you are running on macOS system.

  1. First and foremost, we download the macOS installer that we want to use from the Apple App Store. I pick the latest one (at this time of writing) which is Mojave.

  2. After that export an environment variable to hold the output ISO filename that we will be consuming.

    export ISO_PATH="mac_installer.iso"
    
  3. Then we create a blank dmg volume using the command hdiutil2. This command will create a HFS+J filesystem table to store the installer data with the capacity of 6GB.

    hdiutil create -o "$ISO_PATH.cdr" -size 6g -layout SPUD -fs HFS+J`
    
  4. Mount the created volume. If you get a problem while mounting the volume, try to create the folder first using mkdir -p /Volumes/install_build.

    hdiutil attach "$ISO_PATH.cdr.dmg" -noverify -mountpoint /Volumes/install_build`
    
  5. After that run the setup to install and copy the files in the volume that we mounted earlier.

    sudo "/Application/Install macOS Mojave.app/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
    
  6. Unmount the volume.
    Note: Check the name first, as volume name changes after the setup. The installation process specifically overwrites the partition table and volume name.

    hdiutil detach "/Volumes/Install macOS Mojave"
    
  7. We convert the dmg volume to UDTO compatible ISO standard.

    hdiutil convert "$ISO_PATH.cdr.dmg" -format UDTO -o "$ISO_PATH"
    
  8. Then we rename and remove .cdr extension.

    mv "$ISO_PATH.cdr" "$ISO_PATH"
    
  9. Finally, we delete all the remnants of the procedure.

    rm "$ISO_PATH.cdr.dmg"
    

That’s all the steps needed. If you ever completed it without error then you got yourself a macOS ISO installer.

🧡🧡🧡🧡🧡🧡🧡

Hope you guys enjoyed this article!


  1. macOS Mojave is the fifteenth major release of macOS, Apple Inc.'s desktop operating system for Macintosh computers. Mojave was announced at Apple’s Worldwide Developers Conference on June 4, 2018, and was released to the public on September 24, 2018. Wikipedia ↩︎

  2. hdiutil - Manipulate disk images (attach, verify, burn, etc). https://ss64.com/osx/hdiutil.html ↩︎

Comments

Popular posts from this blog

TIL: Disable mDNS and SSDP Discovery in Google Chrome

We're born alone, we live alone, we die alone. Only through our love and friendship can we create the illusion for the moment that we're not alone. — Orson Welles.

TIL: Flutter Series - Custom Icons

Everyone thinks of changing the world, but no one thinks of changing himself. — Leo Tolstoy.

TIL: Editor Series - Configuring Emacs To Fit The Needs Part 2

The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking. — Albert Einstein.

TIL: Gimp Automating Image Processing with Python Fu

What a large volume of adventures may be grasped within the span of his little life by him who interests his heart in everything. — Laurence Sterne.