[lug] compressed cpio archive problems

Tom Tromey tromey at redhat.com
Mon Nov 19 09:55:10 MST 2001


>>>>> "Ralf" == rm  <rm at fabula.de> writes:

Luke> cpio: warning: skipped 1247 bytes of junk

>> One route open to you, which you may not like, is to read up on the
>> various cpio formats, and then examine the archive file using a hex
>> editor.  As I recall (I hacked on GNU cpio for a short time back in
>> 1994 or so), the cpio formats are pretty straightforward.  So this
>> wouldn't be as hard a job as it sounds.

Ralf> Hmm, cpio format _is_ rather trivial, but Luke has to deal with
Ralf> _compressed_ data, and if he manages to read compressed data in a
Ralf> hex editor he'll be my guru of the year :-)

In this particular case he was seeing some files that decompress
without error but which cpio doesn't like.  In that situation he could
use the hex editor.

Ralf> Still, if he's really desparate he could find the "offending"
Ralf> place in the archive and write a little perl program to produce
Ralf> variants of the archive by altering the bits at the offending
Ralf> spot and tests the result by trying to uncompress it (kind of a
Ralf> brute force attack. Which shows that compression and
Ralf> cryptography are closely related topics).

If you know something about the kinds of errors you expect, you can do
even better.  In the distant past a guy I knew wrote a tool which
would fix up compressed archives which had been incorrectly ftpd in
ASCII mode.

Tom



More information about the LUG mailing list