Sunday, December 4, 2016
Linux module modulation
Linux module modulation
Linux allows the Kernel to be configured at run time, to enable or disable different services as you see fit. This way you dont have to compile a monolithic kernel, and can save some memory usage. Some modules youll only need for a short time, others youll need all the time. You can configure your Linux machine to load kernel modules on startup so you dont have to remember to do that when (if) you reboot.
There are a few commands that allow you to maniuplate the kernel. Each is quickly described below, for more information say `man [command]`.
depmod - handle dependency descriptions for loadable kernel modules.
insmod - install loadable kernel module.
lsmod - list loaded modules.
modinfo - display information about a kernel module.
modprobe - high level handling of loadable modules.
rmmod - unload loadable modules.
depmod - handle dependency descriptions for loadable kernel modules.
insmod - install loadable kernel module.
lsmod - list loaded modules.
modinfo - display information about a kernel module.
modprobe - high level handling of loadable modules.
rmmod - unload loadable modules.
# Show the module dependencies.
depmod -n
depmod -n
# Install some module
insmod --autoclean [modnam]
insmod --autoclean [modnam]
# This lists all currently loaded modules, lsmod takes no useful parameters
lsmod
lsmod
# Display information about module eepro100
modinfo --author --description --parameters eepro100
modinfo --author --description --parameters eepro100
# Removing a module (dont use the example)
rmmod --all --stacks ip_tables
rmmod --all --stacks ip_tables
The kernel modules can use two different methods of automatic loading. The first method (modules.conf) is my preferred method, but you can do as you please.
modules.conf - This method load the modules before the rest of the services, I think before your computer chooses which runlevel to use
rc.local - Using this method loads the modules after all other services are started
modules.conf - This method load the modules before the rest of the services, I think before your computer chooses which runlevel to use
rc.local - Using this method loads the modules after all other services are started
You should see/know that modules are necessary. They can be loaded via modules.conf or rc.local, but modules.conf load them first and rc.local loads them last. Using the various module commands you can add, remove, list or get information about modules.
Available link for download
Labels:
linux,
modulation,
module