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
I'm completely new to using terminal and shell commands. Is there something I could read to learn how to do this? Or, maybe get a response with enough detail to get me through this one task?
Posted by Archie Cooper | July 17, 2009 12:57 PM
Posted on July 17, 2009 12:57
Thanks alot for this, thank God for this :) I converted all my sample cds to bin files for some stupid reason, and I recently moved over to the osx platform, pretty huge problem for me having to use my original cds to import samples.
Posted by dan | August 7, 2009 4:14 PM
Posted on August 7, 2009 16:14
Works fine. You do not need toast!!!
Posted by Pep Pla | August 17, 2009 12:01 PM
Posted on August 17, 2009 12:01
Thanks a lot for this, saved me a lot of hassle! :)
Posted by Johann Gudmundsson | August 18, 2009 6:54 PM
Posted on August 18, 2009 18:54
WOW.
Thanks for the invaluable tool!
Im not great at command line stuff, but once id put it all in the same folder that i could target easily it worked a dream!!!
Much Appreciated!
Posted by Jezmo | October 9, 2009 9:36 AM
Posted on October 9, 2009 09:36
Thanks for your post, I came across this when faced with the same problem. I found that bchunk was available in macports. So I installed simply with:
sudo port install bchunk
I hope that helps someone.
Posted by greg | October 24, 2009 10:33 PM
Posted on October 24, 2009 22:33
Thanks for putting this up, James. I just used it and it was great.
For those that do not want to place bchunk in their /usr/bin/ folder, i.e. want to run it once, you can just run the application from within the directory you are using it by amending a ./ in front. In other words, this works:
./bchunk myinputfile.bin myinputfile.cue myoutputfile
Posted by Kambiz | November 1, 2009 9:15 AM
Posted on November 1, 2009 09:15
Amazing! Thanks alot!
Posted by lfat | February 4, 2010 5:51 PM
Posted on February 4, 2010 17:51
converting bin to iso in os x
For non programmers:
1- download bchunk from: http://garage.interblaze.com/drop/bchunk.zip
2- extract the file and copy it into the Home directory i.e.
/Users/[your username]
3- open 'Terminal'and type:
sudo cp bchunk /usr/bin/
sudo chmod a+x /usr/bin/bchunk
4- copy your .bin file to your home foler, and in Terminal type:
bchunk input.bin input.cue output.iso
(where input.bin is the file you want to convert)
5- DONE!
(as seen on http://gavin.mclelland.ca/2007/10/04/convert_bincue_to_iso_on_mac_osx/ )
Posted by vondank | February 26, 2010 9:56 AM
Posted on February 26, 2010 09:56
BChunk does not work for me. I'm trying to convert 8GB .bin/.cue image to .iso.
The output is an ugh file (disc1.iso01.ugh).
This is the Terminal output:
=============================
marios-mac-pro:Desktop mario$ bchunk /Users/mario/Downloads/DISC\ 1/disc1.bin /Users/mario/Downloads/DISC\ 1/disc1.cue /Users/mario/Downloads/DISC\ 1/disc1.iso
binchunker for Unix, version 1.2.0 by Heikki Hannikainen
Created with the kind help of Bob Marietta ,
partly based on his Pascal (Delphi) implementation.
Support for MODE2/2352 ISO tracks thanks to input from
Godmar Back , Colas Nahaboo
and Matthew Green .
Released under the GNU GPL, version 2 or later (at your option).
Reading the CUE file:
Track 1: MODE1/2048 (?) 01 00:00:00
Writing tracks:
1: /Users/mario/Downloads/DISC 1/disc1.iso01.ugh 0/0 MB [********************] 100 %
=============================
I also tried verbose mode, and the beginning is the same and the rest as follows:
=============================
Reading the CUE file:
Track 1: MODE1/2048 (?) 01 00:00:00 (startsect 0 ofs 0)
Writing tracks:
1: /Users/mario/Downloads/DISC 1/disc1.iso01.ugh
mmc sectors 0->0 (1)
mmc bytes 0->0 (1)
sector data at 0, 2352 bytes per sector
real data 2352 bytes
0/0 MB [********************] 100 %
=============================
Tried renaming DISC 1 into DISK1, but it wasn't the problem.
Any help with this one?
Thanks :)
Posted by Mario | March 11, 2010 1:04 PM
Posted on March 11, 2010 13:04
Thanks!
Posted by Charlotte | April 17, 2010 9:00 AM
Posted on April 17, 2010 09:00
Thank you james for compiling it. Thanks you aaron and Kambiz for explaining it for non terminal people
Posted by John Wayne | May 10, 2010 10:34 PM
Posted on May 10, 2010 22:34
Worked perfectly. Thanks!
Posted by Reed Olsen | May 16, 2010 1:06 PM
Posted on May 16, 2010 13:06
so i also received the:
-bash: /usr/bin/bchunk: Bad CPU type in executable
error. after a quick look at the bchunk website, it looks like this will only compile for osx 10.1.4. i might be wrong about this but i would be curious to find out what system you are running.
thanks for the help.
btw, i am ppc osx 10.5
Posted by bopfrog | June 1, 2010 2:36 PM
Posted on June 1, 2010 14:36
At first, I found posts talking about Toast Titanium, but that's too much work :) And this utility is awesome! Thanks.
Posted by Serge Boinn | June 2, 2010 5:23 PM
Posted on June 2, 2010 17:23