[comp.unix.questions] Problems with a munged tar tape

postman#@andrew.cmu.edu.UUCP (01/31/87)

ReSent-To:nntp-xmit#@andrew.cmu.edu
Return-path: <dk1z#@andrew.cmu.edu>
To: outnews#ext.nn.comp.unix.questions@andrew.cmu.edu (Outbound News)


  I have a 6250 bpi tar tape containing about 50MB of files. (About 5 years
worth of college stuff.) Unfortunately, it seems that someone trying to read
it in from me munged the header as every time I read it, I get an EOF
immediately and no amount of effort can get past it. Also, the tape now seems
to think it's a 1600 bpi tape and not a 6250 bpi tape. I've tried using dd to
get past it, and I've tried using combinations of fseek, lseek, read, et all.
No luck. Only thing I've not tried is physically cutting the header off and
seeing what happens. As that is rather final, I'd like to know if there are
any other things I could try. Are there any services out there that recover
munged tapes?

-David Kovar

ken@rochester.UUCP (02/01/87)

I would have mailed but I can't figure out your address.

Try using mt to skip one file, then dd. It looks like somebody
overwrote the first part of it. Some tape controllers have automatic
density sensing so if you do any reads on it at all it will think a
1600 bpi tape was mounted.

	Ken

ggs@ulysses.UUCP (02/03/87)

In article <24358@rochester.ARPA>, ken@rochester.ARPA (SKY) writes:
> I would have mailed but I can't figure out your address.
> 
> Try using mt to skip one file, then dd. It looks like somebody
> overwrote the first part of it. Some tape controllers have automatic
> density sensing so if you do any reads on it at all it will think a
> 1600 bpi tape was mounted.
> 
> 	Ken

If the 6250 BPI tape really had some crud written at 1600, you will
probably have to write a new tape mark at 6250.  The tape drives I
have seen not only sense density, but refuse to change density from
that of the first record.  Since the density is encoded in a
"density id burst" that preceeds the first record, a file skip won't
help.  Try 

: > /dev/high-density-auto-rewind-name

(assuming [bk]sh syntax).  The next trick will be to convince tar to
read the munged file.  I don't have any good solution to that one.
If all else fails, dump the raw tar file onto a disk then edit out
the tar headers.

-- 
Griff Smith	AT&T (Bell Laboratories), Murray Hill
Phone:		1-201-582-7736
UUCP:		{allegra|ihnp4}!ulysses!ggs
Internet:	ggs@ulysses.uucp

ken@rochester.ARPA (SKY) (02/04/87)

|(assuming [bk]sh syntax).  The next trick will be to convince tar to
|read the munged file.  I don't have any good solution to that one.
|If all else fails, dump the raw tar file onto a disk then edit out
|the tar headers.

That is the easier part. You just have snip off stuff to skip to a
valid file header, at a 256 byte boundary.  I had to do this once.  You
will lose the first one or few files, of course.

	Ken