Mac OS X Create Bootable USB stick thumbdrive from DMG / ISO image file



Prepare the USB drive first:
- open disk utility app
- select the ROOT of the usb drive
- select partition, 1 partition, and Free Space type, click Apply

Convert iso to dmg:

hdiutil convert -format UDRW -o /User/hadi/Download/____.img /source/image.iso

Get list of devices before inserting USB drive:

diskutil list

Insert your USB drive now.

Get list of devices again take note of the disk#:

diskutil list

Copy the .dmg file to target device:

dd if=source.img.dmg of=/dev/rdisk# bs=1m

Notes:
  1. if error about 1m use 1M
  2. rdisk# is faster than disk# if error just use disk#
Unmount the usb drive:

diskutil unmountDisk /dev/disk#

Eject the target device:

diskutil eject /dev/disk#


That is all!

Comments