[SUMMARY]Tar: Unknown block size

From: Levi Ashcol <leviashcol_at_hotpop.com>
Date: Sat Feb 15 2003 - 07:17:39 EST
My original post is below.(Sorry for the late SUMMARY)

Thanks to:
 Frode Stromsvag 
 Shalendra Halka 
 Baranyai Pal 
 Brian Sherwood 
 Darren Dunham 

- Try GNUtar
ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/tar-1.13.19-sol8-sparc-lo
cal.gz
- cd /tmp ;/bin/mt -f /dev/rmt/0 rewind;
  /bin/dd if=/dev/rmt/0 of=/tmp/dd.out bs=128k count=1;
  /bin/du /tmp/dd.out This shows the block size (# of 512 byte blocks)

- use dd with the largest block size it could take.  If the block size
on the tape was  
  smaller, it would not matter because dd would just send it out as a
stream of data. 
     "dd ibs=1048576 if=/dev/tape0 | tar xvf -" 

-See if the file really is a tar file.
 Try: dd if=/dev/rmt/0cbn ibs=64k | od -c | head
 Also try this (and see if it generates any error messages)
 dd if=/dev/rmt/0cbn ibs=64k | tar tf -

- How to check that this is a tar file ? "Thanks Darren"
$ grep TAR /etc/magic
257     string          ustar           USTAR tar archive

This says that a tar file should have the string "ustar" beginning at
byte 257 in the file.  We can use 'dd' to skip to that spot.

Because	I'm using a 'bs=1', this might not work on a tape.  You can try
it, but if it gives you a 'not enough space' error, you should dd it
onto disk first and then try it.

$ dd if=/tmp/etc.tar skip=257 bs=1 | od -c | head
0000000   u   s   t   a   r  \0   0   0   r   o   o   t  \0  \0  \0  \0
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040  \0  \0  \0  \0  \0  \0  \0  \0   s   y   s  \0  \0  \0  \0  \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0  \0  \0  \0  \0  \0  \0   0   0   0   0   1   5   5  \0
Sure enough, 'ustar' begins at byte 257, so this is a tar file.



Thanks All

Levi



-----Original Message-----
From: sunmanagers-admin@sunmanagers.org
[mailto:sunmanagers-admin@sunmanagers.org] On Behalf Of Levi Ashcol
Sent: 22 January, 2003 12:44 AM
To: sunmanagers@sunmanagers.org
Subject: [Tar] Unknown block size


Gurus,
I have a tape written with tar. The block size is unknown. I have tried
all possible drive devices(m,u,l,h,lc,....) and also -b option with
possible bs (80,512,1024) but every time it gives tar block size error.

I tried tcopy it gives file 1: record nnnn ,.... But did not specify a
block size.

Any other magic solution to read this weird tar tape ?

IWS

Thanks

Levi
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Sat Feb 15 07:21:01 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:03 EST