What I am going to do is simply run through the steps of the actual compilation of my existing kernel. I won't make any changes (since changes and needs are so unique to each system) but I will walk through all the steps. I will also be approaching this with a path-of-least-resistance approach (read: we're going to do this the easy way).
Just to be safe...
Before I get into the compilation of my kernel I'm going to make a boot floppy just to be on the safe side. To do this, slap a floppy in your drive, su to root, and run the command:
dd if=/boot/bzImage of=/dev/fd0 bs=8192where bzImage is the kernel image that you need to insert. For example, in my stock Red Hat 7.0 system the kernel image is /boot/vmlinuz-2.2.16-22. For this image, the command would be:
dd if=/boot/vmlinuz-2.2.16-22 of=/dev/fd0 bs=8192
Back to compiling the kernel
The first step is to locate the source code for your particular distribution. Typically, these files are located in /usr/source/linux. (This holds true for most Linux distributions).
Once you've located the source, you are ready to actually start the compilation process.
Author's note
Because I am doing a simple recompile of my current kernel I am leaving out some major steps necessary when compiling a new kernel.
Make xconfig
Since I am going to take the easy route, let's stick with the simplest (and sanest) kernel configuration tool. The xconfig tool is a graphical tool offering simple buttons that, when clicked, present the many kernel configuration choices. The main xconfig window looks like the one shown in Figure A.
Above, you see the main xconfig window.
Each time you click on a button within the xconfig window, you will be offered a list of choices. In Figure B, you can see where I've chosen the Character Devices button. Each choice will have three selections: yes (y), no (n), and modular (m). The first two choices are obvious: yes means add the module; no means do not add the module. The third choice isn't so obvious. When modularly adding a kernel module, you are, in effect, saying you want the modules available and will load or unload them as you see fit.
Go ahead and run through the other buttons to see what's there. It's quite a hefty assortment of modules (giving you an idea of how complete the Linux kernel really is). Once you've run the gamut, you can click Save And Exit and move on to the next step of the compilation!
Above you see a small sample of possible options to choose while compiling your kernel. .









