I faced the same when getting a tar file from a target. The "default" tar
command installed on my ubuntu host reports the following:
host$ tar xvf NAD_crash.14h07m50s470_16863.XCAL-NotifiDis-6-full.tar
tar: Ignoring unknown extended header keyword 'SCHILY.fflags'
NAD_crash.14h07m50s470_16863/
tar: Ignoring unknown extended header keyword 'SCHILY.fflags'
NAD_crash.14h07m50s470_16863/core.lz4
tar: Unexpected EOF in archive
tar: rmtlseek not stopped at a record boundary
tar: Error is not recoverable: exiting now
It appears that the tar
command installed on the target is the BSD version one:
target# /bin/tar --version
bsdtar 3.4.1 - libarchive 3.4.1 zlib/1.2.7.1 liblz4/1.8.3
And the same command on my ubuntu host is the GNU one:
host$ tar --version
tar (GNU tar) 1.30
So, I installed the BSD tar
command on my host through the libarchive-tools package to get the bsdtar
command:
host$ sudo apt install libarchive-tools
[...]
host$ bsdtar --version
bsdtar 3.4.0 - libarchive 3.4.0 zlib/1.2.11 liblzma/5.2.4 bz2lib/1.0.8 liblz4/1.9.2 libzstd/1.4.4
Then, I was able to untar my archive without error:
host$ bsdtar xvf NAD_crash.14h07m50s470_16863.XCAL-NotifiDis-6-full.tar
x NAD_crash.14h07m50s470_16863/
x NAD_crash.14h07m50s470_16863/core.lz4