Linux 102 - Kernel
Kernel modules
Basically, I want people to know that when they use binary-only modules, it's THEIR problem. I want people to know that in their bones, and I want it shouted out from the rooftops. I want people to wake up in a cold sweat every once in a while if they use binary-only modules.
– Linus Torvalds on linux-kernel
105.1 - Manage/Query kernel and kernel modules at runtime
Weight: 4
Objectives be able to manage and/or query a kernel and kernel loadable modules.This objective includes using command-line utilities to get information about the currently running kernel and kernel modules. It also includes manually loading and unloading modules as appropriate. It also includes being able to determine when modules can be unloaded and what parameters a module accepts.
The Linux kernel started out as a big monolithic thing that did all of the necessary kernel functions.
modules that supported:
Filesystems (e.g. ext3, reiserfs, vfat, jfs, xfs)
Character and block devices (tapes, mice, serial ports, hardware sensors)
Network adapters from various manufacturers and of various sorts
Bus protocols (USB, Firewire, ISA PnP)
Terms, Key files and utilities include:
/lib/modules/kernel-version/modules.dep Kernel module inter-dependencies
/etc/modules.conf & /etc/conf.modules modprobe configuration file (new and old)
depmod Determine module dependencies
insmod Insert a module into the kernel
lsmod List kernel modules
rmmod Remove an installed kernel module
modinfo Show information about a kernel module
modprobe Install modules and their dependencies (or remove)
uname Unix name, and kernel version number.
Inserting modules
To display list kernel modules:
$ lsmod
To load a single module into the kernel used the command below:
$ insmod
TO REMOVE A SINGLE MODULE FROM THE RUNNING KERNEL, USED THE COMMAND BELOW:
# rmmod
TO DISPLAY INFORMATION ABOUT A MODULE, USED THE COMMAND BELOW:
# modinfo
The module information for the 3COM 3c501 Ethernet adapter by executing command below:
# modinfo 3c501
end