XenDebianBackports
From Wiki
Contents |
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.