Compiling your own kernel
Well, well. You want to compile your own kernel eh? Good idea. You can usually speed up your system quite a bit by simply compiling a kernel build for your hardware. I'll attempt to explain how...
First off, you'll need a few packages installed to start. You'll need bzip2 to uncompress the bzip2 your going to download, libncurses5-dev to do the menuconfig, and binutils + bin86 to do the compile. You can grab those now by doing an apt-get.
apt-get install bzip2 libncurses5-dev binutils bin86
Now, after those two packages are installed you'll want to download the latest and greatest kernel. "Stable" kernels are the even numbered bunch. The "development" kernel are the odd numbered bunch. So, v2.4.x is stable, version v2.5.x is dev. You'll probably almost always want the v2.4 kernel at this point in time.
You can grab the kernel from your favorite ftp site that has it, or from the main source kernel.org. You will want the full kernel, and not the patch (since you don't have an older kernel to patch yet).
Here is a link to the v2.4 dir on kernel.org's ftp site: ftp://ftp.kernel.org/pub/linux/kernel/v2.4
you will want the latest version. currently as of this writing it's v2.4.20
Now, in a shell find where you have the file downloaded to and cd to that directory. Now, if you downloaded the .tar.bz2 file, use this command.
tar jxvf kernel_filename.tar.bz2 -C /usr/src/
If you downloaded the .tar.gz file use this command.
tar zxvf kernel_filename.tar.gz -C /usr/src/
This will uncompress the kernel source into your source directory. This might take a minute or two depending on the speed of your system. Once its finished move to your /usr/src dirctory. "cd /usr/src".
The kernel will likely be in a directory called "linux-2.4.20" or the version that you downloaded. We need to rename this directory to simply "linux". You can do this with the mv command. "mv linux-2.4.20 linux".
Things should now be set to start setting up the kernel. Change to the /usr/src/linux/ directory. "cd /usr/src/linux/" And then type in make menuconfig. Some text will roll by as it starts and then you will be presented with the kernel compile setup. You can navigate the setup with the arrow keys and select things with the spacebar.
The selections you make are dependent on your hardware and setup. Your best course of action is to go through each option tree and just pick what looks right. Here are some guides for each heading.
Processor type and features
Select your cpu type.
Turn on "MTRR (Memory Type Range Register) support"
Turn off "Symmetric multi-processing support" (unless you have two cpus)
Go to "PCMCIA/CardBus support --->" and turn that off unless you have PCMCIA slots (if your on a laptop)
Parallel port support
You can turn this off unless you plan on using the parallel port for something (old printers?)
There are some important option in here for systems with ATA IDE controllers. You'll find them under the heading IDE, ATA and ATAPI Block devices. From there you'll see a list of options for drive controllers under the heading "--- IDE chipset support/bugfixes". You'll need to know what type of ide controller you have, but if your not sure the defaults will work. If you know that you have a VIA chipset with they're ide controller you would want to select "VIA82CXXX chipset support" for instance.
If you don't have SCSI devices in your system, you can probably say no here.
Network device support
This is pretty important. You'll want to make sure you get the right network card compiled in or you won't be able to use it anymore. You can find the actual card modules under "Ethernet (10 or 100Mbit)" and then a majority of the cards will be under "EISA, VLB, PCI and on board controllers". You can turn off the default "EtherExpressPro/100 support" (unless you use this card), and then pick your cards chipset.
more information needed in this section later on
There are setting under here for your agp card if your using one. If you plan on running 3D applications and your videocard is supported you'll need to set it up. You'll need "/dev/agpgart (AGP Support)", with your motherboards chipset. And you'll need to enable "Direct Rendering Manager (XFree86 DRI support)" then select your DRM driver for your card. If you have an nvidia card simply don't pick a DRM driver (nvidia supplies there own closed source drivers which you'll need to download and compile later)
If you need to be able to access any special filesystems you'll need to enable them in here. You'll probably want "Microsoft Joliet CDROM extensions" if your going to be reading data cd's. You can also setup network filesystems such as samba (for mounting windows file shares) under "Network File Systems".
Obviously, if you need soundcard support enable it here.
Now, once your done go to exit, and say yes so that you save your kernel config. Now, if all is setup right we can compile the kernel and reboot the machine. Once you reboot you'll be running on the new kernel (if all goes well). To make your kernel you can use the following command.
make dep; make bzImage; make modules; make modules_install; make bzlilo
And then, grab a drink and sit back, browse for porn, check your email, or whatever it is you do. Once it's all done reboot your machine. Now, if your kenrnel compile is bad, and didn't even boot up again for whatever reason, you can fallback on your old kernel. You can do this by hitting the shift key when you see the "LILO" prompt on bootup. A menu will come up, and just select "OldLinux".
thing needs much more work!!!