Best Practices for Patching the Linux Kernel

Though there are several methods for upgrading and patching the Linux kernel, the complete technique for doing so is fragmented throughout the kernel documentation. This technical recipe provides a comprehensive and uniform solution, using the included patch-kernel script.

To successfully utilize this technique, you should always start with a base kernel, for example, kernel version 2.6.x, rather than the point release kernel, 2.6.x.y. For specifics on why this is the case, see Documentation/applying-patches.txt under the kernel source folder. In this example, I use linux-2.6.20.tar.bz2 as the base kernel (extracted to /usr/src/linux-2.6.20), and patch patch-2.6.20.7.tar.bz2 (placed under /usr/src) to illustrate.

To upgrade from 2.6.20 to 2.6.20.7, simply type the following:

cd /usr/src/linux-2.6.20
scripts/patch-kernel . .. 2.6.20.6
cd ..
mv linux-2.6.20 linux-2.6.20.7

If successful, your output will appear shortly:

Current kernel version is 2.6.20 (Homicidal Dwarf Hamster)
Applying patch-2.6.20.7 (bzip2)... done.

For convenience, I also symbolically link /usr/src/linux to /usr/src/linux-2.6.20.7:

ln -s /usr/src/linux-2.6.20.7 /usr/src/linux

From here, you can proceed to compile the updated kernel source using the provided documentation.

Twentysomethings on the Books

Wall Street Journal columnist Emily Meehan writes:

Twentysomethings often feel like they are reinventing the wheel just to exist. As we venture out of home and school, we face new situations — at work, in new cities, in relationships — that our old advisers may not be able to help with. And let’s face it, our peers don’t have the hindsight to give sage advice. Some of us may end up relying on books for tips and solace. What a relief that so many twentysomethings in novels and memoirs make it to 30 and go on to thrive.

Here are the recommendations from her and other commentators:

You can read the full article, which requires a subscription, here.