Each distribution has some specific tools to build a custom kernel from the sources. This article is about compiling a kernel on Ubuntu systems. It describes how to build a custom kernel using the latest unmodified kernel sources from www.kernel.org
Read it here
I have tested this on Ubuntu 6.10 Server (“Edgy Eft”) and Ubuntu 6.06 Desktop (“Dapper Drake”).
I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!