« Wuhan Direct | Main | The view from the solder station »

Convert .bin + .cue -> .iso on Mac OSX

I had a need recently to convert a .bin/.cue CD Image pair to .iso for mounting on OSX. I was considering writing a quick utility to handle the task, but in the process of researching the file formats, I found BinChunker, a GPL-licensed piece of code that does exactly what I need, simply and directly. The official site has the source code and RedHat RPM's, but if you are on OSX, I did a quick compile of the latest version which you can download here.

Once you download the utility, issue this command from a shell prompt in the directory where you downloaded the file:

sudo cp bchunk /usr/bin/

This will copy the file into a location where the system can find it at will (a.k.a. the path). Then, to convert a .bin/.cue pair to a .iso, you can issue this command:

bchunk myinputfile.bin myinputfile.cue myoutputfile

Short, sweet, and simple — and lightweight too, weighing in at only 20k.

UPDATE: As commenter Frederik has pointed out, this can give a permission denied error if your user account does not have execute permissions on the file. Execute this command after copying the file to /usr/bin/ to solve this problem:

sudo chmod a+x /usr/bin/bchunk

If you are getting a not found error, make sure that /usr/bin/ is in your path. To check this, type echo $PATH and look for /usr/bin/ in the result. If it isn't there, type sudo nano /etc/profile and add /usr/bin; to the PATH=... line. Then press CTRL+x followed by Y to confirm and the enter key to verify the filename to save and exit nano. Then execute source /etc/profile to refresh the path.

TrackBack

TrackBack URL for this entry:
http://jamesnsears.com/mt-tb.cgi/89

Comments (25)

Fredrik:

Wow, that's really great! One problem though; whenever I try to run the command I get a permission denied error, and if I try adding sudo in front my Terminal tells me it can't find bchunk... Any leads?

JC:

Your download link does not work ... opens up a file in the browser with a bunch of junk. Can you zip up the compiled file so it is easier to download.

Gwen:

Thanks for doing this. I'm still dufus when it comes to command line, so it took me a while to figure out the problem when it said 'file not found'. It was because the default directory inside the terminal was not my desktop. Being primarily a GUI user, that's where the files were sitting. I dredged up my old memories of dos (the last time I really used a command line), and was able to change the directory. I don't actually know what the desktop directory is called in OSX, so I type cd /applications/, and moved the files in there. Once I did that, everything went perfectly. Thanks again!

aaron:

I've got all the files into usr/bin now, but when i try the conversion line it says
"-bash: /usr/bin/bchunk: Bad CPU type in executable"

i'm not real sure what bash is, but as far as i can tell i followed the directions

Iluvatar:

This looks like a great utility. It's running now, let's hope it works.

For any non-terminal people, a quick primer on navigation:

The main level of your harddrive is "/"

Your home directory (where your terminal will probably start) is "/Users/YourUserName/"

Your desktop is "/Users/YourUserName/Desktop"

To get to your desktop, just type "cd /Users/YourUserName/Desktop"

Yo make sure that you're in the correct folder, type "ls" to show the contents of the folder you in.

Hope that helps, and it looks like my iso is done.

Thanks for this.. very handy (used it to convert bin/cue to iso so vmware can mount it.. woop)

Flavio Mouzo:

Hi..
I want to say that you can convert a .bin image to iso if you change the extension. Only You have to Change the extension since .img to .iso (renaming the file) and you will be able to use it
Thanks

tony:

Hey, I just tried running bchunk and I get a -bash error "cannot execute binary file". Any idea what I might be doing wrong?

eia:

This is truly great - and thanks for making that compiled binary available!

Ben Loveridge:

Thanks, invaluable tip, this is exactly what I WAs looking for. Also, if you are have MacPorts installed (http://www.macports.org/), installing this is a breeze: sudo port install bchunk

Thanks again!

Anne:

Great tip, extremely lightweight and fast. Thanks!

Harry:

Thanks so much for this! Really helped.

kone:

I tried this on G5 and G4, and get messages "Bad CPU type in executable" (G5) and "cannot execute binary file" (G4). Anyone help?

Mike T:

im getting, "cannot execute binary file" on G3, any ideas anyone?

Jeff Mendelson:

I can get up to the point of entering myinputfile.bin and myinputfile.cue and myoutputfile but I get a Command not found. What should I be entering for my outputfile. Can you help
Jeff

Jason:

I found this page by Googling for ".bin extension Mac OS X" and want to thank you for posting this info. It has really helped me out.

Thanks!

aaaaa:

worked perfect

Aviv:

Thanks, this was extremely helpful!

A SATISFIED USER:

Awesome, works exactly like it says on the box. Thanks!

Thom:

I would suggest for anyone that is interested in any command line utilities to check out MacPorts (http://www.macports.org/). There are so many *nix programs out there that can be easily installed with MacPorts.

Thanks for letting me know about bchunk. :)

Stigré:

Every time I run this, all that happens is it writes a .ugh file. I cannot seem to get it to compile an iso from my bin and cue files.

Justin:

Just what I needed, worked first time - Thanks!

thanks for the code.

i needed to compile the code myself as the supplied version was un-executable. it appears the zip files don't retain the executable permissions. i suggest you put the file into a .dmg file after compiling it for universal binary (ppc and intel).

the command line you suggested made .cdr files that were unreadable by any audio software i have (itunes, quicktime, logic, garage band, peak) but i found if you have the -w option set it will make wave files that quicktime DOES recognize

./bchunk -w "source file.bin" "source file.cue" "dest file"

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Verification (needed to reduce spam):

Music

Where am I?

Recent Photos

Powered by
Movable Type 3.35