This is Bavaria, Germany!
Something changed in the Debianworld. There are ready kernels for Vserver available. I did this on a fresh installed system which acts as mother for my vservers:
# apt-get install vserver-debiantools util-vserver # apt-get install linux-image-2.6-vserver-686
After rebooting I see this in my menu of choosing kernels for starting my system:
... Debian GNU/Linux, kernel 2.6.18-5-vserver-686 ...
I took this. But I have to make it my default kernel in a minute. I take a look into /boot/grub/menu.lst and find my kernel as menu-entry number 2 (count starts from zero!), so I change the "default"-line to 2 like this:
default 2This command should now work:
# vserver-stat CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME 0 37 44M 13.4M 0m00s86 0m11s23 3m52s90 root server
After that I install a new vserver like this
HOSTNAME=echolon
IPADDRESS=10.1.1.73
NETMASK=255.255.255.0
DEBIAN=etch
CONTEXT=73
vserver $HOSTNAME build --context $CONTEXT -m debootstrap --interface eth0:${IPADDRESS}/${NETMASK} --hostname $HOSTNAME -- -d $DEBIAN
Usually vserver's files are in /var/lib/vserver
HOSTNAME=echolon
echo "default" > /etc/vservers/${HOSTNAME}/apps/init/mark
This is how I did it. This document will be a little bit outdated in the time and you have to change filenames but this is about the way to go.
tanzwut:/usr/src/kernel# tar -xjf linux-2.4.25.tar.bz2
tanzwut:/usr/src/kernel#
gunzip patch-2.4.25-vs1.26.diff.gz
tanzwut:/usr/src/kernel# ls -CF
linux-2.4.25/ linux-2.4.25.tar.bz2 patch-2.4.25-vs1.26.diff
tanzwut:/usr/src/kernel# ls -l
drwxr-xr-x 15 573 573 4096 Feb 18 14:36 linux-2.4.25
-rw-r--r-- 1 root src 30626548 Mar 17 07:35 linux-2.4.25.tar.bz2
-rw-r--r-- 1 root src 154599
Mar 17 07:23 patch-2.4.25-vs1.26.diff
tanzwut:/usr/src/kernel# cd linux-2.4.25
tanzwut:/usr/src/kernel/linux-2.4.25# patch -p1 <../patch-2.4.25-vs1.26.diff.gz | less
There should be no errors in applying the patch! Don't do anything further if there are error, maybe you have the wrong patch for your kernel.
tanzwut:/usr/src/kernel/linux-2.4.25# apt-get install libdb3-dev
tanzwut:/usr/src/kernel/linux-2.4.25# apt-get
install libdb3-dev
tanzwut:/usr/src/kernel/linux-2.4.25# make menuconfig
Don't forget to include into the kernel:
Save config to /boot
tanzwut:/usr/src/kernel/linux-2.4.25# cp .config /boot/config-2.4.25
Compile:
tanzwut:/usr/src/kernel/linux-2.4.25# make dep
tanzwut:/usr/src/kernel/linux-2.4.25# make
bzImage
tanzwut:/usr/src/kernel/linux-2.4.25# make modules
tanzwut:/usr/src/kernel/linux-2.4.25# make
modules_install
Modules are in /lib/modules/2.4.25-vs1.26 (you need this directory in a second)
tanzwut:/usr/src/kernel/linux-2.4.25# mkinitrd -o /boot/initrd.img-2.4.25-vs1.26
/lib/modules/2.4.25-vs1.26
tanzwut:/usr/src/kernel/linux-2.4.25# cp arch/i386/boot/bzImage
/boot/vmlinuz-2.4.25-vs1.26
I don't know why you need this:
tanzwut:/usr/src/kernel/linux-2.4.25# cp System.map /boot/System.map-2.4.25-vs1.26
Put extra lines into /etc/lilo.conf
default=li2425ctx
...
image=/boot/vmlinuz-2.4.25-vs1.26
# with vserver-support
label=li2425ctx
read-only
initrd=/boot/initrd.img-2.4.25-vs1.26
tanzwut:/usr/src/kernel/linux-2.4.25# lilo
Reboot and check...