Skip to content

Instantly share code, notes, and snippets.

@KalenAnson
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KalenAnson/39a507737096f37963be to your computer and use it in GitHub Desktop.
Save KalenAnson/39a507737096f37963be to your computer and use it in GitHub Desktop.
Create a bootable usb drive from command line on a mac

Bootable USB From Image

  1. Convert the .iso to .img (A Debian install for example)

     hdiutil convert -format UDRW -o ~/path/to/output.img ~/path/to/input.iso
     mv ~/path/to/output.img.dmg ~/path/to/output.img
    
  2. Copy the image to the target device (/dev/disk3 for example)

     diskutil unmountDisk /dev/disk3
     sudo dd if=/path/to/output.img of=/dev/rdisk3 bs=1m
    
  3. Eject the disk

     diskutil eject /dev/disk3
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment