Xen without pae on Debian Testing/Unstable
I am trying to install xen on my debian a week ago, but failed because of that damn PAE build-in debian kernel for xen and my poor Pentium-M without PAE. Today I retried to install xen(now the version is 3.0.4) from source. Follow the README in the package, everything goes well except extremely long time waiting for kernel compiling - it filled kernel with all kinds of driver modules…
I went with option KERNELS=”linux-2.6-xen0 linux-2.6-xenU” first, everything goes well. But when I try to customize kernel and build a linux-2.6-xen kernel(not only a dom0, but also a an unprivileged guest kernel), and reboot it, I found I encountered this:
VFS: Cannot open root device “hda7″ or unknown-block(0,0)
Please append a correct “root=” boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0) (XEN) Domain 0 crashed: rebooting machine in 5
seconds. (XEN) Domain 0 crashed: rebooting machine in 5 seconds.
I double checked my /boot/grub/menu.lst, and it was written correctly. So I looked it for google, and mailing list of xen-users told me that:
The -xen kernel is built with almost all drivers configured as modules; hence you’ll need an initrd including the driver[s] for your scsi or ide controller so you can mount the root filesystem.
So what I have to do is add a initrd for my xen kernel. But later I found that mkinitrd which mentioned in README is out of date. According to the Debian Wiki, debian have switched from initrd to initramfs. So another tool
It’s easy to get a initramfs with yaird(and also mkinitramfs can be used too, which appears to be more widely used). Yaird’s configure file located at /etc/yarid, but almost nothing need modified in my case. So I only run following command as a sudoer:
yaird –verbose –output=/boot/initrd.img-xen 2.6.16.33-xen
And appended the following line to the xen’s section in /boot/grub/menu.lst:
title Xen 3.0.4 / XenLinux 2.6.16.33
root (hd0,6)
kernel /boot/xen-3.0.gz
module /boot/vmlinuz-2.6.16-xen root=/dev/hda7 ro console=tty0
module /boot/initrd.img-xen
Take care of “module”. It isn’t “initrd”, for xen take over the kernel while booting.
And reboot, everything goes well with your customize kernel.
May 4th, 2007 at 11:09 pm
yaird dont work here, but mkinitramfs does,
thx for your article
May 5th, 2007 at 12:21 am
My pleasure!
In fact, it seems that mkinitramfs is more generally used…
Thanks for remind!
September 2nd, 2007 at 12:34 am
Debian kernel with PAE runs on Pentium-M, with Xen you’ll need to run PAE hypervisor, that’s all.
May 27th, 2008 at 4:29 am
thanks so much. works now.