home *** CD-ROM | disk | FTP | other *** search
/ Login Magazine 68 / LoginMagazineNo68.bin / modules / depmod.txt < prev    next >
Text File  |  1999-11-07  |  13KB  |  397 lines

  1.  
  2.  
  3.  
  4. DEPMOD(1)              Linux Module Support             DEPMOD(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        depmod, modprobe - handle loadable modules automatically
  9.  
  10. SSYYNNOOPPSSIISS
  11.        ddeeppmmoodd [ -a ]
  12.        ddeeppmmoodd [ -a version ]
  13.        ddeeppmmoodd module1.o module2.o ...
  14.  
  15.        mmooddpprroobbee module.o [symbol=value ...]
  16.        mmooddpprroobbee -t tag pattern
  17.        mmooddpprroobbee -a -t tag pattern
  18.        mmooddpprroobbee -l [ -t tag ] pattern
  19.        mmooddpprroobbee -r module
  20.        mmooddpprroobbee -c
  21.  
  22. DDEESSCCRRIIPPTTIIOONN
  23.        These  utilities are intended to make a Linux modular ker-
  24.        nel manageable for all users, administrators and distribu-
  25.        tion maintainers.
  26.  
  27.        DDeeppmmoodd creates a "Makefile"-like dependency file, based on
  28.        the symbols it finds in the set of  modules  mentioned  on
  29.        the command line (or in a default place).  This dependency
  30.        file can later be used by mmooddpprroobbee to  automatically  load
  31.        the relevant module(s).
  32.  
  33.        MMooddpprroobbee is used to load a set of modules, either a single
  34.        module, a stack of dependant modules, or all modules  that
  35.        are marked with a specified tag.
  36.  
  37.        MMooddpprroobbee  will  automatically load all base modules needed
  38.        in a module stack, as described  by  the  dependency  file
  39.        modules.dep.   If  the  loading  of  one  of these modules
  40.        fails, the whole current stack of modules will be unloaded
  41.        (by rmmod) automatically.
  42.  
  43.        MMooddpprroobbee  has  two  ways  of loading modules. One way (the
  44.        probe mode) will try to  load  a  module  out  of  a  list
  45.        (defined  by  ppaatttteerrnn  ).  It stops loading as soon as one
  46.        module load successfully.  This can be  used  to  autoload
  47.        one  ethernet driver out of a list for example.  The other
  48.        way, is to load all modules from a list.  This can be used
  49.        to load some modules at boot time.
  50.  
  51.        With  the  option --rr,, modprobe will automatically unload a
  52.        stack of modules, similar to the way rrmmmmoodd --rr does.
  53.  
  54.        Option -l combined with option -t list all available  mod-
  55.        ules  of  a certain type.  An enhanced mmoouunntt command could
  56.        use the command
  57.  
  58.             modprobe -l -t fs
  59.  
  60.        to get the list of all file system drivers  available  and
  61.  
  62.  
  63.  
  64. Linux                     March 17, 1996                        1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DEPMOD(1)              Linux Module Support             DEPMOD(1)
  71.  
  72.  
  73.        on  request  load  the  proper one.  So, the mount command
  74.        could become more generic as well...  (The  kerneld  solve
  75.        this without changing the mount utility)
  76.  
  77.        Option -c will print all configuration (default + configu-
  78.        ration file).
  79.  
  80.        The  normal  use  of  ddeeppmmoodd  is  to  include   the   line
  81.        "/sbin/depmod  -a" in one of the rc-files in /etc/rc.d, so
  82.        that the correct module  dependencies  will  be  available
  83.        immediately after booting the system.
  84.        Note  that  it  is  also possible to create the dependency
  85.        file immediately after compiling a new kernel.  If you  do
  86.        "depmod  -a  1.3.99"  when you have compiled kernel 1.3.99
  87.        and its modules the first time, while still  running  e.g.
  88.        1.3.98, the file will be created in the correct place.
  89.        Note  however that the dependencies on the kernel will not
  90.        be guaranteed to be correct in this case!
  91.  
  92.        Option --dd put depmod in debug mode. It outputs all command
  93.        it  is  issuing.   Option --ee output the list of unresolved
  94.        symbol for each module, Normally depmod  only  output  the
  95.        list  of unloadable modules.  Option --vv output the list of
  96.        all processed modules.  Modules may be located at  differ-
  97.        ent place in the filesystem, but there will always be some
  98.        need to override this, especially for  module  developers.
  99.        We  expect  some official standard will emerge, defined by
  100.        the FSSTND.  Until that time you might as  well  use  this
  101.        suggested directory structure.
  102.  
  103. CCOONNFFIIGGUURRAATTIIOONN
  104.        The  behaviour  of  ddeeppmmoodd and mmooddpprroobbee can be adjusted by
  105.        the (optional) configuration file //eettcc//ccoonnff..mmoodduulleess
  106.  
  107.        The configuration file consists of a set of lines.
  108.        All empty lines, and all text on a line after a '#',  will
  109.        be ignored.
  110.        Lines may be continued by ending the line with a '\'.
  111.        The  remaining lines should all conform to one of the fol-
  112.        lowing formats:
  113.  
  114.          keep
  115.          parameter=value
  116.          options module symbol=value ...
  117.          alias module real_name
  118.          pre-install module command ...
  119.          install module command ...
  120.          post-install module command ...
  121.          pre-remove module command ...
  122.          remove module command ...
  123.          post-remove module command ...
  124.  
  125.        All values in the "parameter" lines will be processed by a
  126.        shell, which means that "shell tricks" like wild-cards and
  127.  
  128.  
  129.  
  130. Linux                     March 17, 1996                        2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DEPMOD(1)              Linux Module Support             DEPMOD(1)
  137.  
  138.  
  139.        commands enclosed in back-quotes can be used:
  140.  
  141.          path[misc]=/lib/modules/1.1.5?
  142.          path[net]=/lib/modules/`uname -r`
  143.  
  144.        Parameters may be repeated multiple times.
  145.  
  146.        These are the legal parameters:
  147.  
  148.        keep   If this word is found on a line  bbeeffoorree  any  lines
  149.               that contain the ppaatthh descriptions, the default set
  150.               of paths will be saved, and thus added to.   Other-
  151.               wise  the  normal behaviour is that the default set
  152.               will be rreeppllaacceedd by the set of paths in the config-
  153.               uration file.
  154.  
  155.        depfile=DEPFILE_PATH
  156.               This  is  the path to the dependency file that will
  157.               be created by ddeeppmmoodd and used by mmooddpprroobbee..
  158.  
  159.        path=SOME_PATH
  160.               The ppaatthh parameter specifies a directory to  search
  161.               for the modules.
  162.  
  163.        path[tag]=SOME_PATH
  164.               The path parameter can carry an optional tag.  This
  165.               tells us a little more about  the  purpose  of  the
  166.               modules in this directory and allows some automated
  167.               operations by mmooddpprroobbee..  The tag is appended to the
  168.               "path"  keyword enclose in square brackets.  If the
  169.               tag is missing, the tag "misc" is assumed.
  170.               One very useful tag is bboooott,, which can be  used  to
  171.               mark  all  modules  that  should be loaded at boot-
  172.               time.
  173.  
  174.        If the configuration file '/etc/conf.modules' is  missing,
  175.        or  if  any  parameter  is  not  overridden, the following
  176.        defaults are assumed:
  177.  
  178.          depfile=/lib/modules/`uname -r`/modules.dep
  179.          path[boot]=/lib/modules
  180.  
  181.          path[fs]=/lib/modules/`uname -r`
  182.          path[misc]=/lib/modules/`uname -r`
  183.          path[net]=/lib/modules/`uname -r`
  184.          path[scsi]=/lib/modules/`uname -r`
  185.          path[cdrom]=/lib/modules/`uname -r`
  186.          path[ipv4]=/lib/modules/`uname -r`
  187.          path[ipv6]=/lib/modules/`uname -r`
  188.          path[sound]=/lib/modules/`uname -r`
  189.  
  190.          path[fs]=/lib/modules/default
  191.          path[misc]=/lib/modules/default
  192.          path[net]=/lib/modules/default
  193.  
  194.  
  195.  
  196. Linux                     March 17, 1996                        3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DEPMOD(1)              Linux Module Support             DEPMOD(1)
  203.  
  204.  
  205.          path[scsi]=/lib/modules/default
  206.          path[cdrom]=/lib/modules/default
  207.          path[ipv4]=/lib/modules/default
  208.          path[ipv6]=/lib/modules/default
  209.          path[sound]=/lib/modules/default
  210.  
  211.          path[fs]=/lib/modules
  212.          path[misc]=/lib/modules
  213.          path[net]=/lib/modules
  214.          path[scsi]=/lib/modules
  215.          path[cdrom]=/lib/modules
  216.          path[ipv4]=/lib/modules
  217.          path[ipv6]=/lib/modules
  218.          path[sound]=/lib/modules
  219.  
  220.        All "option" lines specify the default  options  that  are
  221.        needed for a module, as in:
  222.  
  223.          modprobe de620 bnc=1
  224.  
  225.        These  options  will be overridden by any options given on
  226.        the mmooddpprroobbee command line.
  227.        It is possible to have an "option" line for aliased module
  228.        names as well as for the non-aliased name.  This is useful
  229.        for e.g. the dummy module:
  230.  
  231.          alias dummy0 dummy
  232.          options dummy0 -o dummy0
  233.  
  234.  
  235.        The "alias" lines can be used to give alias names to  mod-
  236.        ules.  A line in /etc/conf.modules that looks like this:
  237.  
  238.          alias iso9660 isofs
  239.  
  240.        makes it possible to write mmooddpprroobbee iissoo99666600 although there
  241.        is no such module available.
  242.        Note that the line:
  243.  
  244.          alias some_module off
  245.  
  246.        will make modprobe ignore requests to  load  that  module.
  247.        This is usually used in conjunction with kkeerrnneelldd..
  248.  
  249.        Commands
  250.               The configuration lines
  251.                 pre-install module command ...
  252.                 install module command ...
  253.                 post-install module command ...
  254.                 pre-remove module command ...
  255.                 remove module command ...
  256.                 post-remove module command ...
  257.               can  be  used when one wants some specific commands
  258.               to  be  executed  when  a  module  is  inserted  or
  259.  
  260.  
  261.  
  262. Linux                     March 17, 1996                        4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. DEPMOD(1)              Linux Module Support             DEPMOD(1)
  269.  
  270.  
  271.               removed.   All  text  after the module name will be
  272.               interpreted as the command text.
  273.               Note that the pre- and  post-remove  commands  will
  274.               nnoott  be  executed  if  a module is "autocleaned" by
  275.               kerneld!  Look for the up-coming support  for  per-
  276.               sistent module storage instead.
  277.  
  278. SSTTRRAATTEEGGYY
  279.        The idea is that mmooddpprroobbee will look first at the directory
  280.        containing modules compiled for the current release of the
  281.        kernel.   If  the module is not found there, mmooddpprroobbee will
  282.        look in the directory containing  modules  for  a  default
  283.        release.
  284.  
  285.        When  you install a new linux, the modules should be moved
  286.        to a directory related to the release (and version) of the
  287.        kernel  you  are installing.  Then you should do a symlink
  288.        from this directory to the "default" directory.
  289.  
  290.        Each time you compile a new kernel, the command mmaakkee  mmoodd--
  291.        uulleess__iinnssttaallll will create a new directory, but won't change
  292.        the default.
  293.  
  294.        When you get a module unrelated to the kernel distribution
  295.        you  should  place  it  in  one of the version-independent
  296.        directories under /lib/modules.
  297.  
  298.        This is the default strategy, which can be  overridden  in
  299.        /etc/conf.modules.
  300.  
  301. EEXXAAMMPPLLEESS
  302.        modprobe -t net
  303.               Load  one  of  the  modules  that are stored in the
  304.               directory tagged  "net".   Each  module  are  tried
  305.               until one succeed (default: /lib/modules/net).
  306.  
  307.        modprobe -a -t boot
  308.               All modules that are stored in the directory tagged
  309.               "boot" will be loaded (default: /lib/modules/boot).
  310.  
  311.        modprobe slip.o
  312.               This  will  attempt to load the module slhc.o if it
  313.               was not previously loaded, since  the  slip  module
  314.               needs  the  functionality in the slhc module.  This
  315.               dependency will be  described  in  the  file  "mod-
  316.               ules.dep" that was created automatically by ddeeppmmoodd
  317.  
  318.        modprobe -r slip.o
  319.               will  unload  slip.o.  It  will  also unload slhc.o
  320.               automatically, unless it is used by some other mod-
  321.               ule as well (like e.g. ppp.o).
  322.  
  323. FFIILLEESS
  324.        /etc/conf.modules, (and /etc/modules.conf)
  325.  
  326.  
  327.  
  328. Linux                     March 17, 1996                        5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. DEPMOD(1)              Linux Module Support             DEPMOD(1)
  335.  
  336.  
  337.        /lib/modules/*/modules.dep,
  338.        /lib/modules/*
  339.  
  340. SSEEEE AALLSSOO
  341.        lsmod(1), kerneld(8), ksyms(1), modules(2),
  342.  
  343. RREEQQUUIIEERREEDD UUTTIILLIITTIIEESS
  344.        insmod(1), nm(1) rmmod(1),
  345.  
  346. NNOOTTEESS
  347.        The  pattern supplied to modprobe will often be escaped to
  348.        ensure that it is evaluated in the proper context
  349.  
  350.  
  351. AAUUTTHHOORR
  352.        Jacques Gelinas (jack@solucorp.qc.ca)
  353.        Bjorn Ekwall (bj0rn@blox.se)
  354.  
  355. BBUUGGSS
  356.        Naah...
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Linux                     March 17, 1996                        6
  395.  
  396.  
  397.