Hi, I cannot uncompress it using standard command:
od -A d -t x1 vmlinuz | grep '1f 8b 08 00'
dd if=vmlinuz bs=1 skip=24584 | zcat > vmlinux
> gzip: stdin: not in gzip format
(of course 24584 is output from 1st command + 8)
I try to do it with:
vmlinuz-2.6.32-131.4.1.el6.x86_64
vmlinuz-2.6.32-131.4.1.el6.x86_64.debug
Have you got any idea how I can uncompress that?
Also, output from 'file vmlinuz-2.6.32-131.4.1.el6.x86_64' is:
Linux kernel x86 boot executable bzImage, version 2.6.32-131.4.1.el6.x86_64 (mock, RO-rootFS, root_dev 0x901, swap_dev 0x3, Normal VGA
PS. I just need vmlinux to debug kernel module.
That would have worked if your kernel was earlier than 2.6.30. The clue is bzImage. Have a look at a script called extract-ikconfig which you can find at kernel.org and elsewhere on the Internet. It does other things besides extracting a bzImage kernel but if you read the script, it extracts the kernel image to a temporary file for other purposes. You can modify this script to do what you want.
1 Like
Thanks fpmurphy for pointing me to extract-ikconfig script. I have found that here:
http://www.kernel.org/pub//scm/linux/kernel/git/jejb/storage-tree/scripts/extract-ikconfig
I describe a little bit my history.
Firstly I installed kernel-debug package (yum install kernel-debug) that caused files:
vmlinuz-2.6.32-131.4.1.el6.x86_64
vmlinuz-2.6.32-131.4.1.el6.x86_64.debug
to come into being in /boot/ directory.
After fighting with those vmlinuz files (I wanted vmlinux) I asked for help on that forum.
Now I got script and if I run it the output is like:
extract-ikconfig: Cannot find kernel config.
I may say also, that in /boot/ directory I have got files:
config-2.6.32.131.4.1.el6.x86_64
config-2.6.32.131.4.1.el6.x86_64.debug
If I remove from 'extract-ikconfig' script following line:
# Prepare temp files:
tmp1=/tmp/ikconfig$$.1
tmp2=/tmp/ikconfig$$.2
#REMOVED THAT LINE: trap "rm -f $tmp1 $tmp2" 0
I got two files in /tmp/ directory.
Output is the same.
Is it something I need?
Thanks
PS. I just need vmlinux to debug kernel module.