Applying a Kernel Patch
by Brent Fox
Last Modified: Wednesday, 19-May-2004 11:54:47 EDT
|
Introduction
|
   
If you wish to upgrade to a newer kernel, you can patch your current kernel instead of downloading an entire new kernel.
By patching your existing kernel, you retain your settings from previous kernel compilations. Patching the kernel is
a good choice if you wish to upgrade from your current patch level to the next consecutive patch level. For example, patching
kernel 2.2.5 to 2.2.6 involves applying one patch.
However, if you wish to upgrade the 2.2.5 kernel to 2.2.14,
then a patch for each patch level must be applied sequentially. In this case, it may be better to download the entire
2.2.14 kernel. Also, you may not have installed the kernel source code when
installing Linux. If this is the case, it will probably be easier to download an entire new kernel. Go to the
Finding and Installing Kernel Source Code guide to find out how.
|
|
Finding Kernel Patches
|
   
Kernel patches can be found at the following sites:
   
Kernel patches will be named something similar to patch-2.2.14.gz or
patch-2.2.14.bz2. If you are not familiar with .gz
and .bz2 file formats, see the
gzip and gunzip: Files With .gz Extensions
guide and the bzip2 and bunzip: Files With .bz2 Extensions guide.
|
|
Applying the Patch
|
For the purpose of this guide, we will use linux-2.2.x for the kernel
name. You should replace the x with the version number of the patch you are installing.
- Move the downloaded kernel patch to the
/usr/src/linux directory.
cd /usr/src/linux
- If you downloaded a patch with a
.gz extension, execute the following command:
gunzip patch-2.2.x.gz
If you downloaded a patch with a .bz2 extension, execute the following command:
bunzip2 patch-2.2.x.bz2
- There should now be a file called
patch-2.2.14 in the
/usr/src/linux directory. Apply the patch to the kernel source tree with the
following command:
patch -p1 < patch-2.2.x
   
You should now be ready to set the configuation for the new kernel you wish to build. See the
Configuring a New Kernel guide for more information.
|
|
What's Related
|
|
|
|
|
|
|
All Rights Reserved Linux Headquarters © 2000-2007
Linux is a registered trademark of Linus Torvalds
All logos are registered trademarks of their respective owners
Last modified: Wednesday, May 19, 2004
|
|
|