Skip to content

Instantly share code, notes, and snippets.

@vyder
Last active August 29, 2015 14:12
Show Gist options
  • Save vyder/d31a0e2d2d775abe8077 to your computer and use it in GitHub Desktop.
Save vyder/d31a0e2d2d775abe8077 to your computer and use it in GitHub Desktop.
OSX - Disk image to USB drive
# Convert iso to img
hdiutil convert -format UDRW -o ~/Desktop/target.img ~/Desktop/ubuntu.iso
# Find the USB drive
diskutil list
# Unmount the drive
diskutil unmountDisk /dev/disk<N>
# Write the file
sudo dd if=~/Desktop/target.img of=/dev/rdisk<N> bs=1m
# Note: If you get a "dd: Invalid number '1m'" error, replace "1m" with "1M"
# Eject disk
diskutil eject /dev/disk<N>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment