Blog
Compiling a Xen Dom0 Kernel for Ubuntu Jaunty

Compiling a Xen Dom0 Kernel for Ubuntu Jaunty

Distribution: Ubuntu Jaunty 9.04

Configure the environment for Compiling

From the menus choose to System -> Administration -> Software Sources you will see several check boxes.

  • Canonical-supported Open Source software (main)
  • Community-maintained Open Source software (universe)
  • Proprietary drivers for devices (restricted)
  • Software restricted by copyright or legal issues (multiverse)
  • Source code

you should checked all these 5 boxes then click 'Close'. You should see a box that says "The information about available software is out of date". Click on the reload button. When these boxes have gone:

/etc/apt/sources.list should contain at least these two lines:

deb http://archive.ubuntu.com/ubuntu jaunty main universe multiverse restricted
deb-src http://archive.ubuntu.com/ubuntu jaunty main universe multiverse restricted

Now you should be able to use:

apt-get install fakeroot build-essential 
apt-get install crash kexec-tools makedumpfile
apt-get build-dep linux
apt-get install git-core libncurses5 libncurses5-dev


Download and Patch the Kernel

Copy in a suitable configuration

In order to create a configuration that created a bootable kernel I actually used the configuration file found in this package: linux-image-2.6.26-2-xen-686_2.6.26-15_i386.deb

You can download it from from here:

Kernel: http://packages.debian.org/lenny/i386/linux-image-2.6.26-2-xen-686/download Modules: http://packages.debian.org/lenny/i386/linux-modules-2.6.26-2-xen-686/download

and then install using

sudo dpkg -i linux-image-2.6.26-2-xen-686_2.6.26-15lenny2_i386.deb linux-modules-2.6.26-2-xen-686_2.6.26-15lenny2_i386.deb

Its actually possible to run Xen with this debian kernel, and thats the subject of another post

You can now copy in the configuration from that kernel using:

cd /usr/src/linux-2.6.29.2-xen/
cp /boot/config-2.6.26-2-xen-686 .config

Configure and Build the Kernel

cd /usr/src/linux-2.6.29.2-xen/
make menuconfig
make
make vmlinuz
make modules_install


Copy the Kernel Image and Initial Ramdisk to /boot

cd /usr/src/linux-2.6.29.2-xen/
cp arch/x86/boot/vmlinuz /boot/xen-test-vmlinuz
mkinitramfs -o /boot/initrd-test-2.6.29.2.img 2.6.29.2


Create a Suitable Entry in /boot/grub/menu.lst

title           TEST Xen 3.3.0 / Ubuntu 9.04
uuid 32ce16fb-1400-4d71-bb37-c98ef140e501
kernel /xen-3.3.0.gz
module /xen-test-vmlinuz root=/dev/vga/dom0 ro console=tty0
module /initrd-test-2.6.29.2.img

Other related Ubuntu Xenarticles.

Posted By: admin on Jun 08, 2009 05:58AM Category:Ubuntu Add Comment

patch: ../xen-patches/60002_linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch1: extra operand

Posted By: Tapas on Nov 14, 2009 08:57AM

above is the error I got when applying patches to the kernel

Posted By: Tapas on Nov 14, 2009 08:57AM

There have been hardware compatibility issues with my machine I used a Pentium D with 102 GCC motherboard Xen Live CD gave a kernel panic,CentOS gave PCI MMCONFIG error and then similar was the case with Ubuntu server edition MP BIOS Bug Timer 8254 I had I have tried OpenSuse 11.2 DVD also and it failed to boot the error I got was Emask 0X4 now what more should I try I am downloading Debian and Ubuntu 8.10 DVD that will be my last try to Xen since in past the attempts to compile and reconfigure Dom0 kernels from git clone command have not worked since the correct config file could not be generated. A lot of documentation is available but needs to be updated and should mention what works.

Posted By: Tapas on Nov 14, 2009 12:10PM

I have finally been able to succesfull compile the kernel using the config file mentioned above
while using make menuconfig load the alternate configuration file which in above steps was renamed to .config and then when u compile it
use the following
blog
http://www.howtoforge.org/installing-xen-3.3-with-kernel-2.6.27-on-ubuntu-8.10-x86_64
to look for the instructions finally my grub failed to boot it gave me an error I am following that error to see if any thing can be done or I will try Debian

Posted By: Tapas on Nov 16, 2009 12:17PM