This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] build problems

On Tue, 2009-12-29 at 10:10 +0000, Justin Ferguson wrote: 
> >> You can most assuredly use a 2.6.18 bzImage for dom0 -- Xen knows what
> >> to do with it.
> >
> > Unless someone backported the v2.08 bzImage format extensions (which I
> > don't think is the case) then you cannot boot a 2.6.18 bzImage under
> > Xen, that support relies on newer fields in the header. IIRC those
> > patches went into 2.6.27 upstream, although e.g. Debian backported them
> > to their 2.6.26 kernel.
> >
> > For 2.6.18 I think you still need to use the old compressed-ELF style
> > kernels.
> Which, may be a problem with my grub config-- but i dont think it is,
> I can't seem to get grub 2 to boot the resultant vmlinux/zImage, it
> just likes to tell me its missing the magic number-- which I'm
> guessing, and my knowledge gets hazy here, is a result of it not being
> a multiboot compatible image?

The kernel you use must be the toplevel vmlinux ELF file, optionally
stripped and optionally gzip compressed. This is not the same as a
zImage which is a format similar to to bzImage but not able to cope with
such large images (it is effectively obsolete).

I think there is a target in the 2.6.18-xen tree which will perform this
strip and compress step for you but I don't recall what it is, it might
be the "vmlinuz" target although note that people often rename whatever
image they have built to that name so if you find one lying around it
isn't necessarily in any particular format.

A correct 2.6.18-xen kernel should respond to the file command like
this: (I happened to have a 2.6.26-xen image hanging around, the output
should be the same for 2.6.18-xen) 
        $ file /boot/vmlinuz-2.6.26-2-xen-amd64 
        /boot/vmlinuz-2.6.26-2-xen-amd64: gzip compressed data, from Unix, last 
modified: Thu Aug 20 01:36:37 2009, max compression
        $ zcat /boot/vmlinuz-2.6.26-2-xen-amd64 | file -
        zcat /boot/vmlinuz-2.6.26-2-xen-amd64 | file -
        /dev/stdin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), 
statically linked, stripped

32 bit kernels will be similar.

The grub examples Keir gave are correct, you just need to be careful
about the kernel image you use. 

If you need to post again please include the exact grub config file you
are using and the precise error messages rather than paraphrasing. 


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>