By default when you install Red Hat Linux for the first time like we do, the kernel is built as a modularized kernel. This means that each device or function we need exists as modules and is controlled by the Kernel Daemon program named kmod, which automatically loads some modules and functions support into memory as it is needed, and unloads it when it's no longer being used.
kmod and other module management programs included in the modutils RPM package use the
conf.modulesfile located in the/etcdirectory to know, for example which Ethernet card you have, if your Ethernet card requires special configuration and so on. Since we are not using any modules in our new compiled kernel, we can remove theconf.modulesfile and uninstall completely the modutils package program. To remove theconf.modulesfile, use the command:[root@deep] /#rm -f /etc/conf.modulesTo uninstall the modutils package, use the following command:
[root@deep] /#rpm -e --nodeps modutilsOne last thing to do is to edit the file
rc.sysinitand comment out all the lines related to depmod -a by inserting a#at the beginning of the lines. This is needed since at boot time the system read therc.sysinitscript to find module dependencies in the kernel by default.
Comment out the line 260 in the
rc.sysinitfile vi +260/etc/rc.d/rc.sysinit:if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then, To read:#if [ -x /sbin/depmod -a -n "$USEMODULES" ]; thenComment out the lines 272 to 277 in the
rc.sysinitfile vi +272/etc/rc.d/rc.sysinit:if [ -L /lib/modules/default ]; then INITLOG_ARGS= action "Finding module dependencies" depmod -a default else INITLOG_ARGS= action "Finding module dependencies" depmod -a fi fiTo read: # if [ -L /lib/modules/default ]; then # INITLOG_ARGS= action "Finding module dependencies" depmod -a default # else # INITLOG_ARGS= action "Finding module dependencies" depmod -a # fi #fi
The procedure described above relates to initscripts-4_70-1 package under Red Hat Linux version 6.1.

Comment out the line 243 in the
rc.sysinitfile vi +243/etc/rc.d/rc.sysinit:if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then, To read:#if [ -x /sbin/depmod -a -n "$USEMODULES" ]; thenComment out the lines 255 to 260 in the
rc.sysinitfile vi +255/etc/rc.d/rc.sysinit:if [ -L /lib/modules/default ]; then INITLOG_ARGS= action "Finding module dependencies" depmod -a default else INITLOG_ARGS= action "Finding module dependencies" depmod -a fi fiTo read:
# if [ -L /lib/modules/default ]; then # INITLOG_ARGS= action "Finding module dependencies" depmod -a default # else # INITLOG_ARGS= action "Finding module dependencies" depmod -a # fi #fiOnce again, all of this part Delete program, file and lines related to modules is required only if you said No to
Enable loadablemodule supportCONFIG_MODULESin your kernel configuration above.Now you must Reboot your system and test your results.
[root@deep] /#rebootWhen the system is rebooted and you are logged in, verify the new version of your kernel with the following command: To verify the version of your new kernel, use the following command:
[root@deep] /#uname -a
Linux deep.openna.com 2.2.14 #1 Mon Jan 10 10:40:35 EDT 2000 i686 unknown
[root@deep]#
Congratulation !.