1833090 Members
2847 Online
110050 Solutions
New Discussion

Tape Devices

 
SOLVED
Go to solution
Shannon Petry
Honored Contributor

Tape Devices

I have a tape that someone made on a old AIX system, which I can not read. If my memory serves me correctly, the AIX system used byte swapping on the Tape device, and thus the inability to read on a HP-UX system.
How do I create a byte swapping device file so that I can read this tape? I used to do this looong ago, but can not find my notes anywhere.>

Thanks in advance!
Shannon
Microsoft. When do you want a virus today?
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Tape Devices

Hi Shannon:

You use your old friend dd.

Something like this:

dd if=/dev/rmt/3m bs=512 conv=swab | tar xvf -

You may want to play with bs a bit or do 1 dd with large input blocking which in turns pipes to another for the conv=swab.
If it ain't broke, I can fix that.
Michael Tully
Honored Contributor

Re: Tape Devices

Hi,

You could also use 'pax' if you don't know what format the tape was originally cut in.
'pax' can read both tar and cpio tapes.

-Michael
Anyone for a Mutiny ?
Marco Paganini
Respected Contributor

Re: Tape Devices

Hello,

I'm not absolutely sure at this point, but GNU cpio was able to read pretty much ANYTHING you fed it, including tar files, zip files, etc, etc. I'd say they have an option to byte swap the data. BTW, I'm assuming you used cpio, tar or something like that to make the backup.

Regards,
Paga
Keeping alive, until I die.
Frank Slootweg
Honored Contributor

Re: Tape Devices

Building on Clay's response:

If you do not know the tape format, then may be reading one record and inspecting it with file(1), xd(1), etc. might help, i.e.

dd if=/dev/rmt/... of=/tmp/record bs=64k count=1 [conv=swab]

file /tmp/record

xd -bc /tmp/record | more

etc..
Darrell Allen
Honored Contributor

Re: Tape Devices

Hi Shannon,

Already mentioned: dd, pax (which covers tar and cpio). What about dump?

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
harry d brown jr
Honored Contributor

Re: Tape Devices

Shannon, I don't think AIX is a byte swapped machine, but then again that was eon's ago. What error message did you get trying to use tar or cpio? Also, can you show us the "magic number" by doing this:

dd if= bs=1 count=100 | od -bc

From the "magic number" we can easily determine if it is byte swapped and what kind of tape it is.

live free or die
harry
Live Free or Die