RedhatLinuxSysAdmin 





Configure Linux Components   «Prev  Next»
Lesson 8Configuring the kernel
ObjectiveConfigure Linux Kernel Options before Compilation
Configuring your kernel correctly is crucial. Not only must you decide what kernel options to include, you must also decide if they are modular or built into the kernel. Linux makes it easy to set kernel options, but you must make sure you choose your options wisely.
Hardware Considerations
When choosing kernel options, consider the specific hardware on your system and your need for protocols and services. Here are some general guidelines to follow.
  1. Under Code Maturity Level Options, check Prompt for development and/or incomplete code/drivers. If you do not check this option, certain essential services (most notably rpc.nfsd) may not work correctly.
  2. Optimize for your computer's processor family.
  3. Turn off math emulation when your system has a dedicated math coprocessor. Intel 386 and 486 systems with a coprocessor, Pentiums, and Alphas all have on-processor math coprocessors.
  4. Turn off SMP (Symmetric Multi-Processor) support when your system only has a single CPU.
  5. Modularize as much hardware support as possible.
  6. Turn off ISDN IrDA, and old CD-ROM drivers support, unless you have these capabilities or devices.
  7. Don't change the default sound configuration.
  1. ISDN: An acronym for Integrated Services Digital Network, ISDN is a standards specification for data transmission over telephone wires and other land-based media.
  2. IrDA: An acronym for Infrared Data Association, IrDA is an international standards body that plans the hardware and software requirements for wireless, infrared data communication.

Configuring the kernel
To configure the kernel, follow the following four steps.
  1. Change to the /usr/src/linux directory.
  2. Type make mrproper to restore the sources to a clean state.
  3. Copy one of Red Hat's default configuration files from the configs/ directory to arch/i386/defconfig. Red Hat provides these default configurations for a variety of hardware platforms. The settings inside of each make configuring the kernel easier.
  4. Type make oldconfig to create a starting Linux kernel configuration file from the default configuration copied in the previous step.
  5. Create the kernel configuration file using one of the standard configuration utilities: make xconfig, make menuconfig, or make config.
  6. Update the EXTRAVERSION= line in /usr/src/linux/Makefile.
  7. Type make dep to create the source dependencies and propagate configuration information to all makefiles in the development tree.
  8. Type make clean to remove old object files.
Click the SlideShow linkto see each step.
View SlideShow
Pre Compilation Kernel
If you build the kernel in the future and use the same configuration, you do not need to perform steps two, three, and four.
You need to do these steps only the first time you are rebuilding a Red Hat Linux kernel.
The next lesson presents the kernel and modules build and install procedures.