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

Top Three DNS Providers That Provides Good Service in SEA (Southeast Asia)

Sending Email Using MailKit in ASP.NET Core Web API

Dirty Logging With Serilog For ASP.NET 5