Bootable or live operating system images are a useful tool for the systems administrator. This is particularly true during deployment or maintenance of client and server computers.
Mac OS X by default has the required utilities to perform this quick exercise.
Do note OS X requires image files be in .img or .dmg file format.
From terminal, hdiutil can be used to convert disk images in .iso file format.
Target and destination are used here respectively to refer to the source file and the destination for the converted file.
hdiutil convert –format UDRW –o destination target
diskutil is then used to unmount the target usb drive.
If unsure, the target drive name and number can be retrieved using:
The code snippet below then unmounts the required drive.
diskutil unmountDisk /dev/disk
Finally, we copy the disk image to the usb drive using dd.
Do note that this step requires sudo permission to run.
sudo dd if=target of=dest bs=1m
If bs=1m fails, then try using bs=1M
1M if 1m fails
If this step succeeds, then we should have a bootable usb drive with our operating system image.