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
[root@localhost linux-2.4]# uname -u
2.4-8
ð It will show the Red hat version number.
[root@localhost linux-2.4]# mkinitrd
Example,
[root@localhost linux-2.4]# mkinitrd initrd1 2.4-8
ð To make initrd file. And this file will be created in the current directory and it is called module.
[root@localhost linux-2.4]# ls
initrd1
.. ... .... ...
ð Now, we will copy the initrd file to "/boot" directory.
[root@localhost linux-2.4]# cp initrd1 /boot/initrd1
ð Here initrd1 is the file name of new initrd.
Another bzImage file will create which is called kernel. The path is given below.
[root@localhost root]# cd /usr/src/linux/arch/i386/boot
[root@localhost boot]# ls
bzImage
... ... .... ... ...
Now we should copy the file in /boot directory with different file name. Consider file name is vmlinuz-2.4.8
[root@localhost boot]# cp bzImage /boot/vmlinuz-2.4.8
ð 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
title Red Hat Linux (2.4.20-8)
title Windows
|