These classnotes are depreciated. As of 2005, I no longer teach the classes. Notes will remain online for legacy purposes

UNIX01/Why Would I Ever Want To Compile A Kernel

Classnotes | UNIX01 | RecentChanges | Preferences

Since the Linux OS Kernel is distributed as source, you can always recompile it and reinstall it from source. However, the Linux Kernel can be the most tricky and complicated component to build. It has a wide variety of settings and configuration options (remember, the Linux kernel has been used everywhere from tiny embedded devices, all the way up to clustered mainframes... Naturally, it will have a lot of configuration options). It is easy to make mistakes with (mistakes that are hard to track down, and which you may not discover until near the end of compilation). And it can be a time consuming task (often a kernel recompilation may take upwards of 45 to an hour, depending on options and computer speed).

So why would you ever want to recompile your kernel? Aside from the obligatory "because you can" response, there are a number of very legitimate reasons:

Stock kernels are evil
Stock kernels (the ones that come with your distro, are generally compiled in a way to make the compatible with as much hardware as possible. This means they can be slow and sluggish. A custom built kernel often has the benefit of extra speed.

Enterprise Support
Commercial Linux vendors have it in their interests to get you to purchase "Enterprise" level support. Chances are, however, all they really do with this support is supply you with kernels which have extra "Enterprise" level features. These features can be enabled easily (and inexpensively) by simply recompiling the kernel yourself.

Support for Experimental Items
Whether you need IPv6 support, I2C support, or support for some latest, greatest firewire device, chances are it wont come enabled in your stock kernel. This is because many of these "newish" items are still labelled "experimental" in the kernel. "Experimental" kernel options are generally feared among distributors, and are typically turned off. If you need support for one of these things, it is often easiest to simply compile them in yourself.

Support for Legacy Hardware
Chances are Red Hat will not support your ancient CD-ROM device powering your classic NT server. It also wont support your older ISA modem installed in your 300Mhz PII. If you want these devices to work under Linux, you may have to build a custom kernel which supports them.



Classnotes | UNIX01 | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited August 9, 2003 2:51 pm (diff)
Search:
(C) Copyright 2003 Samuel Hart
Creative Commons License
This work is licensed under a Creative Commons License.