Subject: Re: [vserver] About patch file to be download
From: Peter Mann <Peter.Mann@tuke.sk>
Date: Tue, 26 Aug 2008 13:26:43 +0200

On Tue, Aug 26, 2008 at 06:48:52PM +0800, Stephen Liu wrote:
> Since this is a test plus I'm not experienced on Linux-VServer it would
> be better for me to do the easy way first, installing Debian
> ready-built kernel on Ubuntu 8.04.

i don't recommend to use Debian kernel on Ubuntu - because of dependencies

> On this page of Debian website;
> http://packages.debian.org/en/etch/admin/
> 
> there are many linux-image packages.  Which one would be suitable for
> my application?

there are architecture specific packages, so if you have amd64, then you
can install linux-image-vserver-amd64 ... this is virtual package, which
depends on linux-image-2.6-vserver-amd64, which depends on
linux-image-2.6.18-6-vserver-amd64 - and finally this is real package

(virtual packages is only for better upgrades - virtual packages always
depends on latest real version)

> What additional packages do I need.  TIA

only util-vserver (and maybe vserver-debiantools)

> Googling brought me following documents which I suppose would be
> suitable for me to compile kernel.

yes, you must compile kernel yourself, if you want to use Ubuntu

add following line to sources.list:

deb-src http://ftp.sk.debian.org/debian etch main
(for 2.6.18 kernel)
or
deb-src http://ftp.sk.debian.org/debian lenny main
(for 2.6.25 kernel)
or
deb-src http://ftp.sk.debian.org/debian sid main
(for 2.6.26 kernel)

and download kernel source:

apt-get build-dep linux-image-2.6.18-6-vserver-amd64
apt-get source linux-image-2.6.18-6-vserver-amd64

similar names are for 686 (32-bit) ...

now you must copy kernel config file from running system and recompile
kernel from debian sources ... but IMHO it's risky, because Ubuntu
kernel is overloaded with many patches and Debian doesn't contain all
of them (but this depends on your hardware)

and you can patch ubuntu kernel, if you add:
deb-src http://sk.archive.ubuntu.com/ubuntu intrepid main restricted
and you must repeat previous steps ...

in your situation - the best is to download vanilla kernel and vserver
patches, because i expect many failed hunks in vserver patch for ubuntu
kernel

> P.S. after installing the new kernel what shall I do with the old
> kernel?  Whether the new kernel will replace the old kernel
> automatically during installation removing all un-necessary packages?

you must reboot ... and you'll see new GRUB menu item (or other boot
loader - but GRUB is default in Ubuntu)

-- 

5o   Peter.Mann at tuke.sk