tsites
tsites computer tuition, website design, network security
articles

For when you have an disk image that needs to be turned into a bootable USB copy:

1. Download the desired iso file, img file, or dmg file.
2. Open the Terminal (in /Applications/Utilities/)
3. Convert the .iso file to .img using the convert option of hdiutil:

hdiutil convert -format UDRW -o /path/to/target.img /path/to/source.iso)

4. OSX might put the.dmg ending on the output file automatically.Rename the file by typing:

mv /path/to/target.img.dmg /path/to/target.img

5. Run diskutil list to get the current list of devices
6. Insert your flash drive
7. Run diskutil list again and determine the device node assigned to your target flash drive (e.g. /dev/disk2) - you can play spot the difference here!
8. Run:

diskutil unmountDisk /dev/diskN

(replace N with the disk number from the last command; in the previous example, N would be 2)
9. Now run

sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m

(replace /path/to/downloaded.img with the path where the image file is located; for example,

/users/tom/Desktop/ubuntu.img

or

/users/tom/Desktop/ubuntu.dmg)

10. Run:

diskutil eject /dev/diskN

Now remove your flash drive when the command completes. 11. You should now have a bootable USB drive.

12 NOTE: In this example I used Ubuntu. Straight away after the copy had finished, I got an error saying the drive was unreadable. This is normal as some operating systems use different filing systems to the mac and the mac can't understand it. It boots up fine with it though so I know the command worked.

Back to Forum Listing