Table of Contents
XenDebianBackports
Install Xen 3 from Scratch on Debian Sarge using Backports
Introduction to Backports http://en.wikipedia.org/wiki/Backport
Debian Backports are created to allow newer software run on existing systems.
- This How-to is the EXACT same as is outlined here: http://www.debian-administration.org/articles/423
Add in Backports
vi /etc/apt/sources.list deb http://www.backports.org/debian/ sarge-backports main
vi /etc/apt/preferences Package: * Pin: release a=sarge-backports Pin-Priority: 200
Package: xen-3.0 Pin: release a=sarge-backports Pin-Priority: 999
Package: linux-2.6 Pin: release a=sarge-backports Pin-Priority: 999
Package: xen-tools Pin: release a=sarge-backports Pin-Priority: 999
Package: udev Pin: release a=sarge-backports Pin-Priority: 999
Package: lsb Pin: release a=sarge-backports Pin-Priority: 999
Package: module-init-tools Pin: release a=sarge-backports Pin-Priority: 999
Package: grub Pin: release a=sarge-backports Pin-Priority: 999 Note that for Backports, we can specify which packages can be used from backports. The dependencies are figured out from Documents and trial & error.
Now - Update, Dist-upgrade to recieve backports and get packages.
apt-get update && apt-get dist-upgrade
apt-get install grub/sarge-backports apt-get install makedev/sarge-backports apt-get install lsb-base/sarge-backports apt-get upgrade
apt-get install xen-hypervisor-3.0-i386 xen-utils-3.0 apt-get install linux-image-2.6.16-2-xen-686 //or if your on AMD: #apt-get install linux-image-2.6.16-2-xen-k7 //or if your on a Hetzner Server (see bottom of page): #apt-get install linux-image-2.6.16-1-xen-k7
dpkg –purge hotplug apt-get install bridge-utils xen-tools/sarge-backports sysfsutils mv /lib/tls/ /lib/tls.disabled
Make initial RAM Disk Module to LOAD Xen Kernel
cd /boot mkinitramfs -o /boot/initrd.img-2.6.16-2-xen-686 2.6.16-2-xen-686 //or if your on a Hetzner Server - make appropriate change to: #mkinitramfs -o /boot/initrd.img-2.6.16-1-xen-k7 2.6.16-1-xen-k7
Configure Grub and Xen Config
Note: *Grub can be configured to allow a “fallback” option, whereby if the server hangs on kernel load etc. when it reboots, it will boot a second grub entry etc.
- Please make necessary adjustments if your using SATA,RAID, or using a Hetzner Server
vi /boot/grub/menu.lst title Xen 3.0 / XenLinux 2.6-686 kernel /boot/xen-3.0-i386.gz module /boot/vmlinuz-2.6.16-2-xen-686 root=/dev/md0 ro module /boot/initrd.img-2.6.16-2-xen-686
My Current Grub Config title Xen 3.0 / XenLinux 2.6-k7 root (hd0,1) kernel /boot/xen-3.0-i386.gz dom0_mem=128000 module /boot/vmlinuz-2.6.16-1-xen-k7 root=/dev/md0 ro panic=10 module /boot/initrd.img-2.6.16-1-xen-k7 savedefault fallback boot
vi /etc/xen/xend-config.sxp #xend-relocation-server yes (vif-script vif-bridge) (dom0-min-mem 128) #(network-script network-dummy) #(xend-relocation-hosts-allow '^localhost$') (network-script network-bridge)
Have Xend Daemon start on System start
invoke-rc.d xend restart
Reboot into Dom0
reboot
All going well the server should boot up using a Xen modified Kernel. It should pick up sata drivers and boot off them. If the system boots - excellent. Type xm list to see if dom0 is listed and running.
If it fails
- Check grub to see if it actually boots the Xen kernel or a standard one.
- Check to see if the files in grub actually match the files located in /boot
- Make sure grub is installed correctly to the Hard Disk.
- Make sure that it boots off the correct partition, e.g. (hd0,1) or (hd0,0)
- It will not work with RAID for the moment.
- Go back and follow the initial how-to on debian adminisration at: http://www.debian-administration.org/articles/423
- Go back and choose a different Xen Kernel: apt-get install linux-image-2.6.16-1-xen-k7
Links and Other How-To's
The BackPorts URL → http://www.debian-administration.org/articles/423
Debian Sid & Xen → http://www.debian-administration.org/articles/396
Dapper Drake & Xen → http://www.howtoforge.com/xen_3.0_ubuntu_dapper_drake
HowtoForge - Debian & Xen → http://www.howtoforge.org/perfect_setup_xen3_debian_p5
RemoteInstallofXen → http://www.option-c.com/xwiki/Xen_at_ServerBeach
More Useful URLS
Summary of Solution to getting Xen (dom0) working on Hetzner
“use xen 3.0.1 (NOT 3.0.2) kernel has I apart from which in the Howto stood actually only the VIA sata drivers in kernel kompieliert, are unfortunately only with the CONSOLE of more hetzner draufgekommen where the problem is.”
So working off backports on http://www.debian-administration.org/articles/423
It was a case of:
apt-get remove linux-image-2.6.16-2-xen-k7 apt-get install linux-image-2.6.16-1-xen-k7
yey
LILO & XEN & GRUB
On my hetzner server I encountered great difficulty in getting “grub” working. At one stage, only LILO would boot my server. Although I did finally manage to get grub working after a hetzner admin looked into it, I researched the possibility of booting the XEN modified Kernel with LILO.
Get, compile and install “mbootpack”.
/root/mboot/mbootpack -o /boot/mboot-2.6.16-xen -m /boot/vmlinuz-2.6.16-2-xen-k7 -m /boot/initrd.img-2.6.16-2-xen-k7 /boot/xen-3.0-i386
mbootpack -o mboot-2.6.16-xen -m vmlinuz-2.6.16-2-xen-686 -m initrd.img-2.6.16-2-xen-686 ./xen-3.0-i386 But the modified Bootpack would not boot correctly. It appears from the documentation that Xen doesnt boot using Lilo.
http://www.tjd.phlegethon.org/software/
Here was the planned method of moving from LILO to GRUB: apt-get install grub grub-install /dev/sda update-grub apt-get remove lilo
grub-install /dev/sda
Special menu.lst config to Allow for FALLBACK →
default saved fallback 1
### END DEBIAN AUTOMAGIC KERNELS LIST
title Xen 3.0 / XenLinux 2.6-686 kernel /boot/xen-3.0-i386.gz module /boot/vmlinuz-2.6.16-2-xen-686 root=/dev/md0 ro module /boot/initrd.img-2.6.16-2-xen-686 savedefault fallback
Make 1 option default. grub-set-default 0 // 0 - first, 1 - second safe, 2 - our entry cat /boot/grub/default //to check