[opensuse-kernel] Clarification of bzImage vs gzip vmlinuz-* for -default/-xen kernels?
I'm troubleshooting a Xen boot, using recent PVGRUB, of an opensuse DomU. @ console I see an error: ... ERROR Invalid kernel: xc_dom_probe_bzimage_kernel: kernel is not a bzImage xc_dom_bzimageloader.c:350: panic: xc_dom_probe_bzimage_kernel: kernel is not a bzImage ... I note, file `ls /boot/vmlinuz-2*` /boot/vmlinuz-2.6.31.8-0.1-default: Linux/x86 Kernel, Setup Version 0x20a, bzImage, Version 2.6.31.8, RO-rootFS, root_dev 0x301, swap_dev 0x3, Normal VGA /boot/vmlinuz-2.6.31.8-0.1-xen: gzip compressed data, from Unix, last modified: Thu Dec 17 18:32:20 2009, max compression /boot/vmlinuz-2.6.31.9-0.0.0.3.3490791-default: Linux/x86 Kernel, Setup Version 0x20a, bzImage, Version 2.6.31.9, RO-rootFS, root_dev 0x809, swap_dev 0x3, Normal VGA /boot/vmlinuz-2.6.31.9-0.0.0.3.3490791-xen: gzip compressed data, from Unix, last modified: Tue Dec 29 08:20:57 2009, max compression Is there a reason that the -default kernels are built as "bzImages", and the -xen kernels as "gzip compressed data"? PVGRUB's apparently had some recent patches/issues re: bzImage, gzip, lzma compression etc; following those up of course. This difference seems possibly relevant to the error above. Any clarification is appreciated. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/11/2010 06:48 PM, mail ignored wrote:
I'm troubleshooting a Xen boot, using recent PVGRUB, of an opensuse DomU.
@ console I see an error:
... ERROR Invalid kernel: xc_dom_probe_bzimage_kernel: kernel is not a bzImage xc_dom_bzimageloader.c:350: panic: xc_dom_probe_bzimage_kernel: kernel is not a bzImage ...
I note,
file `ls /boot/vmlinuz-2*` /boot/vmlinuz-2.6.31.8-0.1-default: Linux/x86 Kernel, Setup Version 0x20a, bzImage, Version 2.6.31.8, RO-rootFS, root_dev 0x301, swap_dev 0x3, Normal VGA /boot/vmlinuz-2.6.31.8-0.1-xen: gzip compressed data, from Unix, last modified: Thu Dec 17 18:32:20 2009, max compression /boot/vmlinuz-2.6.31.9-0.0.0.3.3490791-default: Linux/x86 Kernel, Setup Version 0x20a, bzImage, Version 2.6.31.9, RO-rootFS, root_dev 0x809, swap_dev 0x3, Normal VGA /boot/vmlinuz-2.6.31.9-0.0.0.3.3490791-xen: gzip compressed data, from Unix, last modified: Tue Dec 29 08:20:57 2009, max compression
Is there a reason that the -default kernels are built as "bzImages", and the -xen kernels as "gzip compressed data"?
PVGRUB's apparently had some recent patches/issues re: bzImage, gzip, lzma compression etc; following those up of course.
This difference seems possibly relevant to the error above.
Any clarification is appreciated.
The bzImages are essentially self-executing compressed images. They consist of a binary blob and a decompressor that runs before transferring control to the real kernel. The blob is the ELF vmlinux processed via objcopy -O binary. It is _not_ a bzip-compressed kernel. The blob may be bzip compressed, but it's not required. It will be lzma, bzip2, or gzip, in that order of priority if enabled. The gzipped versions are the ELF vmlinux run through gzip. It needs an external agent to decompress and parse it before transferring control. As for the differences with pvgrub, I'm not familiar with it. - -Jeff - -- Jeff Mahoney SuSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAktLwbsACgkQLPWxlyuTD7JA0QCgqd+uVxlBLX/Mg7mSKwTbUvvF 3GMAoKhywn1fUNApKntT+czG+FvLue4o =tZM2 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, Jan 11, 2010 at 4:26 PM, Jeff Mahoney <jeffm@suse.com> wrote:
The bzImages are ... (snip)
Clearly explained. Thanks.
The gzipped versions are the ELF vmlinux run through gzip. It needs an external agent to decompress and parse it before transferring control.
As for the differences with pvgrub, I'm not familiar with it.
That 'external agent', and it's presence, or lack, in PVGRUB is something I'll explore. 'what' is now in hand. Any reason *why* the opensuse -xen kernels are NOT 'delivered' as bzImages, whereas the -default are? -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Tuesday 2010-01-12 01:40, mail ignored wrote:
On Mon, Jan 11, 2010 at 4:26 PM, Jeff Mahoney <jeffm@suse.com> wrote:
The bzImages are ... (snip)
Clearly explained. Thanks.
The gzipped versions are the ELF vmlinux run through gzip. It needs an external agent to decompress and parse it before transferring control.
As for the differences with pvgrub, I'm not familiar with it.
That 'external agent', and it's presence, or lack, in PVGRUB is something I'll explore.
'what' is now in hand.
Any reason *why* the opensuse -xen kernels are NOT 'delivered' as bzImages, whereas the -default are?
FTR, arch type name x86-* compressed bzImage x86-xen compressed vmlinuz alpha-* compressed vmlinuz ppc/64-* - vmlinux ia64-* compressed vmlinuz s390/x-* compressed image(vmlinux) sparc64-* - vmlinux -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, Jan 11, 2010 at 5:08 PM, Jan Engelhardt <jengelh@medozas.de> wrote:
arch type name x86-* compressed bzImage x86-xen compressed vmlinuz
Is it possible to *convert* a vmlinuz (gzip compressed) to a bzImage? I believe I could rebuild the kernel, specifying a different image type ... looking for a simpler step to test. My goal is to 'feed' a -xen bzImage to the Dom0's PVGRUB bootloader (hosted, so I can't get to it), and see if it stops complaining ... Some very recent PVGRUB patches seem to address problems with LZMA/BZIP2 decompression; I've found nothing, yet, re: GZIP itself, though. Given your info above, the fact that the -xen vmlinuz *is* provided as gzip compressed, and checking, /usr/src/linux-2.6.31.8-0.1/arch/x86 > egrep "LZMA|GZIP|BZIP" Kconfig select HAVE_KERNEL_GZIP select HAVE_KERNEL_BZIP2 if !XEN select HAVE_KERNEL_LZMA if !XEN it seems that BZIP & LZMA compression are neither available nor turned on for XEN case. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/11/2010 08:24 PM, mail ignored wrote:
On Mon, Jan 11, 2010 at 5:08 PM, Jan Engelhardt <jengelh@medozas.de> wrote:
arch type name x86-* compressed bzImage x86-xen compressed vmlinuz
Is it possible to *convert* a vmlinuz (gzip compressed) to a bzImage? I believe I could rebuild the kernel, specifying a different image type ... looking for a simpler step to test. My goal is to 'feed' a -xen bzImage to the Dom0's PVGRUB bootloader (hosted, so I can't get to it), and see if it stops complaining ...
Some very recent PVGRUB patches seem to address problems with LZMA/BZIP2 decompression; I've found nothing, yet, re: GZIP itself, though.
Given your info above, the fact that the -xen vmlinuz *is* provided as gzip compressed, and checking,
/usr/src/linux-2.6.31.8-0.1/arch/x86 > egrep "LZMA|GZIP|BZIP" Kconfig select HAVE_KERNEL_GZIP select HAVE_KERNEL_BZIP2 if !XEN select HAVE_KERNEL_LZMA if !XEN
it seems that BZIP & LZMA compression are neither available nor turned on for XEN case.
It's possible, but not without building most of the kernel again to get setup.bin and the decompression helper. Then it's some manual hackery. I don't really think that's the best place to start though. I'm not sure which order pvgrub tries kernel types, but it may be that it's decided that it's not a compressed vmlinux already. - -Jeff - -- Jeff Mahoney SuSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAktL0AgACgkQLPWxlyuTD7JQ0QCfZPhcbMsLkOYDXOOI1HkT357C FoAAoJoLKHAAFnny3FiuSMtsCCzXrdyO =KJ6o -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, Jan 11, 2010 at 5:27 PM, Jeff Mahoney <jeffm@suse.com> wrote:
I don't really think that's the best place to start though. I'm not sure which order pvgrub tries kernel types, but it may be that it's decided that it's not a compressed vmlinux already.
That's a good question ... Looking now at this recent patch, http://xenbits.xen.org/staging/xen-unstable.hg?rev/a687c4d35fdd IIUC, the order of attempted decompression is: gzip, bzip, then lzma ... + ret = xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size); ... + ret = xc_try_bzip2_decode(dom, &dom->kernel_blob, &dom->kernel_size); ... + ret = xc_try_lzma_decode(dom, &dom->kernel_blob, &dom->kernel_size); but that's AFTER the error i see ("kernel is not a bzImage"), as a result of earlier code, - if ( verbose ) - xc_dom_panic(XC_INVALID_KERNEL, "%s: kernel is not a bzImage\n", - __FUNCTION__); + xc_dom_panic(XC_INVALID_KERNEL, "%s: kernel is not a bzImage\n", + __FUNCTION__); Given your explanation above, and the apparent fact that AFTER that panic occurs, at (ENTER) at console the boot *continues* to completion, I think I'm not seeing a decompression problem at all, but rather something earlier ... So, I've got something to work with. IN any case, I'm still unsure WHY the -xen and !-xen cases are built differently,
arch type name x86-* compressed bzImage x86-xen compressed vmlinuz
Thanks. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
mail ignored <0.bugs.only.0@gmail.com> 12.01.10 03:00 >>> IN any case, I'm still unsure WHY the -xen and !-xen cases are built differently,
Because of compatibility constraints: Only relatively recent Xen can load bzImage format files as Dom0 kernel (and it requires even more recent [not officially released] Xen to support bzip2/lzma compression). While I have been using a kernel patch to allow both for quite some time on our HEAD kernel, there are currently no plans to commit it (likely only after SLE11 SP1 branched from HEAD, i.e. for 11.3, unless at that point we would switch over to pv-ops anyway). Jan -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (4)
-
Jan Beulich
-
Jan Engelhardt
-
Jeff Mahoney
-
mail ignored