[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090105114730.GD3268@1wt.eu>
Date: Mon, 5 Jan 2009 12:47:30 +0100
From: Willy Tarreau <w@....eu>
To: Ian Campbell <ijc@...lion.org.uk>
Cc: Martin Schlemmer <Martin.Schlemmer@....ac.za>,
linux-kernel@...r.kernel.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists