Wednesday 9 July 2008

Mounting bin/cue files in Linux

It's impossible to mount .bin/.cue files in Linux with the 'mount' command. Bin/cue files always come in pairs; bin file is the raw image of a cd, and the cue file specifies the mode in which a cd is written and the number of bytes per sector in the image (bin) file.
There are two methods for mounting bin/cue files. First is to convert bin/cue file to iso than burn it, and the second is to try mounting it directly with some other software tools.

Converting to iso with bchunk

One of the commands for converting bin/cue image to .iso image is bchunk. If you don't have it installed already type:
sudo apt-get install bchunk

Now, to convert it to iso type:
bchunk -v image.bin image.cue <basename>

And now, when the conversation is done mount an iso file:
mount -o loop,ro -t iso9660 <filename>.iso <mountpoint>

Some other tools

CDfs - download - cdfs is a file system kernel module. You can use it instead of iso9660 when you mount cds. It will show all the tracks on a cd as files in the mounted directory, i.e. A data cd may show a single .iso file, an audio cd will show some .wav files, and a mixed cd may show an .iso file and an apple hfs image, and some .wav files.

cdemu - homepage - Userspace CDEmu is a CD/DVD-ROM device emulator for linux, licensed under GPL v2 or later.

Enjoy!

2 comments:

Unknown said...

Thanks for the tips, dude, you just saved me a headache. :)

Marco said...

Thanks for this good tip.