How to create a bootable macOS USB flash drive from from a macOS ISO in the Unix shell?

5,270

Your core problem is that Mac hardware will only boot off a device that has a GUID partition table and either an HFS+ or APFS partition containing the operating system.

Getting those two things onto a USB stick without a Mac will be difficult. If you don't have access to a Mac to do it then I'd visit an Apple Store. Just stick the thumb into a Mac, run Disk Utility (which is in the "Utilities" folder found in "Applications") and proceed from there.

Once you have the right partition table and partition format then you can proceed with Making a bootable OSX USB from dmg on Linux and it should be fine.

Share:
5,270

Related videos on Youtube

Rene Pickhardt
Author by

Rene Pickhardt

I am a data scientist currently doing most of my work in the field of bitcoins lightning network. I love math, statistics, graph theory and similar stuff. I was interested in nlp and neo4j. My side interest is scalable web architectures and data structures and algorithms. you can find my code at github.com/renepickhardt. As a PhD Student my dissertation is about Generalized Language Models

Updated on September 18, 2022

Comments

  • Rene Pickhardt
    Rene Pickhardt over 1 year

    My macOS filesystem is so broke that I can't even enter recovery mode. I am now on a Linux live system and have InstallESDDmg.pkg which I could extract with 7z. I could also use dmg2img to create an ISO file.

    Following the instructions in this post, I am able to to copy the image to the USB flash drive using dd. However once I start the Mac with the option key pressed I don’t see the option to boot from that USB drive.

    So I assume I must create a partition table and make the device bootable. as far as I understand from this Ubuntu tutorial, this method only allows to make the ISO bootable if it is a Debian-like system. For macOS I would need something different.

    I see some suggestions in this post here but since they are so different I wonder which ones help

    So how am I supposed to proceed from here?

    • Tetsujin
      Tetsujin almost 6 years
      You don't have to. It's not compulsory. You also don't want to be using MBR on a Mac drive if you want it to be bootable. Use GUID/HFS+ Knowing precisely what Mac it is & why you think you can't get to recovery may also help people to help you. Moaning about 'having to use a Mac' just puts the people who may be able to help right off even wanting to :/
    • Rene Pickhardt
      Rene Pickhardt almost 6 years
      it is an late 2015 imac 27" I cant get to recovery because everytime it starts even after cmd+alt+R it gets a kernel panic with throwing some iokit.corestoragefamily exception in the stack trace. as for the comment: I have removed it but I am honestly frustrated, that they don 't provide the tools that I can help myself
    • Gordon Davisson
      Gordon Davisson almost 6 years
      If you're getting a kernel panic booting in Internet recovery, I'm pretty sure you'll get the same thing booting from a USB drive. There may be a hardware problem causing it, or it might be that the volume is so messed up that even looking at it is crashing macOS. In either case, it'll take more extreme measures to repair it.