Back to TIL
macOS

Burn ISOs onto USB drives on macOS

Putting Linux ISO images onto USB pen drives on macOS doesn’t necessarily require extra utilities like balenaEtcher. Depending on the ISO, you might get away with the builtin CLI commands.

  1. Download some Linux ISO. I tried this with the Debian 12 ISO and the Proxmox ISO.

  2. Convert the ISO to macOS DMG format:

    hdiutil convert debian-12.11.0-amd64-netinst.iso -format UDRW -o debian-12.11.0-amd64-netinst.dmg
  3. Plug your external drive in (usb pen disk,…)

  4. Find which disk number that drive is associated with:

    diskutil list

    Should show something like this:

    /dev/disk4 (external, physical):
    #:                        TYPE NAME             SIZE      IDENTIFIER
    0:      GUID_partition_scheme                   *64.0 GB  disk2
    1:                        EFI EFI               209.7 MB  disk2s1
    2:                  Microsoft Basic Data MYUSB  63.8 GB   disk2s2

    Above demoes a 64gb USB drive called MYUSB with exFAT, associated with disk4.

  5. Make sure the disk isn’t mounted:

    diskutil unmountDisk /dev/disk4
  6. Write the DMG to it. This erases all existing content on the drive.

    sudo dd if=debian-12.11.0-amd64-netinst.dmg bs=1M of=/dev/rdisk4

    The r in rdisk4 is not a typo. It means raw.

That’s it.

I learned this procedure from the Proxmox installation docs, but always assumed they do something special with their ISO. I simply tried it once with Debian and was surprised to find it working there as well.

Restoring exFAT

Once you are done and want to reformat the drive back to its original exFAT:

  1. Plug it in

  2. Again, verify the number (diskutil list)

  3. Format:

    diskutil eraseDisk exfat "MYUSB" disk4