How to convert .bin to iso image, whithout having .cue file in Linux

26 03 2008

Sometimes you need to make an iso image out of a .bin file, where you usually use bchunk (binchunker).

To get binchunker, type the following command :

sudo apt-get install bchunk

now to use is it , either:

(1) You have the .cue file ,then you just type the following command :

bchunk filename.bin filename.cue filename

(2)Or, If you don’t have the .cue file, .cue file usually contains the track layout information, and it only contains the following lines :

FILE ”BinFileName.bin” BINARY
TRACK 01 MODE1/2352
INDEX 01 00:00:00

Where MODE1 , is the track mode when it is a computer cd, and MODE2 if it is a PlayStation cd.
you can write a one file of shell script to do all of this foe you , just make a new file :

gedit biniso &

Paste the following lines,(you can always use the ampersand at the end of your command to keep the acess to your command line , you don’t need to open a new shell. It is very useful when you run programs from the terminal like “sudo nautilus”, or “mathematica” ):

echo FILE ”$1.bin” BINARY >> $1.cue
echo TRACK 01 MODE1/2352 >> $1.cue
echo INDEX 01 00:00:00 >> $1.cue
bchunk $1.bin $1.cue $1_
rm $1.cue

Where the first three lines are to write the .cue file, the fourth line is the bchunk conversion command ,and the last line is to remove the .cue file.
Save and close , make it executable:

sudo chmod a+x biniso

Now all what you need to do is to run the following command:
./biniso binfilename

You can also place your biniso file in the /usr/local/bin, in the following way :

sudo mv biniso /usr/local/bin

where if you do so you can access it from any path , but the run command is a little different :

biniso binfilename

By now , most probably you have your iso image, you can either burn it , or mount it.

To mount it, first make a directory for the iso image to be mounted to :

sudo mkdir /media/iso

Then you mount the image :
sudo mount -t iso9660 isofilename /media/iso -o loop

To unmount it :

sudo umount /media/iso

Notice that the unmount command is umount with no n.

Source: Linux Lab

About these ads

Actions

Information

4 responses

25 07 2008
pmlxuser

nice instruction, helped me with my .bin files with no cue
this Rocks

21 03 2009
forrito

i have this error
Could not open BIN mybinfile.bin: No such file or directory

21 03 2009
forrito

i solve the problem, i made a file with these lines

FILE ”BinFileName.bin” BINARY
TRACK 01 MODE1/2352
INDEX 01 00:00:00

15 10 2009
james

hi folks, i got the error “no such file…” too.

then i realised, why i get this error – looks like bchunk command cannot use path, so you have to run this command from the folder where are the files you want to change.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: