[NCLUG] uncompress error - corrupt file

Sean Reifschneider jafo-nclug at tummy.com
Tue Jul 10 00:52:13 MDT 2001


On Mon, Jul 09, 2001 at 08:55:23PM -0600, S. Luke Jones wrote:
>(which is where the cpio problems come in). I suspect it's just
>bit rot, or possibly a CR LF => LF or vice versa.

Could be...  Have you tried eye-balling the uncompressed files to see if
they look legit?  Especially towards the end?  If the files are text, you
should be able to just look at them towards the end -- if they are the
actual payload you expect to have, the compress is probably working fine,
and it's just a cpio format issue.  If it looks like garbage, you can look
back to about where it started and find out about where it may have
happened in the source file, and see if you can figure out where the
corruption may have started.

That's where I'd start looking...  I'm not THAT familiar with cpio's raw
format, but I believe it's got a variable-length header followed by the
payload followed by another header.  It's not like tar where it's blocked
in 512-byte chunks.  But, it shouldn't be *TOO* hard to poke around with
some minimal format information.

There's a Posix section that discusses the CPIO format, and when I was
writing tools to process tar files I found that gnutar had some useful
information in it -- paritcularly relating to the gnu extensions...

You have tried the different format options that cpio supports, right?

Sean
-- 
 Give a man a match and he'll be warm for an hour...
 Set him on fire and he'll be warm for the rest of his life.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the NCLUG mailing list