How to extract the cpio archive in the kernel image?

From: Michael Opdenacker
Date: Wed May 31 2006 - 17:15:44 EST


Hello,

Does anyone know a simple, command line way to extract the cpio archive embedded in a (compressed) kernel image?

That would be useful to modify the initramfs included in the kernel image even if one only has the kernel binary and sources, but not the initramfs sources.

Of course, it is always possible to get the initramfs contents from the running kernel and dump them somewhere, or to write a custom program for this purpose (accessing and uncompressing the embedded cpio archive as the kernel does), but it would be nice it there was a simpler way with regular Unix commands (I guess involving gunzip and cpio).

In a nutshell, how to open the penguin and still get the golden egg? ;-)

Cheers,

Michael.

--
Michael Opdenacker, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1000 pages!)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/