# "tar: Unrecognized archive format" 9.0 RELEASE only



## lubos (Jan 18, 2012)

Hello,

I backed up some files on a floppy from a 8.2 RELEASE system:
`# tar -cf /dev/fd0 ./*`

Listing archive contents or extracting files on another 8.2 RELEASE system, there is no problem:
`# tar -tf /dev/fd0`

Unfortunately, trying this on a 9.0 RELEASE system returns:

```
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
```

Does anyone know the cause? Thank you in advance,

Lubos


----------



## kientzle@ (Jan 26, 2012)

Can you email me the first few kB of that file? (kientzle@freebsd.org)
`# dd if=/dev/fd0 of=sample.data bs=1k count=8`

If you can't mail an attachment for some reason, I can probably puzzle it out from a hex dump:
`# dd if =/dev/fd0 bs=1k count=2 | hd`

Cheers,

Tim


----------



## kientzle@ (Jan 27, 2012)

Thanks for sending that data.  I've fed it through a couple of bsdtar versions and haven't managed to get anything to break for me.

So I suspect this is a problem with bsdtar reading directly from the floppy.  (Unfortunately, I don't have any floppy drives handy to test with.)

Please try this and let me know if it makes a difference:

`# dd if=/dev/fd0 bs=1k | tar tf -`

If it does, I'll take a look at tar's I/O code to see if there are any obvious changes from 8.2 to 9.0 that would explain this.


----------



## lubos (Jan 27, 2012)

kientzle@ said:
			
		

> Please try this and let me know if it makes a difference ...



No, the same error:

```
tar: Unrecognized archive format.
```
I tried it even on the 8.2 system for the sake of certainty and there was no problem.


----------



## wblock@ (Jan 28, 2012)

It might be interesting to see the output of
`% which tar`
`% tar --help`


----------



## lubos (Jan 30, 2012)

wblock@ said:
			
		

> It might be interesting to see the output of
> `% which tar`
> `% tar --help`



I am sorry, but I don't see your point... There must be an inner difference in 9.0's tar, because all erroneous inputs are processed properly with 8.2's tar.


----------



## wblock@ (Jan 30, 2012)

To make sure that it really is FreeBSD 9.0's tar and not some other tar or something else that got ahead of it on the path.


----------



## lubos (Jan 30, 2012)

wblock@ said:
			
		

> To make sure that it really is FreeBSD 9.0's tar and not some other tar or something else that got ahead of it on the path.




```
bsdtar 2.8.4 - libarchive 2.8.4
```

For reference, the working 8.2's tar is:


```
bsdtar 2.7.0 - libarchive 2.7.0
```


----------

