The Perfect Xen 3.0.3 Setup For Debian Sarge - Page 6

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Fri, 2006-10-20 12:53. ::

5 Installing The Binary Package

Run the following commands:

apt-get remove exim4 exim4-base lpr nfs-common portmap pidentd pcmcia-cs pppoe pppoeconf ppp pppconfig
apt-get install screen ssh debootstrap python python2.3-twisted iproute bridge-utils libcurl3-dev

 

5.1 Install Xen

Then download xen-3.0.3_0-install-x86_32.tgz from http://www.xensource.com/xen/downloads/dl_303tarballs.html, unpack it, and run the install script:

cd /usr/src
wget http://bits.xensource.com/oss-xen/release/3.0.3-0/bin.tgz/xen-3.0.3_0-install-x86_32.tgz
tar xvzf xen-3.0.3_0-install-x86_32.tgz
cd dist/
./install.sh
mv /lib/tls /lib/tls.disabled

Now Xen is installed. In order to start the Xen services at boot time, do the following:

update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20

We need a ramdisk for our new Xen kernel, therefore we do the following:

depmod 2.6.16.29-xen

apt-get install libhtml-template-perl libparse-recdescent-perl

wget http://downloads.howtoforge.com/files/yaird_0.0.12-8bpo1_i386.deb
dpkg -i yaird_0.0.12-8bpo1_i386.deb

(The original yaird package was located in http://backports.org/debian/pool/main/y/yaird/, but was removed in the meantime, so I've made the package available under http://downloads.howtoforge.com/files/yaird_0.0.12-8bpo1_i386.deb.)

mkinitrd.yaird -o /boot/initrd.img-2.6.16.29-xen 2.6.16.29-xen

The last command creates the ramdisk /boot/initrd.img-2.6.16.29-xen.

Next we add our new kernel to Grub, our bootloader. Edit /boot/grub/menu.lst, and before the line ### BEGIN AUTOMAGIC KERNELS LIST add the following stanza:

vi /boot/grub/menu.lst

[...]
	  
title Xen 3.0.3 / XenLinux 2.6
root (hd0,0)
kernel /xen.gz  dom0_mem=64000
module /vmlinuz-2.6-xen root=/dev/hda6 ro max_loop=255
module /initrd.img-2.6.16.29-xen

[...]

Make sure that /dev/hda6 is your / partition. Keep in mind what I said about Grub and partitioning in chapter 1! I added max_loop=255 to the module line to make sure that enough loop devices are available because or virtual machines will be mounted as loop devices.

Now reboot the system:

shutdown -r now

At the boot prompt, Grub should now list Xen 3.0.3 / XenLinux 2.6 as the first kernel and boot it automatically. If your system comes up without problems, then everything is fine!


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.