Compiling a Xen Dom0 Kernel for Ubuntu Jaunty
Distribution: Ubuntu Jaunty 9.04
- Note: You do not need to compile your own Dom0 kernel, read this article here to see how you can get Xen working on Juanty without compiling a kernel: www.infohit.net/blog/post/running-xen-on-ubuntu-intrepid-and-jaunty.html
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
- Download Kernel from www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.2.tar.bz2
- Download Patches from gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.29-6.tar.bz2
- Unpack into /usr/src/ and /usr/src/xen-patch
- Apply patches with <dl><dd> cd /usr/src/linux-2.6.29.2 </dd><dd> cat ../xen-patch/* | patch -p1 </dd></dl>
- cd /usr/src
- mv linux-2.6.29.2 linux-2.6.29.2-xen
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.
patch: ../xen-patches/60002_linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch1: extra operand
above is the error I got when applying patches to the kernel
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.
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