you need
  • - access to the repository with the source packages or access to the Internet;
  • - the root password on the local machine.
Guide
1
Get the kernel source.If you have access to the source code repository, and it includes a new kernel package is the correct version, install this package using the utilities apt-get or synaptic.

If there is no access to the repositories, or you need to compile a kernel specific version, get the source code from the server kernel.org.Open your browser page http://www.kernel.org/pub/linux/kernel.Go to the subdirectory corresponding to the desired line of kernels.Select the desired file and download it to your hard d
rive.Use the object browser or save your preferred download manager.You can also download a source tarball kernel correct version via FTP server ftp.kernel.org.

Download patches (patches) to the kernel, if desired.Pick the patch at kernel.org, and also save them to your hard drive.
2
Prepare your system for kernel compilation.Install the compiler gcc, develop-packages of glibc and ncurses, package fakeroot (unless you plan to compile your kernel as root).Install the library TCL / TK, if you want to perform kernel configuration using a graphical interface running X-server.
3
Prepare the kernel source tree.Extract the source directory / usr / src / linux.Either make unpacking into an arbitrary directory, and create a symlink called linux from a directory / usr / src.Use a program-unpacking, appropriate for the type of archive (tar or bzip).

Apply patches to the kernel source code, if necessary.Extract the files from the patch directory / usr / src.Use the patch command to make changes.
4
Make kernel configuration.If the version of the configuration should be based on already available in the system, copy the file with a name like config- & lt; number-current-kernel-version & gt;from the / boot directory in the directory / usr / src / linux and rename it to .config.

Go to the directory / usr / src / linux.Run the make command with the parameter config, menuconfig, oldconfig or xconfig.Config parameter allows you to configure the kernel in increments.If you specify oldconfig, the maximum use of the old configuration values.Make menuconfig command will allow for easy configuration via a text menu, and make xconfig starts the graphical configurator.Ask all the necessary kernel configuration parameters.
5
Compile the kernel.Consistently perform the command make dep and make clean to generate dependency files, and clean source tree.Run make bzImage to compile and create an image file of the nucleus.Compile the kernel modules, entering the console command make modules.