User Tools

Site Tools


kernel_compiling

This is an old revision of the document!


Kernel compiling

Kernels shipped with Linux distributions are, for stability reasons, old. Security fixes from current "stable" kernels are backported into the distro kernels. This means that if the stock kernel with your Linux distribution is working fine with the machine's hardware and workload then you should stick to the distro's kernel (as it will receive automated, hassle-free updates from the distro's repositories).

On the other hand, if you need support for newer hardware, file systems, or specific bug fixes not available in the older kernels, you might need to compile a custom kernel manually.

How to

Get the kernel sources

Configure

$ make
$ sudo make modules_install
$ sudo cp System.map /boot/System.map-2.6.35-zen2
$ sudo cp .config /boot/config-2.6.35-zen2
$ sudo cp arch/x86_64/boot/bzImage /boot/vmlinuz-2.6.35-zen2
$ sudo mkinitramfs -o /boot/initrd.img-2.6.35-zen2 2.6.35-zen2
$ sudo update-grub2

Patch sets

Some custom "patch sets" for the Linux kernel are available. Different patches target different functionality, like lower latency, better I/O scheduling, support for different workloads, etc:

kernel_compiling.1286305108.txt.gz · Last modified: 2010/10/05 18:58 by aorth