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.



Comments (25)
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?
Posted by Fredrik | April 15, 2007 5:36 PM
Posted on April 15, 2007 17:36
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.
Posted by JC | May 1, 2007 6:44 PM
Posted on May 1, 2007 18:44
Done.
Posted by James Nick Sears | May 1, 2007 7:28 PM
Posted on May 1, 2007 19:28
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!
Posted by Gwen | May 12, 2007 4:06 AM
Posted on May 12, 2007 04:06
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
Posted by aaron | May 22, 2007 10:30 PM
Posted on May 22, 2007 22:30
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.
Posted by Iluvatar | May 27, 2007 12:49 PM
Posted on May 27, 2007 12:49
Thanks for this.. very handy (used it to convert bin/cue to iso so vmware can mount it.. woop)
Posted by ivar vasara | June 14, 2007 5:35 PM
Posted on June 14, 2007 17:35
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
Posted by Flavio Mouzo | May 31, 2008 12:19 PM
Posted on May 31, 2008 12:19
Hey, I just tried running bchunk and I get a -bash error "cannot execute binary file". Any idea what I might be doing wrong?
Posted by tony | June 16, 2008 4:34 PM
Posted on June 16, 2008 16:34
This is truly great - and thanks for making that compiled binary available!
Posted by eia | September 16, 2008 12:31 PM
Posted on September 16, 2008 12:31
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!
Posted by Ben Loveridge | October 28, 2008 11:32 PM
Posted on October 28, 2008 23:32
Great tip, extremely lightweight and fast. Thanks!
Posted by Anne | November 29, 2008 2:29 AM
Posted on November 29, 2008 02:29
Thanks so much for this! Really helped.
Posted by Harry | December 1, 2008 12:27 AM
Posted on December 1, 2008 00:27
I tried this on G5 and G4, and get messages "Bad CPU type in executable" (G5) and "cannot execute binary file" (G4). Anyone help?
Posted by kone | January 3, 2009 8:10 AM
Posted on January 3, 2009 08:10
im getting, "cannot execute binary file" on G3, any ideas anyone?
Posted by Mike T | January 17, 2009 2:24 PM
Posted on January 17, 2009 14:24
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
Posted by Jeff Mendelson | January 24, 2009 2:58 PM
Posted on January 24, 2009 14:58
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!
Posted by Jason | February 4, 2009 10:46 AM
Posted on February 4, 2009 10:46
worked perfect
Posted by aaaaa | February 6, 2009 10:37 AM
Posted on February 6, 2009 10:37
Thanks, this was extremely helpful!
Posted by Aviv | February 7, 2009 1:05 PM
Posted on February 7, 2009 13:05
Awesome, works exactly like it says on the box. Thanks!
Posted by A SATISFIED USER | February 15, 2009 5:09 PM
Posted on February 15, 2009 17:09
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. :)
Posted by Thom | February 19, 2009 9:10 PM
Posted on February 19, 2009 21:10
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.
Posted by Stigré | April 2, 2009 2:37 PM
Posted on April 2, 2009 14:37
Just what I needed, worked first time - Thanks!
Posted by Justin | April 9, 2009 1:46 PM
Posted on April 9, 2009 13:46
thanks for the code.
Posted by dragz | April 17, 2009 6:39 AM
Posted on April 17, 2009 06:39
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"
Posted by Robert | April 19, 2009 11:45 AM
Posted on April 19, 2009 11:45