Chapter 24 Kernel Modules; Kernel Module Utilities - Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Manual

Hide thumbs Also See for LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE:
Table of Contents

Advertisement

Section 24.1:Kernel Module Utilities
24 Kernel Modules
The Linux kernel has a modular design. At boot time, only a minimal resident kernel is loaded into
memory. Thereafter, whenever a user requests a feature that is not present in the resident kernel, a
kernel module is dynamically loaded into memory. After a specified period of inactivity, the module
may be removed from memory.
The mechanism that supports dynamic loading of modules is a kernel thread called kmod. Modules
are not loaded unless they are needed. When the kernel requests a module, the module is loaded along
with all its module dependencies.
Red Hat Linux also includes a cron task that removes all unused modules every ten minutes. The cron
task is located in the file /etc/cron.d/kmod. Refer to Section 22.1, Cron for more information
on cron tasks.
When you install Red Hat Linux, the hardware on your system is probed and you provide information
about how the system will be typically used and which programs should be loaded. Based on this
probing and the information you provide, the installation program decides which modules need to
be loaded at boot time. The installation program sets up the dynamic loading mechanism to work
transparently. If you build your own custom kernel, you can make all of these decisions for yourself.
If you add new hardware after installation and the hardware requires a kernel module, you need to set
up the dynamic loading mechanism. Kudzu usually detects new hardware. You can also add the new
driver by editing the module configuration file, /etc/modules.conf.
For example, if your system included a model SMC EtherPower 10 PCI network adapter at the time
of installation, the module configuration file will contain the following line:
alias eth0 tulip
After installation, if you install a second identical network adapter to your system, add the following
line to /etc/modules.conf:
alias eth1 tulip
See the Official Red Hat Linux Reference Guide for an alphabetical list of kernel modules and the
hardware supported by the modules.

24.1 Kernel Module Utilities

You can also use a group of commands to list, load, or unload kernel modules. These commands are
useful if you want to try different modules or see if a module has been loaded successfully.
The command /sbin/lsmod displays a list of currently loaded modules.
241

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux 7.2

Table of Contents