How to create a bootable USB drive on OSX

May 11, 2016 using tags osx, bootdrive

  1. First, convert the ISO to an IMG file using the hdiutil utility.

    hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso

    Note that since OSX tends to append a .dmg suffix to the file name, you will probably have to rename it to a .img file.

  2. Run the diskutil utility to get a list of the current devices.

    diskutil list
  3. Insert the USB drive and run the same diskutil command again.

    diskutil list

    Take a note of the node assigned to the USB drive (i.e. /dev/disk1)

  4. Unmount the disk.

    diskutil unmountDisk /dev/diskN
  5. Begin writing the image file to disk.

    sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
  6. After that has finished, eject the USB drive using the diskutil utility.

    diskutil eject /dev/diskN

That’s all there is to it, your new USB drive should be bootable!

(This was all very useful and relevant to me when I used to run Linux on a Macbook, hopefully it’s helpful to someone else)