Kernel Compiling.

This assumes that you have a reasonably recent kernel. If you don't know what you're doing then be warned - I'm not taking any blame. If you have any crucial work on the computer I suggest you back it up. Also see the notes section for instructions on backing up your old kernel. Finally if you don't know what you're doing, by all means try it, but back up any important information - and don't try it on your work's vital server. Maybe play around with a "toy" computer first.
  1. If you want to upgrade your kernel version visit www.kernel.org or preferably an international mirror www.kernel.org mirrors. Note that if you upgrade your kernel you may have to upgrade your tools and startup scripts as well. Unpack the source code in the directory /usr/src
  2. Look in the /usr/src directory for a subdirectory called linux or linux-<version> Note that there is generally a different directory for different versions. Change into the directory corresponding to the version you wish to compile.
  3. Type make menuconfig
  4. You may now select options in the submenus for how you want the kernel compiled.
  5. If you see a module you would like to change, select it using the up and down arrows then press: Y = Yes (inside kernel), M = Modules (can be loaded by kernel), N = No (cannot be loaded at all)
  6. Special notes: You must compile the IDE driver, ext2 filesystem and VGA driver inside the kernel. If you want them, you should compile the aout and misc executable file format kernel support inside the kernel. It is generally a good idea to compile in most of the file-systems you are going to use (it helps when you are trying to recover from a kernel problem).
  7. The default settings should almost always work - so you only need to change a few specific settings, relating to what you need.
  8. When you are finished exit by pressing Escape. It will ask if you want to save the settings.
  9. Type make dep This figures out the dependencies.
  10. Type make clean
  11. Type make bzImage
  12. Now it is time to install the new kernel. Please see the notes about backing up the kernel.
  13. Type make bzlilo This should work, unless you have been playing around with the lilo settings. See Notes for more details.
  14. Type make modules
  15. Type make modules_install
  16. Make sure that lilo is configured in the way that you want, and install any other packages which you will need to boot up the kernel (if you are upgrading).
  17. Reboot.
Notes:


Also see:
Linux Kernel HOWTO