linode is great

Xen Paravirtualized CentOS domU on CentOS 5.3 dom0

How to install paravirtualized CentOS 5.3 x64 as domU

# virt-install --paravirt \
               --name centosx64 \
               --ram 512 \
               --file /home/xen/images/centosx64.img \
               --file-size 10 \
               --nographics \

It means Memory: 512MB, Disk Image: 10GB and No Graphics
Check the comment if you want to make use of pre-downloaded iso image or dvd.

If you want to add Desktop environment after instrallation, just add these.

# yum groupinstall "X Window System" 
# yum groupinstall "GNOME Desktop Environment"


CentOS 5.3 + linux-2.6.27 kernel

Anyway, I wasn’t happy with the XEN 3.3 with the xen kernel 2.6.18-128.1.10.el5xen (got these by yum)
Let’s update the newer kernel and Xen.

So, download the xen kernel 2.6.27, then apply patches, and compile. Let’s see if it works with Xen 3.4…

$ git clone
$ cd linux-2.6.27
$ git clone .git/patches
$ guilt-push -a

(These commands above are taken from Xen-devel ML.)
I have been looking for the best Linux distro + Xen, but I hope CentOS 5.3 will be the one.


Error 1:
drivers/built-in.o: In function `acpi_ec_read’:
/usr/src/linux-2.6.27/drivers/acpi/ec.c:390: undefined reference to `in_query_wmi_event_data’

make: *** [.tmp_vmlinux1] Error 1

Patch 1: It’s fun to see this kind of comment “HACK ALERT!!” But just comment out this hack…

diff –git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2359480..b2c0221 100644
— a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -387,6 +387,7 @@ static int acpi_ec_read(struct acpi_ec *ec, u8 address, u8 * data)
* Please refer to wmi.c for an explanation on why we added this hack.
if ( in_query_wmi_event_data == TRUE ) {
if ( address == 0x2b ) {
wmi_event_data_index = 0;
@@ -398,6 +399,7 @@ static int acpi_ec_read(struct acpi_ec *ec, u8 address, u8 * data)

return result;

$ make
$ make install
$ make modules_install
$ mkinitrd /boot/initrd-

Then, edit /boot/grub/menu.lst accordingly.

Installing Fedora 10 on a MacBook Pro

Ubuntu was a really bad choice for XEN HVM dom0/domUs…
Fedora 10 doesn’t support xen kernel as well.
Back to Fedora 8…

Install Xen Kernel on Ubuntu 9.04 Jaunty i386

I stole the kernel from debian’s pool.

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

* It’s a good idea to look for newer version. I don’t know why we cannot search by the debian website. But you can use the FTP…

Compiling XEN Kernel on Ubuntu 9.04 32bit

I am compiling XEN Kernel on Ubuntu 9.04 32bit
GCC is 4.3.3 and some issues with new compiler’s optimization.

This is on-going memo… I have compiled the kernel but it seems not compatible with Ubuntu 9.04.
So, I switched the xen kernel version supported by debian team.




(1) undefined reference to `__udivdi3′
arch/x86/kernel/built-in.o: In function `timer_interrupt’:
/usr/src/linux- undefined reference to `__udivdi3′
make: *** [.tmp_vmlinux1] Error 1
root@ubunzzo:/usr/src/linux- vi /usr/src/linux-

My attempt after reading reference (2) was successful, I inserted the asm(“”:”+r”(delta)) to the timer_interrupt function at the while scope at line number around 500.

        /* System-wide jiffy work. */
        if (delta >= NS_PER_TICK) {
                do_div(delta, NS_PER_TICK);
                processed_system_time += delta * NS_PER_TICK;
                while (delta > HZ) {


                        delta -= HZ;

* This works because this asm fools gcc compiler not to use optimization.
I guess do_timer internally uses do_div macro?

I found the same kind of fix in linux kernel here

The AT&T assembly format still looks confusing…