[TriLUG] bzImage -> vmlinux

Kevin Otte nivex at nivex.net
Tue Aug 30 16:44:02 EDT 2005


On Tue, Aug 30, 2005 at 09:48:59AM -0400, Kevin Otte wrote:
> Does anyone know of a way to take a zImage or bzImage file (as it ships with
> most distros) and convert it back into the vmlinux file it started off life
> as?  I need the uncompressed kernel image for a project and would really
> like to avoid recompiling a kernel if I can help it.

David Rasch provided some insight this morning on IRC:
10:00:00 < drasch>
http://distributions.linux.com/howtos/Linux-i386-Boot-Code-HOWTO/compressed_head.shtml
10:01:09 < drasch> hexdump -C /boot/vmlinuz-2.4.20-28.9 | grep '1f 8b 08 00'
10:01:25 < drasch> find the offset, dd the image out, then un gzip it

I was able to gunzip the resulting file as he suggested, but it did not
appear to be a valid kernel image:

# file vmlinux
vmlinux: data

Now if I check a vmlinux from a test compile, I get:
# file vmlinux
vmlinux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
statically linked, not stripped

So clearely there is some other voodoo going on here.  I'll probably be able
to poke at this some more tonight when I get home.

-- 
Kevin Otte, N8VNR
nivex at nivex.net
http://www.nivex.net/

-=-

"Those who cannot remember the past are condemned to repeat it." 
-- George Santayana

"It seems no one reads Santayana anymore."
-- Cdr. Susan Ivanova, Babylon 5




More information about the TriLUG mailing list