Mostrando entradas con la etiqueta Modules. Mostrar todas las entradas
Mostrando entradas con la etiqueta Modules. Mostrar todas las entradas

lunes, 13 de marzo de 2023

/etc/modprobe.d

 

/etc/modprobe.d

All files in the /etc/modprobe.d subdirectory tree which end with the .conf extension are scanned when modules are loaded and unloaded using modprobe. Files in the /etc/modprobe.d directory control some parameters that come into play when loading with modprobe. These parameters include module name aliases and automatically supplied options. You can also blacklist specific modules to avoid them being loaded.

Settings apply to modules as they are loaded or unloaded, and configurations can be changed as needs change.

The format of files in /etc/modprobe.d is simple: one command per line, with blank lines and lines starting with # ignored (useful for adding comments). A backslash at the end of a line causes it to continue on the next line, which makes the file a bit neater.

Linux Module

 Module location 

Kernel modules are located in /lib/modules/$(uname -r) and can be compiled for specific kernel versions.

Module Utilities

There are a number of utility programs that are used with kernel modules:

  • lsmod
    List loaded modules.
  • insmod
    Directly load modules.
  • rmmod
    Directly remove modules.
  • modprobe
    Load or unload modules, using a pre-built module database with dependency and location information.
  • depmod
    Rebuild the module dependency database.
  • modinfo
    Display information about a module.

*** Use the modprobe command to load a module:

$ modprobe e1000e

**** Use the modprobe -r command to unload or remove a module:

$ modprobe -r e1000e

**** modprobe requires a module dependency database be updated. Use the depmod command to generate or update the file /lib/modules/$(uname -r)/modules.dep.

***Use the insmod command to directly load a module (requires fully qualified module name):

$ insmod /lib/modules/$(uname -r)/kernel/drivers/net/ethernet/intel/e1000e.ko

***Use the rmmod command to directly remove a module:

$ rmmod e1000e

*** Use the lsmod command to list the loaded modules:

$ lsmod

*** Use the modinfo command to display information about a module (including parameters):

$ modinfo e1000e