# tar containing freebsd binary: skipping to next header



## mdg583 (May 26, 2009)

Hello,

On my freebsd desktop machine I patched and compiled a linux program into a freebsd binary. I now recently packaged a bunch of my files into .tar.gz files to move to another computer, and am trying to unpack these .tar.gz files in a linux (ubuntu) operating system. However, it is giving me an error once it tries to unpack the freebsd binary.

Here is what I type:


```
$ tar -xvzf ManiaDrive.tar.gz
ManiaDrive/
ManiaDrive/game/
ManiaDrive/blender/
ManiaDrive/experiment/
ManiaDrive/stunt/
...
ManiaDrive/game/SuperClioBros1.mni
ManiaDrive/game/be_accurate.mni
ManiaDrive/game/test5.mni
ManiaDrive/game/mania2_freebsd.static
tar: Skipping to next header

gzip: stdin: invalid compressed data--crc error

gzip: stdin: invalid compressed data--length error
tar: Child returned status 1
tar: Error exit delayed from previous errors
```

Exactly the same thing happens to another archive with a freebsd binary.

Also, there is the following:

```
$ gunzip ManiaDrive.tar.gz

gzip: ManiaDrive.tar.gz: invalid compressed data--crc error

gzip: ManiaDrive.tar.gz: invalid compressed data--length error
```

Does anyone know if this is a bug or what the issue might be?

Matthew


----------



## BuSerD (May 26, 2009)

Can you unpack it on freebsd and what version of tar is installed on your linux box?


----------



## DutchDaemon (May 26, 2009)

bsdtar <-> GNU tar incompatibility? Or is it strictly limited to the gzip phase?


----------



## mdg583 (May 27, 2009)

Sorry, I'll get back about this if I need to - the archives are failing to unpack in freebsd as well.


----------



## mdg583 (May 28, 2009)

So I was able to copy my files uncompressed, but I havn't figured out this issue. I am not sure I want to put too much work into hunting it down, but here is what happens anyway:

I completely reformatted my usb stick. On my desktop freebsd machine (which uses freebsd 7.2 and ZFS - freebsd was updated using freebsd-update), I am able to open the .tar.gz file in the archive manager normally. I copy it to the usb stick (which is fat32) and once again the archive manager (file-roller) can open it normally. I bring it to my netbook, and my almost fresh install of freebsd 7.2 is not able to extract the file. tar -xvzf fails, gunzip fails, and the archive manager is not able to look into the archive to see its contents.

I think this is an issue with the gzip phase, since gunzip doesn't work either.

gzip -V on my netbook: FreeBSD gzip 20070711
gzip -V on my desktop: FreeBSD gzip 20070711

Thank's anyway for the responses


----------



## DutchDaemon (May 28, 2009)

Try bzip for good measure (that's cv*j*f and *j*xvf to tar, though the latter is superfluous: xvf should work as well when extracting/viewing).


----------

