First, download and install the kernel source code. The rpm name is kernel-source.rpm.
[root@localhost root]# rpm -ivh kernel-source.rpm
ðIt will ask you all the necessary rpm which are must need for kernel-source.rpm.
[root@localhost root]# rpm -ivh ncurses
ðBy this program it is easy to change the configuration.
[root@localhost root]# cd /usr/src/linux-2.4
ðNow we go to linux-2.4 directory and give some following commands.
[root@localhost linux-2.4]# make Xconfig
[root@localhost linux-2.4]# make menuconfig
[root@localhost linux-2.4]# make mrproper
ðMake mrproper command are used to check all the necessary rpm are installed or not and can it possible to kernel compilation?
ðMake xconfig to use an X Window system base configuration program to configure the kernel.
ðMake menuconfig is used as text mode to configure the kernel.
After make new kernel configuration, give the command,
[root@localhost linux-2.4]# make dep
[root@localhost linux-2.4]# make bzImage
[root@localhost linux-2.4]# make modules
[root@localhost linux-2.4]# make modules_install
ðAfter giving this above command, it will take more times and display all the working information. After completion of above commands, the module files will be stored in /lib/module directory.
Now, to know the Red hat version we can execute the command as
ðNow, it will copy the module file to "/boot" directory.
Now, we will make a new setting in the GRUB boot loader.
[root@localhost root]# vi /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:You have a /boot partition.This means that
#all kernel and initrd paths are relative to /boot/, eg.
#root (hd0,9)
#kernel /vmlinuz-version ro root=/dev/hda11
#initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=6
splashimage=(hd0,9)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,9)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
title Red Hat Linux (2.4.20-8)
root (hd0,9)
kernel /vmlinuz-2.4.8 ro root=LABEL=/
initrd /initrd1