Linked by Ben Hughes on Tue 5th Oct 2004 19:16 UTC
Linux GNU/Linux, and all other operating systems, are based around a kernel which controls hardware access and maximizes CPU and RAM efficiency by controlling when and how much programs get to use. The difference between Linux and most other operating systems (closed source ones at least BSD and other open source OS's you can do this with) is that you can compile the kernel to meet your needs.
Permalink for comment
To read all comments associated with this story, please click here.
Debian kernels
by David Bruce on Wed 6th Oct 2004 18:12 UTC

A. the really easy one (pick a prebuilt kernel to install):

apt-cache search kernel-image
(decide which one you want)
apt-get install name_of_desired_kernel
nano /boot/grub/menu.lst (edit list appropriately for new kernel)

B. OK, I know, this is supposed to be about compiling and installing one's own kernel:

apt-cache search kernel-source
apt-get install kernel-source-2.6.8 (or whatever one you want)
cd /usr/src
tar -xjf kernel-source-2.6.8
cd kernel-source-2.6.8
make menuconfig
make-kpkg kernel_image
(if using modules, make that:
make-kpkg kernel_image modules_image)
cd ..
dpkg -i kernel-image-2.6.8*deb
(or:
dpkg -i kernel-image-2.6.8*deb modules-image-2.6.8*deb)
nano /boot/grub/menu.lst

Basically, with Debian, you need one command to download the source for the new kernel, one command to untar it, one to configure it, and one to install it and the modules, plus some trivial editing of the grub config file. It is really a simple process.

p.s. - the above is off the top of my head, and while I am confident it is generally correct, there may be some typos. I am not at my Debian machine. Of course, the above assumes you have gcc and make-kpkg installed. You also need libncurses5-dev, and maybe some oher things. If you are upgrading from 2.4 to 2.6 there are some significant changes in required packages, in particular a newer modutils is needed or modules won't load. Also, if you build the same version kernel more than once, make sure you install the one you think you are installing with dpkg. The file globs I used above can lead to unintended results if you aren't careful. Be careful, read other documentation, and don't blame me if your system won't boot the new kernel. However, as long as you keep your old kernel as well as a matching entry in grub, you should be able to keep using your old one.