Home » Linux Basics » 08 - System Administration Tasks
8

Kernel Update and Reconfiguration

Recustomizing linux kernels after installation

The Linux kernel may be re-customized even after installation. Installation of certain types of new hardware devices and corresponding drivers, repartitioning of a hard disk and so on may require a kernel recompilation so that the new hardware is recognized and accommodated. Current versions rarely require kernel recompilation; only the modules associated with the device require compilation. However, it is useful to be aware of the general steps involved in the process. The following steps are valid for the Fedora distribution:

  1. First, the source code for the kernel must be located. It is usually found in /usr/src/linux. If the source cannot be found, it should be downloaded from the distributor and unpacked into /usr/src/linux
  2. Change directory to /usr/src/linux
  3. Clean up the source files using the following command:
    # make mrproper
  1. Backup old configuration files:
    # make oldconfig
  1. Configure the kernel type using one of the following commands:
    
     # make config   
    # make menuconfig
    # make gconfig  
  1. Select the modules you wish to include. Each module may be included in the kernel code ('y'), installed as a loaded upon need module ('m'), or excluded from the kernel code ('n'). You may have to select device specific configuration options.
  2. Edit the makefile and give a unique name to the new kernel version.
  3. The following command creates a compressed version of the new kernel and its companion .img RAM disk file. Note that the bzImage argument should be specified only for old versions of Fedora.
         # make bzImage
  1. The following commands will copy all the modules created in the previous step to the conventional module locations and copy the kernel and the .img to the /boot partition where all active kernel files normally reside.
    
    # make modules_install
    # make install