Debian – Compiling kernel from source (for Xen), do I use plain kernel

debiankernelsourcexen

My VPS host uses Xen, and instead of using its custom kernels I could use my own (with pv-grub), the sample kernel of which I had installed to test this was is the following, I am running Debian 6 (Squeeze):
http://packages.debian.org/squeeze/linux-image-2.6.32-5-xen-amd64

Would I be right to assume, that if I download the sources for 2.6.32-5 I can set up the appropriate Xen options to build a Xen compatible kernel just like the binary one listed?

Would I be able to apply say kernel patches (such as grsecurity as I've wanted), and apply the Xen configuration, to use for my VPS once compiled just like that?

Thank you, Ken.

Best Answer

Yes, you can. You have the option of building a Debian kernel from the same sources, or building a kernel from vanilla sources. Mainline has support for Xen4 built into recent versions and no longer requires patches for Xen to work; the options for building a DomU are here.

Patching the Debian sources should be possible using the Debian make-kpkg command and friends.

Related Topic