modprobe

modprobe

modprobe is a Linux program originally written by Rusty Russell and used to add a loadable kernel module (LKM) to the Linux kernel or to remove an LKM from the kernel. It is commonly used indirectly: udev relies upon modprobe to load drivers for automatically detected hardware.

As of 2010 modprobe is distributed as part of the software package "module-init-tools",[1] for Linux kernel version 2.6 and later. It was previously developed as "modutils"[2] for use with Linux versions 2.2.x and 2.4.x. Jon Masters and others maintain module-init-tools.

Contents

Operation

The program offers more full-featured, Swiss-army-knife features than 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 other required modules first
  • the resolution of recursive module-dependencies as required

If no switches are specified, the default is to add/insert/install the module into the kernel. Root privileges may be required for success; in some cases this requires typing sudo modprobe.

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 <modulename> 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 execution 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.[3]

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 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 ohci1394
blacklist eth1394
blacklist sbp2

An install primitive is the highest priority in the config file and will be used instead of the blacklisting method above, requiring this second method:

cat /etc/modprobe.d/ieee1394
install ieee1394 /bin/true
install ohci1394 /bin/true
install eth1394 /bin/true
install sbp2 /bin/true

Alternately, you can modify /etc/modprobe.conf:

alias sub_module /dev/null 
alias module_main /dev/null 
options module_main needed_option=0

See also

  • lsmod

References

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Modprobe — is a Linux program written by Rusty Russell used to add/remove a module to/from the Linux kernel (to add/remove a loadable kernel module).The current version of modprobe is distributed as part of the software package module init tools [http://ftp …   Wikipedia

  • Cluster de alta disponibilidad y espejo con Ubuntu 7.04 — Saltar a navegación, búsqueda Cluster de alta disponibilidad y espejo con Ubuntu 7.04 Este proyecto fue realizado como un proyecto de comunicaciones I de la Universidad de El Salvador La versión en que se vaso en ese momento fue Ubuntu 7.04 pero… …   Wikipedia Español

  • NdisWrapper — en lignes de commandes …   Wikipédia en Français

  • Ndiswrapper — NdisWrapper en l …   Wikipédia en Français

  • Loadable kernel module — In computing, a loadable kernel module (or LKM) is an object file that contains code to extend the running kernel, or so called base kernel, of an operating system. Most current Unix like systems, and Microsoft Windows, support loadable kernel… …   Wikipedia

  • Network block device — In Linux, a network block device is a device node whose content is provided by a remote machine. Typically, network block devices are used to access a storage device that does not physically reside in the local machine but on a remote one. As an… …   Wikipedia

  • Blacklist (computing) — In computing, a blacklist is a basic access control mechanism that allows every access, except for the members of the black list (i.e. list of denied accesses). The opposite is a whitelist, which means allow nobody, except members of the white… …   Wikipedia

  • Western Digital My Book — My Book  серия внешних жестких дисков производства компании Western Digital. Выпускается девять вариантов (editions) My Book: Essential Edition, Home Edition, Office Edition, Mirror Edition, Studio Edition, Premium Edition, Pro Edition,… …   Википедия

  • Linux kernel — Linux Linux kernel 3.0.0 booting Company / developer Linus Torvalds and thousands …   Wikipedia

  • Lguest — is a Linux kernel virtualization x86 hypervisor, introduced in kernel version 2.6.23 (released 09 Oct 2007). It is not a full virtualization solution; instead it operates the Linux kernel with lguest support. Installation is as easy as running… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”