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.
-
Download some Linux ISO. I tried this with the Debian 12 ISO and the Proxmox ISO.
-
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
-
Plug your external drive in (usb pen disk,…)
-
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 withdisk4
. -
Make sure the disk isn’t mounted:
diskutil unmountDisk /dev/disk4
-
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
inrdisk4
is not a typo. It meansraw
.
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:
-
Plug it in
-
Again, verify the number (
diskutil list
) -
Format:
diskutil eraseDisk exfat "MYUSB" disk4