1. install necessary packages, include but not limited in:
Build-essential cial, curses, openssl, python (ssl support), mercial, gawk, bridge-utils, bin86, bcc, texinfo
2. download these packages from Xen official website
Xen-3.4.2.tar.gz => uncompress to ../xen-4.3.2
Linux-2.6.18-xen-3.4.2.tar.gz => uncomcompress to./xen-4.3.2/linux-2.6.18-xen.hg
From now on, the base directory of paths mentioned below is/xen-4.3.2
3. put these files in/stubdom/
Grub-0.97.tar.gz (ftp://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz)
Lwip-1.3.0.tar.gz (http://download.savannah.gnu.org/releases-noredirect/lwip/lwip-1.3.0.tar.gz)
Newlib-1.16.0.tar.gz (ftp://sources.redhat.com/pub/newlib/newlib-1.16.0.tar.gz)
Pciutils-2.2.9.tar.gz (http://www.kernel.org/pub/software/utils/pciutils/pciutils-2.2.9.tar.gz)
Zlib-1.2.3.tar.gz (http://www.zlib.net/zlib-1.2.3.tar.gz)
4. modify/linux-2.6.18-xen.hg/Makefile, specify AWK = gawk.
5. modify/buildconfigs/src. hg-clone
$ (LINUX_SRCDIR)/. valid-src: $ (_ XEN_LINUX_UPDATE)
Set-e ;\
// Delete lines here
Touch $ @
6. compile xen and kernel
Make
When ask for option, press y or m.
7. install Xen
Sudo make install
8. check if these file or directory exist.
/Etc/xen/
/Lib/modules/2.6.18.8-xen/
/Boot/vmlinuz-2.6.18.8-xen
9. make image
Mkinitramfs-o initrd. img-2.6.18.8-xen 2.6.18.8-xen
Cpinitrd. img-2.6.18.8-xen/boot/
10. modify grub, add these lines. Note the UUID shocould be different.
Title Xen 3.4.2/Ubuntu 8.04.2, kernel 2.6.18.8-xen
Root (hd0, 0)
Kernel/boot/xen-3.4.2.gz
Module/boot/vmlinuz-2.6.18.8-xen root = UUID = 73fd4329-a05b-4dd4-b6a5-e11e99e320bd ro console = tty0 quiet
Module/boot/initrd. img-2.6.18.8-xen
Quiet
11. restart and choose the Xen kernel.
I got a crash here because I did these steps in VirtualBox. the info of the crash is "Crash Guru Meditation-2304 (VERR_REM_TOO_MANY_TRAPS )". it seems VB can't support virtualization guest OS, I also got failure when trying to install ESXi 3.5. the experience will continue when I got standalone machine and I'm not sure current result is correct. so pls don't follow me or you will be on your own risk.
To be continued...
Reference
Http://hi.baidu.com/shuxiaotu/blog/item/c1854cf9236e6104d9f9fd94.html
Http://deidara.blog.51cto.com/400447/269062