There are three separate utilities for configuring Linux kernel and they are listed below: Command-line interface # make config Character-based menu interface # make menuconfig Figure 1 Figure 2 X-window based interface # make xconfig Even though these methods create the same configuration file, the characterbased menu and X-window are recommended because you can t reselect these done parameters with Command-line interface. And you have to abort the configuration process if you want to change items that have been selected.
Figure 3 By the way, using these interfaces you need to load different files or packages. In default, the Red Hat 6.0 doesn include kernel development during installation. So, please select kernel development package and X window system. After installation, you will be able to use Command-line and X-window interfaces. For Character-based menu interface, it requires the RPM package ncurses and ncurses-devel. The package ncurses is loaded by default. So, if you have problem on using this interface, please check if the ncurses-devel has been installed. Check source code and tools The source code of Red Hat 6.0 is packaged in RPM format and doesn t be installed by default. The package has name kernel-source-2.2.5-15.i386.rpm. To install this package, please use following command on where it is located. # rpm Uvh kernel-source-2.2.5-15.i386.rpm. Or, you can right-click on this package, and then select install item in pop-up menu. Note: If you select kernel development package during installation, it will be installed into directory \usr\src\linux-2.2.5 automatically. The following steps will show you how to upgrade kernel with X-window based interface. In addition kernel source, the compilers should be available to rebuild the source code. To check for kernel tool programs on your system, use the following commands: # rpm q make (make utility) # rpm q egcs (C complier, gcc or egcs) If these files are not available on your system, please go to /RPMS subdirectory in Red Hat 6.0 distribution CD-ROM to load them
Upgrade Linux kernel 1. Login Linux system with root. 2. Start X-window system. 3. Check the kernel version with following command. # uname a 4. Download the latest kernel version from Red Hat web site http://www.redhat.com. In the article, the kernel version is 2.2.12 and has file name linux-2.2.12.tar.gz. 5. Delete Linux symbolic link, which is mirror folder of Linux-2.2.5 in directory usr/src. 6. Switch to folder where newer kernel source code (inux-2.2.12.tar.gz) locates, and Double-click on this file, and the content will be expanded. 7. Copy all files in linux folder to directory usr/src. 8. Right-Click on the linux folder, and select Properties at pop-up menu. Change the folder name to kernel-2.2.12 to distinguish various kernel versions.(ref. Figure 4) Figure 4 9. Create symbolic link for kernel-2.2.12 folder with linux. 10. After above steps, the usr/src folder should look like as Figure 5. 11. Launch a terminal emulator window, and switch to directory of source code by following command. # cd /usr/src/linux 10. Run the make command to launch Linux Kernel Configuration menu. # make xconfig 11. Review each field and select what items you want to include or remove. Pressing Help button, you can have detailed information about each parameter. After configuration, click on Save and Exit button to store
settings and go to comelier process.(ref. Figure 3) Figure 5 12. Link source code and libraries # make dep 13. Remove unnecessary files and modules. #make clean 14. Compile Linux kernel # make bzimage 15. Compile external modules # make modules 16. Install complied modules # make modules_install Note: The step 12 to step 16 can be grouped as one command statement. # make dep; make clean; make bzimage; make modules; make modules_install Rebuilding Linux kernel could take from dozen minutes to several hours, depending on system s processor, capacity of memory, and other factors. 17. After above process, the complied kernel and modules are located on below directories. BzImage: /usr/src/arch/i386/boot System.map and vmlinux: /usr/src/linux External modules: /usr/src/linux/modules Installed modules: /lib/modules/2.2.12(kernel version) 18. Replace the older kernel with newer one. # cd /boot # rm System.map # rm vmlinuz # mv /usr/src/linux/system.map System.map
# mv /usr/src/linux/vmlinux vmlinux # mv /usr/src/linux/arch/i386/boot/bzimage vmlinuz 19. Modify boot image record in file /etc/lilo.conf. Change image statement to boot/vmlinuz. (Ref. Figure 6) Figure 6 20. Execute lilo command, and then reboot Linux. 21. Run uname a command, you can see that the kernel has been upgraded to 2.2.12. (Ref. Figure 7) Figure 7