Posts

Showing posts with the label Module Management

Blacklisting modules in RHEL or CentOS 7

Blacklisting modules in RHEL or CentOS 7 You may come to a requirement where you want to "blacklist" a module. Why would you need this feature? Because sometimes a module may cause conflict with another modules, or is superseded by another module, or is otherwise undesirable. To blacklist a module, the easiest way is to add an module entry to /etc/modprobe.d/blacklist.conf Let's see how it can be done ! We can take "vfat" module for example, check if it is loaded: [root@localhost ~]# lsmod | grep -i vfat [root@localhost ~]# If you see in below command it's allowed to load, not blacklisted: [root@localhost ~]# modprobe --showconfig | grep vfat alias fs_vfat vfat [root@localhost ~]# Now we will try to load it: [root@localhost ~]# modprobe vfat [root@localhost ~]# lsmod | grep -i vfat vfat                   17461  0 fat                  ...

Module Management in RHEL / CentOS 7

The Linux kernel allows drivers and features to be compiled as modules rather than as part of the kernel itself. This means that users can often change features in the kernel or add drivers without recompiling, and that the Linux kernel doesn't have to carry a lot of unnecessary baggage. Want to learn how to manage your modules? It's easy to do, just keep reading. In this tutorial, we'll walk through the steps of seeing what's already loaded in the running kernel, and adding and removing modules from the kernel. What's Loaded 1. To see Loaded Kernel driver or module information for PCI components: [root@localhost ~]# lspci -k 00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)         Subsystem: VMware Virtual Machine Chipset         Kernel driver in use: agpgart-intel 00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01) 00:07.0 ISA bridge: Intel Corporation 82371...

Module management & Tweaking Linux performance.

Image
How to manage modules & tweak kernel ? Here modules are supporting driver programs to manage our different hardwares. A newly fresh installed Linux system uses nearly 900 to 950 kernel modules. Which takes too much processing power of your Linux Box. But when think about tweaking your kernel it's nothing but the removing or unloading unwanted modules. How do i find out list of all available kernel modules on my linux box : #ls -R /lib/modules/$(uname -r) |less How to display list of loaded modules : #lsmod |less How to see more information about module including it's version, dependency etc : #modinfo <module name> How to load or install a module : #insmod <Module Name> Note : Some times it gets failed because some modules are depend on other modules, so 1st you need to solve dependency problem, with "modprobe" and "depmod" commands. "modprobe" output always depend on the result of "depmod" c...