Delete program, file and lines related to modules
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.
Stepi
kmod and other module management programs included in the “modutils” RPM package use the conf.modules file located in the “/etc” directory 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 the “conf.modules” file and uninstall completely the “modutils” package program.
• To remove the “conf.modules” file, use the command:
[root@deep /]# rm -f/etc/conf.modules
• To uninstall the modutils package, use the following command:
[root@deep /]# rpm -e -nodeps modutils
Step 2
One last thing to do is to edit the file “rc.sysinit” and 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 the rc.sysinit script to find module dependencies in the kernel by default.
Under Red Hat Linux 6.1
Comment out the line 260 in the rc.sysinit file (vi +260 /etc/rc.d/rc.sysinit):
if [ -x /sbin/depmod -a -n “$USEMODULES” ]; then
To read:
#if [ -x /sbin/depmod -a -n “$USEMODULES” ]; then
Comment out the lines 272 to 277 in the rc.sysinit file (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 fi To 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
Страниц: 1 2