macOS X .iso to Bootable USB
This is a quick cheat sheat to make a bootable USB drive from an .iso file using the terminal in macOS X.
Elevate your privelegs to root: (be careful with root — you have been warned)
sudo -sConvert the .iso to .dmg:
hdiutil convert -format UDRW -o ubuntu-server-24.04.img ~/Downloads/ubuntu-24.04-live-server-amd64.isoWithout your USB drive plugged in, see what drives you have.
diskutil listMake note of the /dev/disk* listing.
Plug in your USB drive.
diskutil listNote what /dev/disk* was added. You’ll use this in the next dd command.
Write the .dmg file to the USB device. (note: we add an “r” to the device name: /dev/disk6 becomes /dev/rdisk6)
dd if=./ubuntu-server-24.04.img.dmg of=/dev/rdisk6 bs=1m status=progressWhen that finishes, you should have a bootable USB drive. Eject and enjoy!
If that fails with `dd: /dev/rdisk6: Resource busy` then open “Applications” -> ”Utilities” -> “Disk Utility” and click the eject button for that disk — it won’t let you write to a mounted disk for very good reason!
