Messages in this thread | | | Date | Mon, 5 Jan 2009 12:47:30 +0100 | From | Willy Tarreau <> | Subject | Re: Initramfs from existing vmlinuz |
| |
On Mon, Jan 05, 2009 at 11:12:26AM +0000, Ian Campbell wrote: > On Wed, 2008-12-24 at 00:34 +0100, Willy Tarreau wrote: > > You first have to extract and uncompress the ELF image from vmlinuz. > > For this, look for the gzip signature 1F 8B 08 in your vmlinuz, and > > feed all data starting from this point to zcat. > > Since v2.6.26 (I think, it was v2.08 of the x86 bzImage format anyhow, > which was the same point the payload became ELF formatted) you can find > it directly using the payload_offset and payload_length fields in the > bzImage header. Attached bzexplode.c demonstrates this. e.g. "bzexplode > vmlinuz | zcat > vmlinux.elf"
Thanks Ian.
Indeed, I'm sure this will be useful from time to time!
Cheers, Willy
| |