- Modprobe
modprobe is a
Linux program written byRusty Russell used to add/remove a module to/from theLinux kernel (to add/remove aloadable kernel module ).The current version of modprobe is distributed as part of the software package "module-init-tools" [http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/] , for Linux kernel version 2.5.x and later. It was previously developed as "modutils" [http://ftp.kernel.org/pub/linux/utils/kernel/modutils/] for use with Linux versions 2.2.x and 2.4.x.
Operation
The program is a
wrapper that calls the more basic insmod and rmmod utilities, with the following benefits:*An ability to make more intuitive decisions about which modules to load.
*An awareness of module dependencies, so when requested to load a module, it adds the required modules first.
*Recursive module dependencies are resolved as required.To see if a module is currently in your Linux Kernel (e.g. ppp), use:
/sbin/modprobe -v
-v or --verbose print messages about what the program is doing. Usually modprobe only prints messages if something goes wrong.
-r or --remove causes modprobe to remove, rather than insert a module.
-l or --list lists all modules matching the given wildcard (or "*" if no wildcard is given)
-c or --showconfig dumps out the
configuration file and exits.If any arguments are given after the modulename, they are passed to the kernel (in addition to any options listed in the configuration file). In some versions of modprobe, the configuration file is called modprobe.conf, and in others the equivalent is the collection of files called
in the /etc/modprobe.d directory. Features
The "modprobe" program also has more configuration features than other similar utilities. It is possible to define module aliases allowing for some automatic loading of modules. When the kernel requires a module, it actually runs modprobe requesting it; however, the kernel has a description of only some module property (for example, a device major number, or the number of a network protocol), and modprobe does the job of translating that to an actual module name via aliases.
This program also has the ability to run programs before or after loading or unloading a given module; for example, setting the mixer right after loading a soundcard module, or uploading the firmware to a device immediately prior to enabling it. Although these actions must be implemented by external programs, modprobe takes care of synchronizing their executions with module loading/unloading.
Blacklist
There are cases where two or more modules both support the same devices, or a module invalidly claims to support a device: the blacklist keyword indicates that all of a particular module's internal aliases are to be ignored. [ [http://linux.die.net/man/5/modprobe.conf modprobe.conf(5) - Linux man page ] ]
There are a couple of ways to blacklist a module, and depending on the method used to load it depends on where this is configured.
There are two ways to blacklist a module using modprobe, employing a the modprobe.conf system, the first is to use its blacklisting system in /etc/modprobe.d/blacklist
cat /etc/modprobe.d/blacklist blacklist ieee1394 blacklist ohci1395 blacklist eth1394 blacklist sbp2
The second, more guaranteed method (for stubborn modules) is to use the following instead. Apparently an install primitive is the most powerful in the config file, and will be used instead of the blacklist (even though they should be the same if not the other way around).
cat /etc/modprobe.d/ieee1394 install ieee1394 /bin/true install ohci1394 /bin/true install eth1394 /bin/true install sbp2 /bin/true
See also
*
libusb References
External links
* [http://linux.die.net/man/8/modprobe modprobe man page] .
* [http://linux.die.net/man/5/modprobe.conf modprobe.conf]
* [http://linux.die.net/man/5/modules.dep modules.dep]
Wikimedia Foundation. 2010.