While this information is available all over the net, i find myself losing enough time now and again trying to figure out how to convert a disk image to iso or something useful for that matter. So i decided to put together a small tutorial on converting disk images to another format on Linux, so i can easily access it whenever i need it.
The most popular disk image formats i’ve had to deal with are: iso (which Ubuntu handles by default perfectly), CloneCD/IMG (used by CloneCD), CUE/BIN, MDF (created by Alcohol 120%), NRG (Nero images) and last but not least DMG (format used mainly by Apple).
Since Linux handles very well .iso files, the idea is to convert any of the image types listed into iso and then the job is easy. For all of the formats there are tools to do just that. You can install them as follows:
sudo apt-get install ccd2iso bchunk mdf2iso nrg2iso dmg2img
# ccd ccd2iso /path/to/example.img /path/to/example.iso # bin/cue bchunk /path/to/example.bin /path/to/example.cue /path/to/example.iso # mdf mdf2iso /path/to/example.mdf /path/to/example.iso # nrg nrg2iso /path/to/example.nrg /path/to/example.iso # dmg dmg2img filename.dmg
Some of those formats can be also mounted using the CLI:
# ccd/img sudo mount -o loop example.img /media/example # nrg sudo mount -o loop,offset=307200 /path/to/example.nrg /media/example # dmg dmg2img /path/to/example.dmg /path/to/example.img sudo modprobe hfsplus sudo mount -t hfsplus -o loop example.img /media/example