|Kernel Patching Guide|
Kernel Patching Guide By Gibbdog
Note: The following steps worked for me and SHOULD work for you in patching your kernel, but I cannot guarantee you that it will, if you have problems, or if you find any errors or misspellings, etc, e-mail me at email@example.com
Most people have a fairly recent kernel. But since the kernel is constantly being updated, people on modems (such as myself) don't like downloading the whole source everytime a new version of the kernel comes out... It is a pain to download 14+ megs of stuff when 95% of it is the same stuff that you already have in your kernel source diectory.
For this reason, kernel patches are released. Kernel patches contain only the files that have changed since the last kernel, hence making it less of a pain to upgrade.
It is a good idea to back up your old kernel tree before you do anything to it, just in case something messes up. To do this, do the following:
Become root and then go into your kernel source directory (for me it was /usr/src/linux-2.2.10) and do a 'make clean' to clean it up so you don't compress a lot of crap you don't need as follows
# cd /usr/src/linux-2.2.10
Now you need to go to backup the tree, I did this by doing the following:
# cd /usr/src/
Now with that backed up, you can go ahead and change the stuff with less worrying...
If you have kernel 2.2.10, like I did, and 2.2.12 is the current stable release (or at least it is as I am writing this) you need all of the patch files after 2.2.10. So in my case, I needed to get patch-2.2.11.gz and patch-2.2.12.gz
http://www.kernelnotes.org is where I got mine from, but I'm sure there are mirrors where you can get the patches from, more on this is on www.kernelnotes.org.
Note: When I downloaded this file using netscape, it un-gzipped it for me as it was downloading... so I didn't have to do the following step that you would have to do if you were using a program such as 'ftp'
un-gzip the file by doing the following:
# gzip -d patch-2.2.11.gz
This will leave you with patch-2.2.11 and patch-2.2.12 (unless you downloaded the file with netscape, and this step would already have been done for you)
Now move the files to your kernel source directory (using the mv command,
mv patch-2.2.* /usr/src/linux-2.2.10
Now change into your kernel source directory (/usr/src/linux-2.2.10 in my case)
Now you need to apply the patch the the source... Order is important here. Start with the lowest and go to the highest, like the following:
# patch -p1 < patch-2.2.11
Both of these commands will give you lots of output telling you what files are being patched, etc.
After I applied the patches, I went ahead and renamed my source directory to reflect the patches applied (mv /usr/src/linux-2.2.10 /usr/src/linux-2.2.12) and then I removed the old /usr/src/linux link and replaced it with the new location (rm /usr/src/linux and then ln -s /usr/src/linux-2.2.12 /usr/src/linux)
Now just compile your kernel as stated in Joey's Kernel Kernel Compile/Upgrade Guide and everything should work for you :)
Having trouble? Got questions? Require further assistance? If so please feel free to visit our Help Forums and ask the experts!
Copyright © 1997 - 2017 Private World Domination Inc. All rights reserved.