Posts Tagged Ubuntu

convert CD and DVD image formats – bin cue iso

If you’ve come across a pair of files from the net with the extensions bin and cue, you might find that there’s not a whole lot you can do with it in Ubuntu. To convert it to a more usable format like iso, you can use the binchunker application, which is in the repositories. To install bchunk, type the following command at a terminal window :

sudo apt-get install bchunk

If you have both the bin and cue files, all you have to do is type the following command:

bchunk   sourcefilename.bin  sourcefilename.cue  targetfilename

When the program completes, you will have a file called targetfilename01.iso

If you do not have a cue file and only have the bin file, all is not lost. The cue file is just a text file that contains track layout information, so it is still possible to create one. Assuming your bin file is called sourcefilename.bin, create a text file called sourcefilename.cue, and put the following lines into it:

FILE “sourcefilename.bin”  sourcefilename.cue  targetfilename BINARY
TRACK 01 MODE1/2352
INDEX 01 00:00:00

You will typically be using MODE1 for the majority of CDs you encounter. The only other mode I have come across so far is MODE2, which is for Sony Playstation CDs.

After that, you can either burn the ISO to a CD or DVD using Brassero, or mount to your system.

sudo mkdir /mnt/iso
sudo mount -t iso9660 targetfilename01.iso /mnt/iso -o loop

Change directory to /mnt/iso, and voila, there’s your ISO file’s contents.

Advertisements

Leave a Comment

removing ^M from the end of every line

Ever had someone send a file to you in *nix and you see a ^M at the end of every line? In the Windows world, the end of line is marked by a Carriage Return (^M) and a Line Feed. *nix treats the end of line differently – it does not use the ^M. This typically happens when someone transfer a text file from Windows to *nix using binary transfer in ftp as opposed to ascii.

To remove the ^M characters at the end of all lines in vi, do this :

:%s/^V^M//g

Note that the ^v is a CONTROL-V character and ^M is a CONTROL-Shift-M. When you type this, it will look like this:

:%s/^M//g

In *nix, you can escape a control character by preceeding it with a CONTROL-V, so here we are telling vi to globally replace the ^M character with nothing.

Leave a Comment

changing hostnames in Solaris and Linux

For Linux:
run hostname command or edit /etc/hosts file.

For Solaris 8, the following files have to be edited :
/etc/hosts
/etc/nodename
/etc/hostname.<interface name>
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts

where <interface name> is the driver name followed by the instance number of the interface, i.e. ce0, bge0, hme0, qfe0, etc.. You can find all of your network interfaces by drivername and instance# by running the following command:

prtconf -D | grep network

or just go into /etc and do : ls hostname*

For Solaris 10, the following files have to be edited :
/etc/hosts
/etc/nodename
/etc/hostname.<interface name>
/etc/inet/ipnodes

edit /etc/dumpadm.conf, and create the directory where it puts the dumps.

rename /var/crash/<oldhostname> to /var/crash/<newhostname>, then run hostname <newhostname>

A reboot is also recommended to make sure all settings were picked up.

Leave a Comment