Originally Published: Wednesday, 20 June 2001 Author: Subhasish Ghosh
Published to: develop_articles_tutorials/Development Tutorials Page: 1/2 - [Printable]

Compiling, Configuring and Installing a Kernel

Linux.com contributor Subhasish Ghosh gives us 27 simple steps to working with the Red Hat Linux Kernel. Learn how to compile a kernel to your liking, and then actually get it running!

Introduction   Page 1 of 2  >>

This article provides you with an extremely detailed and step-by-step process describing how to Compile, Configure and then install a Kernel.

Please note that I have performed all the steps mentioned below on a computer system with the following configurations: Compaq Presario 4010 Series computer system, 15.5 GB Hard Disk Space, 96 MB RAM, 400 MHz Intel Celeron Processor, Red Hat Linux 7.0 Distribution Release underlying Kernel: 2.2.16-22

Our aim is to obtain a fully working Kernel after all the steps mentioned below have been completed. For example, I have a Customized Kernel named "2.2.16-22ghosh" (cause my name is Subhasish Ghosh but you could have anything else obviously) running on my system (in fact a couple of them running together). So, happy hunting and compiling the Linux Kernel!

The steps to be followed are as follows:

Step 1: Login as "root" and then perform these steps.

Step 2: At the command prompt, type in: rpm -q kernel-headers kernel-source make dev86

Step 3: If these RPMs are already installed, then proceed to step 4. Otherwise, mount the Red Hat Linux 7.0 CD-ROM and then perform a rpm -Uvh for installing these RPMs.

Step 4: If you have a fully working X Window System, then type in "startx" at the command prompt. In case you don't have an X Window System configured, I personally would suggest you do it now because it helps a lot. If X Window System is NOT configured, then type in "make config" or "make menuconfig" at the command-prompt. I have assume you have an X Window System running on your system, and for that reason, just type in "startx".

Step 5: Once within the GNOME environment, open the GNOME Terminal and type in:

cd /usr/src/linux

and press enter.

Step 6: Then from within /usr/src/linux, type in "make xconfig".

Step 7: The GUI version of "make config" should come up on the screen. It provides you with the various options you have for obtaining a Customized Kernel.

Step 8: Now, I would suggest you leave most of the default options just as they are. Just don't try to fiddle around right here because most of the options are sensitive and require expert handling. You can always come back later when you have something specific you want to compile. At this point though, just make the following changes:

1. Processor Type and Features: Choose the correct Processor depending on whether you are working on a Pentium 2, 3, or Intel Celeron like me. For example, I did the following: Processor Family: PPro/686MX
Maximum Physical Memory: 1 GB
Math Emulation: Yes
SMP: Yes.

2. Open the Filesystems dialog and then make the following changes to it: For example I did:

DOS FAT fs support: Yes(y)
MSDOS fs support: Yes(y)
UMSDOS: m, VFAT(Windows 95) support: Yes(y)
NTFS filesystem support (read-only): Yes(y)
NTFS read-write support(DANGEROUS): No(n)

After you have made these changes, please make sure you haven't changed the others in the process. All these above-mentioned changes are quite harmless and won't cause any harm to your existing Linux Kernel.

3. Save and Exit from the Main dialog.

Introduction   Page 1 of 2  >>