« 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.

Comments (26)

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!

Archie Cooper:

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?

dan:

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.

Works fine. You do not need toast!!!

Johann Gudmundsson:

Thanks a lot for this, saved me a lot of hassle! :)

Jezmo:

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!

greg:

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.

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

lfat:

Amazing! Thanks alot!

vondank:

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/ )

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 :)

Charlotte:

Thanks!

John Wayne:

Thank you james for compiling it. Thanks you aaron and Kambiz for explaining it for non terminal people

Worked perfectly. Thanks!

bopfrog:

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

At first, I found posts talking about Toast Titanium, but that's too much work :) And this utility is awesome! Thanks.

Thanks for this! (hopefully) saved my day...

I just want to add som simple steps for those TOTALLY non-terminal-users...

I'm copying @lfat posts with some changes:

1- download bchunk from: http://garage.interblaze.com/drop/bchunk.zip

2- extract the file and copy it into some location - desktop will do if you are not saving for future uses...

3- open 'Terminal' and type:
sudo chmod a+x

be aware to leave a blank space after the "x"

4- drag and drop the file bchunk into the terminal window
(you'll have something like this:
sudo chmod a+x /User/Azul/Desktop/bchunk
depending on where you put the file)

5-click on the terminal window, and press ENTER key

6- it will ask for your password

7-once again, drag and drop the file bchunk into the terminal window

8-drag and drop the .bin file on the terminal window

9-drag and drop the .cue file on the terminal window

10-drag and drop on the terminal window the folder, where you want to put your output file

11-click on the terminal window AND ERASE ONE BLANK SPACE AT THE END OF THE LINE

12-type your output file name (i.e "output.iso" will do fine)

13-press ENTER key

done

sorry for all the ones who doesn't want to read this, but this was the only explanation that actually worked for a colleague, so it may probably work for someone else...

/best
/j

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