Next | Prev | Up | Top | Contents | Index

Reading Media From Other Systems

You may not be able to read data created on another vendor's workstation, even if it was made using a standard utility, such as tar or cpio. One problem may be that the tape format is incompatible. Make sure the tape drive where the media originated is compatible with your drive.

If you are unable to verify that the drives are completely compatible, use dd to see if you can read the tape at the lowest possible level. Place the tape in the drive and enter the command:

mt blksize

The mt(1M) command with these options tells you the block size used to write the tape. Set the block size correspondingly (or larger) when you use dd to read the tape. For example, if the block size used was 1024 bytes, use the command:

dd if=/dev/tape of=/usr/tmp/outfile bs=1024

If dd can read the tape, it displays a count of the number of records it read in and wrote out. If dd cannot read the tape, make sure your drive is clean and in good working order. Test the drive with a tape you made on your system.

If you can read the tape with dd, and the tape was created using a standard utility, such as tar or cpio, you may be able to convert the data format with dd. Several conversions may help:

The dd program can convert some completely different formats:

Converting case of letters:

If the data was written on another vendor's system, you may be able to convert it using dd, then pipe the converted output to another utility to read it.

Many other vendors use byte-ordering that is the reverse of the order used by IRIX. If this is the case, you can swap them with the following command:

dd if=/dev/tape conv=swab of=/usr/tmp.O/tapefile

Then use the appropriate archiving utility to extract the information from /tmp/tapefile (or whatever filename you choose). For example, use this command to extract information if the tar utility was used to make the tape on a byte-swapped system:

tar xvf /usr/tmp.O/tapefile .

Note that you could also pipe the dd output to another local or remote tape drive (if available) if you do not need or want to create a disk file.

Or you can use the no-swap tape device to read your files with the following tar command line:

tar xvf /dev/rmt/tps0d4ns

Of course, if your tape device is not configured on SCSI channel 4, the exact /dev/rmt device name may be slightly different. For example, it could be /dev/rmt/tps0d3ns.

It is good practice to preview the contents of a tar archive with the t keyword before extracting. If the tape contains a system file and was made with absolute pathnames, that system file on your system could be overwritten. For example, if the tape contains a kernel, /unix, and you extract it, your own system kernel will be destroyed. The following command previews the above example archive:

tar tvf /tmp/tarfile

If you wish to extract such a tape on your system without overwriting your current files, use this command to force the extraction to use relative pathnames:

tar Rx

or the corresponding bru command:

bru -j



Next | Prev | Up | Top | Contents | Index