Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Linux Magazine: The source for advanced Linux know-how

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 176 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

modules.conf




DESCRIPTION

       The behavior  of  modprobe(8)  (and  depmod(8)  )  can  be
       modified    by    the    (optional)   configuration   file
       /etc/modules.conf.

       The configuration file consists of a set of lines.
       All empty lines, and all text on a line after a '#',  will
       be ignored.
       Lines may be continued by ending the line with a '\'.
       The  remaining  lines  should  all  conform  to one of the
       following formats:

         [add] above module module_list
         alias alias_name result
         [add] below module module_list
         define VARIABLE WORD
         depfile=A_PATH
         else
         elseif EXPRESSION
         endif
         if EXPRESSION
         include PATH_TO_CONFIG_FILE
         insmod_opt=GENERIC_OPTIONS_TO_INSMOD
         install module command ...
         keep
         [add] options module MODULE_SPECIFIC_OPTIONS
         path=A_PATH
         path[TAG]=A_PATH
         generic_stringfile=A_PATH
         pcimapfile=A_PATH
         isapnpmapfile=A_PATH
         usbmapfile=A_PATH
         parportmapfile=A_PATH
         ieee1394mapfile=A_PATH
         pnpbiosmapfile=A_PATH
         [add] probe name module_list
         [add] probeall name module_list
         prune filename
         post-install module command ...
         post-remove module command ...
         pre-install module command ...
         pre-remove module command ...
         remove module command ...
         persistdir directory_name

       All arguments to a directive will be processed  to  handle
       shell  meta-characters,  which  means  that "shell tricks"
       like wild-cards and commands enclosed in  back-quotes  can
       be used:

         path[misc]=/lib/modules/1.1.5?/local

       directives  can  have  an optional prefix: add.  When this
       prefix is used, the new module_list will be added  to  the
       previous module_list instead of replacing it.


SEMANTICS

       A_PATH  is  the fully qualified path to the target.  It is
       possible to use shell meta-characters in A_PATH  including
       command output, such as `uname -r` and `kernelversion`.
       These two commands are also understood internally in these
       utilities as meaning the version  number  of  the  current
       kernel  and the current kernel version respectively (e.g.:
       2.2.3 and 2.2).

       WORD is a sequence if non-white characters.  If ' "  or  `
       is  found in the string, all characters up to the matching
       ' " or ` will also be included,  even  whitespace.   Every
       WORD will then be expanded w.r.t. meta-characters.  If the
       expanded result gives more than one  word  then  only  the
       first word of the result will be used.

       EXPRESSION below can be:

       WORD compare_op WORD
              where  compare_op is one of ==, !=, <, <=, >= or >.
              The string values of the WORDs are compared.

       -n WORD compare_op WORD
              where compare_op is one of ==, !=, <, <=, >= or  >.
              The numeric values of the WORDs are compared.

       WORD   If the expansion of WORD fails, or if the expansion
              is "0" (zero),  "false"  or  ""  (empty)  then  the
              expansion  has  the  value  FALSE.   Otherwise  the
              expansion has the value TRUE

       -f FILENAME
              Test if the file FILENAME exists.

       -k     Test if "autoclean" is enabled  (i.e.  called  from
              the kernel).

       ! EXPRESSION
              A negated expression is also an expression.


SYNTAX

       This is a description of the legal directives.

       define VARIABLE WORD
              Do  a  putenv("VARIABLE=WORD").   Variables  can be
              created  and  modified  by  this  directive.    The
              variables  will  be  available  in the environment,
              which makes them usable for all  commands  executed
              Note:  please  avoid  having  any  path  directives
              conditionally processed.  Since modprobe has enough
              built-in "smarts", a conditionally  processed  path
              directive  will  gain  you  nothing  but confusion.
              Really.

       else   If the previous matching  if  or  elseif  directive
              evaluated  its  expression  to  be  FALSE  then the
              directives  enclosed   by   the   (optional)   else
              directive  and its matching endif directive will be
              processed.

       elseif EXPRESSION
              If the previous matching if  or  elseif  directives
              evaluated  their  expression to be FALSE and if the
              expression for this  directive  evaluates  to  TRUE
              then the directives up to the next matching elseif,
              else or endif directive will be processed.

       endif  This directive  ends  the  chain  of  matching  if,
              elseif   or   else   directive(s)  controlling  the
              conditional  processing   of   configuration   file
              directives.

                if EXPRESSION
                    any config lines
                elseif EXPRESSION
                    any config lines
                else
                    any config lines
                endif

              The else and elseif directives are optional.

       include PATH_TO_CONFIG_FILE
              To  handle  different  platforms  or configurations
              with a  single  configuration  file  can  be  quite
              complex.   With  the  use of the include directive,
              conditionally processed by if directives,  this  is
              now easier to handle.

       insmod_opt=GENERIC_OPTIONS_TO_INSMOD
              If  insmod  should  need  some special options, not
              specified  elsewhere,  this  directive   makes   it
              possible  to  add  such  an  option, to be used for
              every invocation.  The standard default options  to
              insmod does normally not have to be modified unless
              some special situation needs to be handled.

       keep   If this word is found on a line  before  any  lines
              that contain the path descriptions, the default set
              of  paths  will  be  saved,  and  thus  added   to.
              missing, the tag "misc" is assumed.
              One very useful tag is boot, which can be  used  to
              mark all directories containing modules that should
              be loaded at boot-time.
              Note that you must specify the  keep  directive  to
              prevent  any  path  directives from over-riding the
              default paths.

       generic_stringfile=A_PATH
              This is the path to the  generic_string  file  that
              will  be  created  by  depmod  and  used by install
              scripts that need string information from  modules.
              Normally  the  default  value  should  be used, see
              below.  pcimapfile=A_PATH This is the path  to  the
              pcimap file that will be created by depmod and used
              by install scripts to find the module that supports
              a pci device.  Normally the default value should be
              used, see below.

       isapnpmapfile=A_PATH
              This is the path to the isapnpmap file that will be
              created  by  depmod  and used by install scripts to
              find the module that supports an  ISA  PNP  device.
              Normally  the  default  value  should  be used, see
              below.

       usbmapfile=A_PATH
              This is the path to the usbmap file  that  will  be
              created  by  depmod  and used by install scripts to
              find  the  module  that  supports  an  USB  device.
              Normally  the  default  value  should  be used, see
              below.

       parportmapfile=A_PATH
              This is the path to the parportmap file  that  will
              be created by depmod and used by install scripts to
              find the module that supports  an  parport  device.
              Normally  the  default  value  should  be used, see
              below.

       ieee1394mapfile=A_PATH
              This is the path to the ieee1394map file that  will
              be created by depmod and used by install scripts to
              find the module that supports an  ieee1394  device.
              Normally  the  default  value  should  be used, see
              below.

       pnpbiosmapfile=A_PATH
              This is the path to the pnpbiosmap file  that  will
              be created by depmod and used by install scripts to
              find the module that supports  an  pnpbios  device.
              Normally  the  default  value  should  be used, see
                alias some_module off

              will make modprobe ignore  requests  to  load  that
              module.  Another special alias is:

                alias some_module null

              which  will  make  requests  for some_module always
              succeed, but no module will actually be  installed.
              This  can  be used as a base for stacks created via
              the above and below directives.

              It is possible to have a large number of levels  of
              alias   directives,   since  all  aliases  will  be
              recursively expanded in order to find the  physical
              module actually referred to.  There is an arbitrary
              limit of 1000 on alias depth to detect loops like:

                alias a b
                alias b a

              If the final result of an alias  mapping  does  not
              match  the name of any module then modprobe applies
              probe and probeall  mappings  to  the  result.   If
              those  do not succeed then the module is not found.
              This  makes  constructs  like  this  give  sensible
              results (from devfs).

                alias           /dev/sg*        /dev/sg
                probeall        /dev/sg         scsi-hosts sg

              It  is legal for an alias to map module A to module
              B and for module A to exist at the  same  time  but
              this construct is ambiguous and is not recommended.
              For historical reasons, the kernel sound system has
              a  module  called  sound.o but the sound developers
              also want an alias from sound to the module for the
              user's  sound  card,  e.g. "alias sound sb".  In an
              attempt  to  support  this  requirement  but  still
              maintain  the defined behavior where options can be
              applied  to  aliases,   modprobe   bypasses   alias
              expansion when processing a module name if the name
              was obtained via modules.dep, otherwise aliases are
              expanded.   This  is  not  guaranteed  to  give the
              expected behavior on all  combinations  of  aliases
              and  real  modules, you should avoid using an alias
              with the same name as a real module.

       [add] probe name module_list

       [add] probeall name module_list
              These directives can only be used when name is  the
              contains  files  which  are  not  modules.    These
              include     modules.dep,    modules.generic_string,
              modules.pcimap, modules.isapnpmap,  modules.usbmap,
              modules.parportmap,            modules.ieee1394map,
              modules.pnpbiosmap, the build symlink to the kernel
              source  tree  and  any other files that the install
              process wants to save  from  a  kernel  build.   To
              prevent  depmod  issuing warnings about "not an ELF
              file", these non-module files should appear in  the
              prune list.  depmod has a built in prune list which
              cannot be removed because it lists files which will
              exist  for  any  kernel build.  If you add your own
              files to the top level  modules  directory,  add  a
              prune statement for each filename.  Note: The prune
              list is only used when scanning the  top  directory
              of  a  path,  and only if the directory contains at
              least one subdirectory from the  standard  list  of
              subdirectory  names,  i.e.  it  appears to be a top
              level directory built from a kernel  install.   The
              prune  list  has  no  effect on subdirectories of a
              path.

       [add] options [-k] module [MODULE_SPECIFIC_OPTIONS]
              All module names, including aliased names, can have
              their  own  options  directives.  Options specified
              for an alias have higher priority than the  options
              specified for more "basic" names. This rule is used
              to resolve conflicting options directives.  Options
              given   on   the  command  line  have  the  highest
              priority.  If there is -k before the  module  name,
              then  the  module  won't  be  autocleaned  even  if
              modprobe has been invoked  with  the  -k  autoclean
              option.   The optional add prefix adds the new list
              to the previous list instead of replacing  it.   If
              the  result  of  an alias is not a real module then
              any options that were constructed  from  the  alias
              chain are discarded before invoking probe[all].  If
              any   of   the   MODULE_SPECIFIC_OPTIONS    contain
              characters  that  are  special  to  the shell (e.g.
              space, comma, parentheses) then the option must  be
              enclosed  in '"..."'.  The '' delimit the option in
              modules.conf, the "" delimit the option when it  is
              passed to the shell.  For example,

                abc='"def,ghi jkl (xyz)"'

       [add] above module module_list
              This  directive makes it possible for one module to
              "pull in" another set of modules on top  of  itself
              in  a  module  stack,  as seen in the output of the
              lsmod(8) command.  The above  directive  is  useful
              circumstances  when  the  dependencies   are   more
              complex   than   what   can  be  described  in  the
              modules.dep dependency file.  This is an  optimized
              case of the pre-install and post-remove directives.
              Note that failure of installing the module will not
              influence   the   exit  status  of  modprobe.   The
              optional add  prefix  adds  the  new  list  to  the
              previous list instead of replacing it.

       The  following  directives  are  useful  for  (optionally)
       executing specific commands when loading and  unloading  a
       module.   Note  that  even  aliased  module names can have
       these directives, which will be  executed  in  the  proper
       order  together  with  any  directives  for  the unaliased
       module name.

       pre-install module command
              Execute command  before  installing  the  specified
              module.  See the below directive as well.

       install module command
              Execute  command instead of the default insmod when
              installing the specified module.

       post-install module command
              Execute  command  after  installing  the  specified
              module.  See the above directive as well.

       pre-remove module command
              Execute   command  before  removing  the  specified
              module.  See the above directive as well.

       remove module command
              Execute command instead of the  default  (built-in)
              rmmod when removing the specified module.

       post-remove module command
              Execute   command   after  removing  the  specified
              module.  See the below directive as well.

       persistdir=directory_name
              When  rmmod  removes   a   module   that   contains
              persistent   module   parameters,   it  stores  the
              (possibly)    modified    parameters     underneath
              directory_name.   When modprobe loads a module that
              contains persistent  module  parameters,  it  looks
              under  directory_name  for  any previous values for
              those parameters.  You must set persistdir  to  the
              name  of  a directory that is readable when modules
              are  loaded  and  is  writable  when  modules   are
              unloaded,       the      default      value      is
              /var/lib/modules/persist.  Many Linux distributions
               modules.  This assumes that the filesystem modules
               have no persistent data.


DEFAULT CONFIGURATION

       If the configuration file '/etc/modules.conf' is  missing,
       or  if  any  directive  is  not  overridden, the following
       defaults are assumed:

         depfile=/lib/modules/`uname -r`/modules.dep
         generic_stringfile=/lib/modules/`uname
       -r`/modules.generic_string
         pcimapfile=/lib/modules/`uname -r`/modules.pcimap
         isapnpmapfile=/lib/modules/`uname -r`/modules.isapnpmap
         usbmapfile=/lib/modules/`uname -r`/modules.usbmap
         parportmapfile=/lib/modules/`uname
       -r`/modules.parportmap
         ieee1394mapfile=/lib/modules/`uname
       -r`/modules.ieee1394map
         pnpbiosmapfile=/lib/modules/`uname
       -r`/modules.pnpbiosmap

         path[boot]=/lib/modules/boot
         path[toplevel]=/lib/modules/`uname -r`
         path[toplevel]=/lib/modules/`kernelversion`
         path[toplevel]=/lib/modules/default
         path[toplevel]=/lib/modules

         persistdir=/var/lib/modules/persist

       There  are  also  a  set  of  default  alias  and  options
       directives.   Since  this set is continuously extended, no
       list will be given here.  The (current) default set can be
       viewed  by  using  the  modprobe  -c command with an empty
       /etc/modules.conf file.

       All options directives specify the options  needed  for  a
       module, as in:

         modprobe de620 bnc=1

       These  options  will be overridden by any options given in
       the /etc/modules.conf file, and on  the  modprobe  command
       line.

       Remember  that it is possible to have an options directive
       for aliased module names as well as  for  the  non-aliased
       name.  This is useful for e.g. the dummy module:

         alias dummy0 dummy
         options dummy0 -o dummy0


AUTHOR

       Bjorn Ekwall <bj0rn@blox.se>
       Keith Owens <kaos@ocs.com.au>

                         07 December 1999         MODULES.CONF(5)
  




Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can get all the latest Site and Linux news by checking out our news page.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.04 Seconds