Friday, May 1, 2009

OS X "burning" image to USB flash drive

I recently downloaded an Ubuntu image for netbooks, and I needed to install this onto a USB flash drive so I could boot it. This is pretty simple with OS X and Disk Utility and dd from the command line. Be sure your flash drive is large enough to hold the disk image.

* Plug the flash drive into a USB port and launch Disk Utility.
* Select the flash drive and press apple+i to bring up the info
* remember the device id, it will be diskN where N is a number, such as disk4
* select the volume (not the device) and click unmount.
* open a terminal window, and type:

sudo dd if=/path/to/file.img of=/dev/disk4 bs=1024

Be sure to use your path to the image file, and the device id you got from disk utility in place of "disk4". You can drag the .img file into the terminal window if you don't want to type the full path to it.

Now wait a bit for the image to be written. When its done you will get something similar to this:

969568+0 records in
969568+0 records out
992837632 bytes transferred in 521.666371 secs (1903204 bytes/sec)


Majesticsock said...

Thanks, was getting frustrated trying to do this the GUI way.

0bserve said...

Thanks a lot Fifty Outs! precise, concise instructions. just spot on!