Submitted By: Jim Gifford Date: 2009-02-17 Initial Package Version: 3.6 Upstream Status: Unknown Origin: Ken Moffat Description: Provides the man pages (adding docbook2man with all its dependencies would be a major addition to the book, so I built it -once- on a completed system and saved the data). Was fixed under version 3.4, but with 3.6 they are missing again diff -Naur module-init-tools-3.6.orig/depmod.8 module-init-tools-3.6/depmod.8 --- module-init-tools-3.6.orig/depmod.8 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/depmod.8 2009-02-17 23:08:02.000000000 -0800 @@ -0,0 +1,111 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "DEPMOD" "8" "17 February 2009" "" "" + +.SH NAME +depmod \- program to generate modules.dep and map files. +.SH SYNOPSIS + +\fBdepmod\fR [ \fB-b \fIbasedir\fB\fR ] [ \fB-e\fR ] [ \fB-F \fISystem.map\fB\fR ] [ \fB-n\fR ] [ \fB-v\fR ] [ \fB\fIversion\fB\fR ] [ \fB-A\fR ] + + +\fBdepmod\fR [ \fB-e\fR ] [ \fB-F\fISystem.map\fB\fR ] [ \fB-n\fR ] [ \fB-v\fR ] [ \fB\fIversion\fB\fR ] [ \fB\fIfilename\fB\fR\fI ...\fR ] + +.SH "DESCRIPTION" +.PP +Linux kernel modules can provide services (called "symbols") for +other modules to use (using EXPORT_SYMBOL in the code). If a +second module uses this symbol, that second module clearly +depends on the first module. These dependencies can get quite +complex. +.PP +\fBdepmod\fR creates a list of module dependencies, +by reading each module under +\fI/lib/modules/\fR\fIversion\fR +and determining what symbols it exports, and what symbols it +needs. By default this list is written to +\fImodules.dep\fR in the same directory. If +filenames are given on the command line, only those modules are +examined (which is rarely useful, unless all modules are +listed). +.PP +If a \fIversion\fR is provided, then that +kernel version's module directory is used, rather than the +current kernel version (as returned by "uname -r"). +.PP +\fBdepmod\fR will also generate various map files +in this directory, for use by the hotplug infrastructure. +.SH "OPTIONS" +.TP +\fB-a --all \fR +Probe all modules. This option is enabled by default if no +file names are given in the command-line. +.TP +\fB-A --quick \fR +This option scans to see if any modules are newer than the +\fImodules.dep\fR file before any work is done: +if not, it silently exits rather than regenerating the files. +.TP +\fB-b \fIbasedir\fB --basedir \fIbasedir\fB \fR +If your modules are not currently in the (normal) +directory +\fI/lib/modules/\fR\fIversion\fR, +but in a staging area, you can specify a +\fIbasedir\fR which is prepended to +the directory name. This +\fIbasedir\fR is stripped from the +resulting \fImodules.dep\fR file, so it +is ready to be moved into the normal location. +.TP +\fB-C --config \fIfile or directory\fB \fR +This option overrides the default configuration file +(/etc/depmod.conf or /etc/depmod.d/ if that is not found). +.TP +\fB-e --errsyms \fR +When combined with the \fB-F\fR option, this +reports any symbols which a module needs which are not +supplied by other modules or the kernel. Normally, any +symbols not provided by modules are assumed to be +provided by the kernel (which should be true in a +perfect world). +.TP +\fB-F --filesyms \fISystem.map\fB \fR +Supplied with the \fISystem.map\fR produced +when the kernel was built, this allows the +\fB-e\fR option to report unresolved symbols. +.TP +\fB-h --help \fR +Print the help message, and exit. +.TP +\fB-n --dry-run \fR +This sends the resulting modules.dep, then the various +map files, to standard output, rather than writing them into +the module directory. +.TP +\fB-v --verbose \fR +In verbose mode \fBdepmod\fR will print (to stdout) +all the symbols each module depends on and the module's file name +which provides that symbol. +.TP +\fB-V --version \fR +Show version of program, and exit. See below for caveats when +run on older kernels. +.SH "BACKWARDS COMPATIBILITY" +.PP +This version of \fBdepmod\fR is for kernels +2.5.48 and above. If it detects a kernel +with support for old-style modules, or the version specified is +before 2.5.48, it will attempt to run +\fBdepmod.old\fR in its place, so it is completely +transparent to the user. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2002, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe\fR(8), +\fBmodules.dep\fR(5), +\fBdepmod.old\fR(8) diff -Naur module-init-tools-3.6.orig/depmod.conf.5 module-init-tools-3.6/depmod.conf.5 --- module-init-tools-3.6.orig/depmod.conf.5 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/depmod.conf.5 2009-02-17 23:07:59.000000000 -0800 @@ -0,0 +1,64 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "DEPMOD.CONF" "5" "17 February 2009" "" "" + +.SH NAME +depmod.conf, depmod.d \- Configuration file/directory for depmod +.SH "DESCRIPTION" +.PP +The order in which modules are processed by the +\fBdepmod\fR command can be altered on a global or +per-module basis. This is typically useful in cases where built-in +kernel modules are complemented by custom built versions of the +same and the user wishes to affect the priority of processing in +order to override the module version supplied by the kernel. +.PP +The format of \fIdepmod.conf\fR and files under \fIdepmod.d\fR is simple: one +command per line, with blank lines and lines starting with # +ignored (useful for adding comments). A \\ at the end of a line +causes it to continue on the next line, which makes the file a +bit neater. +.SH "COMMANDS" +.TP +\fBsearch \fIsubdirectory...\fB \fR +This allows you to specify the order in which /lib/modules +(or other configured module location) subdirectories will +be processed by \fBdepmod\fR\&. Directories are +listed in order, with the highest priority given to the +first listed directory and the lowest to the last. The +special keyword \fBbuilt-in\fR refers to +the standard module directories installed by the kernel. + +By default, depmod will give a higher priority to +a directory with the name \fBupdates\fR +using this built-in search string: "updates built-in" +but more complex arrangements are possible and are +used in several popular distributions. +.TP +\fBoverride \fImodulename\fB \fIkernelversion\fB \fImodulesubdirectory\fB \fR +This command allows you to override which version of a +specific module will be used when more than one module +sharing the same name is processed by the +\fBdepmod\fR command. It is possible to +specify one kernel or all kernels using the * wildcard. +\fImodulesubdirectory\fR is the +name of the subdirectory under /lib/modules (or other +module location) where the target module is installed. + +For example, it is possible to override the priority of +an updated test module called \fBkmp\fR by +specifying the following command: "override kmp * extra". +This will ensure that any matching module name installed +under the \fBextra\fR subdirectory within +/lib/modules (or other module location) will take priority +over any likenamed module already provided by the kernel. +.TP +\fBinclude \fIfilename\fB \fR +Using this command, you can include other configuration +files, or whole directories, which is occasionally useful. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2006, Jon Masters, Red Hat, Inc. diff -Naur module-init-tools-3.6.orig/insmod.8 module-init-tools-3.6/insmod.8 --- module-init-tools-3.6.orig/insmod.8 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/insmod.8 2009-02-17 23:08:05.000000000 -0800 @@ -0,0 +1,43 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "INSMOD" "8" "17 February 2009" "" "" + +.SH NAME +insmod \- simple program to insert a module into the Linux Kernel +.SH SYNOPSIS + +\fBinsmod\fR [ \fB\fIfilename\fB\fR ] [ \fB\fImodule options\fB\fR\fI ...\fR ] + +.SH "DESCRIPTION" +.PP +\fBinsmod\fR is a trivial program to insert a +module into the kernel: if the +\fIfilename\fR is a hyphen, the module is +taken from standard input. Most users will want to use +\fBmodprobe\fR(8) instead, which is +cleverer. +.PP +Only the most general of error messages are reported: as the +work of trying to link the module is now done inside the kernel, +the \fBdmesg\fR usually gives more information +about errors. +.SH "BACKWARDS COMPATIBILITY" +.PP +This version of \fBinsmod\fR is for kernels +2.5.48 and above. If it detects a kernel +with support for old-style modules (for which much of the work +was done in userspace), it will attempt to run +\fBinsmod.old\fR in its place, so it is +completely transparent to the user. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2002, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe\fR(8), +\fBrmmod\fR(8), +\fBlsmod\fR(8), +\fBinsmod.old\fR(8) diff -Naur module-init-tools-3.6.orig/lsmod.8 module-init-tools-3.6/lsmod.8 --- module-init-tools-3.6.orig/lsmod.8 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/lsmod.8 2009-02-17 23:08:07.000000000 -0800 @@ -0,0 +1,32 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "LSMOD" "8" "17 February 2009" "" "" + +.SH NAME +lsmod \- program to show the status of modules in the Linux Kernel +.SH SYNOPSIS + +\fBlsmod\fR + +.SH "DESCRIPTION" +.PP +\fBlsmod\fR is a trivial program which nicely +formats the contents of the \fI/proc/modules\fR, +showing what kernel modules are currently loaded. +.SH "BACKWARDS COMPATIBILITY" +.PP +This version of \fBlsmod\fR is for kernels +2.5.48 and above. If it detects a kernel +with support for old-style modules, it will attempt to run +\fBlsmod.old\fR in its place, so it is completely +transparent to the user. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2002, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe\fR(8), +\fBlsmod.old\fR(8) diff -Naur module-init-tools-3.6.orig/modinfo.8 module-init-tools-3.6/modinfo.8 --- module-init-tools-3.6.orig/modinfo.8 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/modinfo.8 2009-02-17 23:08:16.000000000 -0800 @@ -0,0 +1,98 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "MODINFO" "8" "17 February 2009" "" "" + +.SH NAME +modinfo \- program to show information about a Linux Kernel module +.SH SYNOPSIS + +\fBmodinfo\fR [ \fB-0\fR ] [ \fB-F \fIfield\fB\fR ] [ \fB-k \fIkernel\fB\fR ] [ \fBmodulename|filename\fR\fI ...\fR ] + + +\fBmodinfo -V\fR + + +\fBmodinfo -h\fR + +.SH "DESCRIPTION" +.PP +\fBmodinfo\fR extracts information from the Linux +Kernel modules given on the command line. If the module name is +not a filename, then the +\fI/lib/modules/\fR\fIversion\fR +directory is searched, as done by +\fBmodprobe\fR(8)\&. +.PP +\fBmodinfo\fR by default lists each attribute +of the module in form \fIfieldname\fR : +\fIvalue\fR, for easy reading. The +filename is listed the same way (although it's not really an +attribute). +.PP +This version of \fBmodinfo\fR can understand +modules of any Linux Kernel architecture. +.SH "OPTIONS" +.TP +\fB-V --version \fR +Print the modinfo version. Note BACKWARDS COMPATIBILITY +below: you might be printing the version of +\fBmodinfo.old\fR\&. +.TP +\fB-F --field \fR +Only print this field value, one per line. This is most +useful for scripts. Field names are case-insenitive. +Common fields (which may not be in every module) include +author, description, +license, param, +depends, and alias\&. +There are often multiple param, +alias and depends +fields. The special field filename +lists the filename of the module. +.TP +\fB-k \fIkernel\fB \fR +Provide information about a kernel other than the running one. This +is particularly useful for distributions needing to extract +information from a newly installed (but not yet running) set of +kernel modules. For example, you wish to find which firmware files +are needed by various modules in a new kernel for which you must +make an initrd image prior to booting. +.TP +\fB-0 --null \fR +Use the ASCII zero character to separate field values, +instead of a new line. This is useful for scripts, since +a new line can theoretically appear inside a field. +.TP +\fB-a -d -l -p -n \fR +These are shortcuts for author, +description, +license\&. param and +filename respectively, to ease the +transition from the old modutils +\fBmodinfo\fR\&. +.SH "BACKWARDS COMPATIBILITY" +.PP +This version of \fBmodinfo\fR is for kernel +modules 2.5.48 and above. If it detects a +kernel with support for old-style modules, it will attempt to +run \fBmodprobe.old\fR in its place, so it is +completely transparent to the user. +.PP +Note that the output of this version of +\fBmodinfo\fR is simpler and more regular than +the older version: scripts attempting to use the default +output may get confused with complex fields. +.PP +You can force the new \fBmodinfo\fR to always +be used, by setting the NEW_MODINFO +environment variable. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2003, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe\fR(8), +\fBmodinfo.old\fR(8) diff -Naur module-init-tools-3.6.orig/modprobe.8 module-init-tools-3.6/modprobe.8 --- module-init-tools-3.6.orig/modprobe.8 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/modprobe.8 2009-02-17 23:08:13.000000000 -0800 @@ -0,0 +1,257 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "MODPROBE" "8" "17 February 2009" "" "" + +.SH NAME +modprobe \- program to add and remove modules from the Linux Kernel +.SH SYNOPSIS + +\fBmodprobe\fR [ \fB-v\fR ] [ \fB-V\fR ] [ \fB-C \fIconfig-file\fB\fR ] [ \fB-n\fR ] [ \fB-i\fR ] [ \fB-q\fR ] [ \fB-o \fImodulename\fB\fR ] [ \fB\fImodulename\fB\fR ] [ \fB\fImodule parameters\fB\fR\fI ...\fR ] + + +\fBmodprobe\fR [ \fB-r\fR ] [ \fB-v\fR ] [ \fB-n\fR ] [ \fB-i\fR ] [ \fB\fImodulename\fB\fR\fI ...\fR ] + + +\fBmodprobe\fR [ \fB-l\fR ] [ \fB-t \fIdirname\fB\fR ] [ \fB\fIwildcard\fB\fR ] + + +\fBmodprobe\fR [ \fB-c\fR ] + + +\fBmodprobe\fR [ \fB--dump-modversions\fR ] + +.SH "DESCRIPTION" +.PP +\fBmodprobe\fR intelligently adds or removes a +module from the Linux kernel: note that for convenience, there +is no difference between _ and - in module names. +\fBmodprobe\fR looks in the module directory +\fI/lib/modules/`uname -r`\fR for all +the modules and other files, except for the optional +\fI/etc/modprobe.conf\fR configuration file and +\fI/etc/modprobe.d\fR directory +(see \fBmodprobe.conf\fR(5)). \fBmodprobe\fR will also use module +options specified on the kernel command line in the form of +\&.option>\&. +.PP +Note that this version of \fBmodprobe\fR does not +do anything to the module itself: the work of resolving symbols +and understanding parameters is done inside the kernel. So +module failure is sometimes accompanied by a kernel message: see +\fBdmesg\fR(8)\&. +.PP +\fBmodprobe\fR expects an up-to-date +\fImodules.dep\fR file, as generated by +\fBdepmod\fR (see \fBdepmod\fR(8)). This file lists what other modules each +module needs (if any), and \fBmodprobe\fR uses this +to add or remove these dependencies automatically. See +\fBmodules.dep\fR(5)). +.PP +If any arguments are given after the +\fImodulename\fR, they are passed to the +kernel (in addition to any options listed in the configuration +file). +.SH "OPTIONS" +.TP +\fB-v --verbose \fR +Print messages about what the program is doing. Usually +\fBmodprobe\fR only prints messages if +something goes wrong. + +This option is passed through \fBinstall\fR +or \fBremove\fR commands to other +\fBmodprobe\fR commands in the +MODPROBE_OPTIONS environment variable. +.TP +\fB-C --config \fR +This option overrides the default configuration file +(\fI/etc/modprobe.conf\fR or +\fI/etc/modprobe.d/\fR if that isn't found). + +This option is passed through \fBinstall\fR +or \fBremove\fR commands to other +\fBmodprobe\fR commands in the +MODPROBE_OPTIONS environment variable. +.TP +\fB-c --showconfig \fR +Dump out the configuration file and exit. +.TP +\fB-n --dry-run \fR +This option does everything but actually insert or +delete the modules (or run the install or remove +commands). Combined with \fB-v\fR, it is +useful for debugging problems. +.TP +\fB-i --ignore-install --ignore-remove \fR +This option causes \fBmodprobe\fR to +ignore \fBinstall\fR and +\fBremove\fR commands in the +configuration file (if any), for the module on the +command line (any dependent modules are still subject +to commands set for them in the configuration file). +See \fBmodprobe.conf\fR(5)\&. +.TP +\fB-q --quiet \fR +Normally \fBmodprobe\fR will report an error +if you try to remove or insert a module it can't find (and +isn't an alias or +\fBinstall\fR/\fBremove\fR +command). With this flag, \fBmodprobe\fR +will simply ignore any bogus names (the kernel uses this +to opportunistically probe for modules which might exist). +.TP +\fB-r --remove \fR +This option causes \fBmodprobe\fR to remove, +rather than insert a module. If the modules it depends on +are also unused, \fBmodprobe\fR will try to +remove them, too. Unlike insertion, more than one module +can be specified on the command line (it does not make +sense to specify module parameters when removing modules). + +There is usually no reason to remove modules, but some +buggy modules require it. Your kernel may not support +removal of modules. +.TP +\fB-w --wait \fR +This option is applicable only with the -r or --remove option. +It causes modprobe to block in the kernel (within the kernel +module handling code itself) waiting for the specified modules' +reference count to reach zero. Default operation is for modprobe +to operate like rmmod, which exits with EWOULDBLOCK if the +modules reference count is non-zero. +.TP +\fB-V --version \fR +Show version of program, and exit. See below for caveats when run on older kernels. +.TP +\fB-f --force \fR +Try to strip any versioning information from the module, +which might otherwise stop it from loading: this is the +same as using both \fB--force-vermagic\fR and +\fB--force-modversion\fR\&. Naturally, these +checks are there for your protection, so using this option +is dangerous. + +This applies to any modules inserted: both the module (or +alias) on the command line, and any modules it depends on. +.TP +\fB--force-vermagic \fR +Every module contains a small string containing important +information, such as the kernel and compiler versions. If +a module fails to load and the kernel complains that the +"version magic" doesn't match, you can use this option to +remove it. Naturally, this check is there for your +protection, so this using option is dangerous. + +This applies to any modules inserted: both the module (or +alias) on the command line, and any modules it depends on. +.TP +\fB--force-modversion \fR +When modules are compiled with CONFIG_MODVERSIONS set, a +section is created detailing the versions of every +interface used by (or supplied by) the module. If a +module fails to load and the kernel complains that the +module disagrees about a version of some interface, you +can use "--force-modversion" to remove the version +information altogether. Naturally, this check is there +for your protection, so using this option is dangerous. + +This applies any modules inserted: both the module (or +alias) on the command line, and any modules it depends on. +.TP +\fB-l --list \fR +List all modules matching the given wildcard (or "*" +if no wildcard is given). This option is provided for +backwards compatibility: see +\fBfind\fR(1) and +\fBbasename\fR(1) for a more flexible alternative. +.TP +\fB-a --all \fR +Insert all module names on the command line. +.TP +\fB-t --type \fR +Restrict \fB-l\fR to modules +in directories matching the +\fIdirname\fR given. This option +is provided for backwards compatibility: see +\fBfind\fR(1) +and +\fBbasename\fR(1) or a more flexible alternative. +.TP +\fB-s --syslog \fR +This option causes any error messages to go through the +syslog mechanism (as LOG_DAEMON with level LOG_NOTICE) +rather than to standard error. This is also automatically +enabled when stderr is unavailable. + +This option is passed through \fBinstall\fR +or \fBremove\fR commands to other +\fBmodprobe\fR commands in the +MODPROBE_OPTIONS environment variable. +.TP +\fB--set-version \fR +Set the kernel version, rather than using +\fBuname\fR(2) to decide on the kernel version (which dictates where to +find the modules). This also disables backwards +compatibility checks (so +\fBmodprobe.old\fR(8) will never be run). +.TP +\fB--show-depends \fR +List the dependencies of a module (or alias), including +the module itself. This produces a (possibly empty) set +of module filenames, one per line, each starting with +"insmod". Install commands which apply are shown prefixed by +"install". It does not run any of the install commands. Note that +\fBmodinfo\fR(8) +can be used to extract dependencies of a module from the +module itself, but knows nothing of aliases or install commands. +.TP +\fB-o --name \fR +This option tries to rename the module which is being +inserted into the kernel. Some testing modules can +usefully be inserted multiple times, but the kernel +refuses to have two modules of the same name. Normally, +modules should not require multiple insertions, as that +would make them useless if there were no module support. +.TP +\fB--first-time \fR +Normally, \fBmodprobe\fR will succeed (and do +nothing) if told to insert a module which is already +present, or remove a module which isn't present. This is +backwards compatible with the modutils, and ideal for +simple scripts. However, more complicated scripts often +want to know whether \fBmodprobe\fR really +did something: this option makes modprobe fail for that +case. +.TP +\fB--dump-modversions \fR +Print out a list of module versioning information required by a +module. This option is commonly used by distributions in order to +package up a Linuxx kernel module using module versioning deps. +.TP +\fB--use-blacklist \fR +This option causes \fBmodprobe\fR to apply the +\fBblacklist\fR commands in the configuration file (if +any) to module names as well. It is usually used by \fBudev\fR(7)\&. +.SH "BACKWARDS COMPATIBILITY" +.PP +This version of \fBmodprobe\fR is for kernels +2.5.48 and above. If it detects a kernel +with support for old-style modules (for which much of the work +was done in userspace), it will attempt to run +\fBmodprobe.old\fR in its place, so it is +completely transparent to the user. +.SH "ENVIRONMENT" +.PP +The MODPROBE_OPTIONS environment variable can also be used to +pass arguments to \fBmodprobe\fR\&. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2002, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe.conf\fR(5), +\fBlsmod\fR(8), +\fBmodprobe.old\fR(8) diff -Naur module-init-tools-3.6.orig/modprobe.conf.5 module-init-tools-3.6/modprobe.conf.5 --- module-init-tools-3.6.orig/modprobe.conf.5 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/modprobe.conf.5 2009-02-17 23:07:54.000000000 -0800 @@ -0,0 +1,146 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "MODPROBE.CONF" "5" "17 February 2009" "" "" + +.SH NAME +modprobe.conf, modprobe.d \- Configuration file/directory for modprobe +.SH "DESCRIPTION" +.PP +Because the \fBmodprobe\fR command can add or +remove extra more than one module, due to module dependencies, +we need a method of specifying what options are to be used with +those modules. \fI/etc/modprobe.conf\fR (or, if that does not exist, all files under the \fI/etc/modprobe.d\fR directory) specifies +those options, as required. It can also be used to create +convenient aliases: alternate names for a module. Finally, it +can override the normal \fBmodprobe\fR behavior +altogether, for those with very special requirements (such as +inserting more than one module). +.PP +Note that module and alias names (like other module names) can +have - or _ in them: both are interchangable throughout all the +module commands. +.PP +The format of \fImodprobe.conf\fR and files under \fImodprobe.d\fR is simple: one +command per line, with blank lines and lines starting with # +ignored (useful for adding comments). A \\ at the end of a line +causes it to continue on the next line, which makes the file a +bit neater. +.PP +The syntax is a simplification of \fImodules.conf\fR, used in 2.4 kernels and earlier. +.SH "COMMANDS" +.TP +\fBalias \fIwildcard\fB \fImodulename\fB \fR +This allows you to give alternate names for a module. For +example: "alias my-mod really_long_modulename" +means you can use "modprobe my-mod" instead of "modprobe +really_long_modulename". You can also use shell-style +wildcards, so "alias my-mod* really_long_modulename" +means that "modprobe my-mod-something" has the same +effect. You can't have aliases to other aliases (that +way lies madness), but aliases can have options, which +will be added to any other options. + +Note that modules can also contain their own aliases, +which you can see using \fBmodinfo\fR\&. These +aliases are used as a last resort (ie. if there is no real +module, \fBinstall\fR, +\fBremove\fR, or \fBalias\fR +command in the configuration). +.TP +\fBoptions \fImodulename\fB \fIoption...\fB \fR +This command allows you to add options to the module +\fImodulename\fR (which might be an +alias) every time it is inserted into the kernel: whether +directly (using \fBmodprobe\fR +\fImodulename\fR, or because the +module being inserted depends on this module. + +All options are added together: they can come from an +\fBoption\fR for the module itself, for an +alias, and on the command line. +.TP +\fBinstall \fImodulename\fB \fIcommand...\fB \fR +This is the most powerful primitive in +\fImodprobe.conf\fR: it tells +\fBmodprobe\fR to run your command instead of +inserting the module in the kernel as normal. The command +can be any shell command: this allows you to do any kind +of complex processing you might wish. For example, if the +module "fred" worked better with the module "barney" +already installed (but it didn't depend on it, so +\fBmodprobe\fR won't automatically load it), +you could say "install fred /sbin/modprobe barney; +/sbin/modprobe --ignore-install fred", which would do what +you wanted. Note the \fB--ignore-install\fR, +which stops the second \fBmodprobe\fR from +re-running the same \fBinstall\fR command. +See also \fBremove\fR below. + +You can also use \fBinstall\fR to make up +modules which don't otherwise exist. For example: +"install probe-ethernet /sbin/modprobe e100 || +/sbin/modprobe eepro100", which will try first the e100 +driver, then the eepro100 driver, when you do "modprobe +probe-ethernet". + +If you use the string "$CMDLINE_OPTS" in the command, it +will be replaced by any options specified on the modprobe +command line. This can be useful because users expect +"modprobe fred opt=1" to pass the "opt=1" arg to the +module, even if there's an install command in the +configuration file. So our above example becomes "install +fred /sbin/modprobe barney; /sbin/modprobe +--ignore-install fred $CMDLINE_OPTS" +.TP +\fBremove \fImodulename\fB \fIcommand...\fB \fR +This is similar to the \fBinstall\fR command +above, except it is invoked when "modprobe -r" is run. +The removal counterparts to the two examples above would +be: "remove fred /sbin/modprobe -r --ignore-remove fred && +/sbin/modprobe -r barney", and "remove probe-ethernet +/sbin/modprobe -r eepro100 || /sbin/modprobe -r e100". +.TP +\fBinclude \fIfilename\fB \fR +Using this command, you can include other configuration +files, or whole directories, which is occasionally useful. Note that aliases in +the included file will override aliases previously +declared in the current file. +.TP +\fBblacklist \fImodulename\fB \fR +Modules can contain their own aliases: usually these are +aliases describing the devices they support, such as +"pci:123...". These "internal" aliases can be overridden +by normal "alias" keywords, but there are cases where two +or more modules both support the same devices, or a module +invalidly claims to support a device: the +\fBblacklist\fR keyword indicates that all of +that particular module's internal aliases are to be ignored. +.SH "BACKWARDS COMPATIBILITY" +.PP +There is a \fBgenerate_modprobe.conf\fR program +which should do a reasonable job of generating +\fImodprobe.conf\fR from your current (2.4 or +2.2) modules setup. +.PP +Although the syntax is similar to the older +\fI/etc/modules.conf\fR, there are many features +missing. There are two reasons for this: firstly, install and +remove commands can do just about anything, and secondly, the +module-init-tools modprobe is designed to be simple enough that +it can be easily replaced. +.PP +With the complexity of actual module insertion reduced to three +system calls (open, read, init_module), and the +\fImodules.dep\fR file being simple and open, +producing a more powerful modprobe variant can be done +independently if there is a need. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2004, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe\fR(8), +\fBmodules.dep\fR(5) diff -Naur module-init-tools-3.6.orig/modules.dep.5 module-init-tools-3.6/modules.dep.5 --- module-init-tools-3.6.orig/modules.dep.5 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/modules.dep.5 2009-02-17 23:07:56.000000000 -0800 @@ -0,0 +1,45 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "MODULES.DEP" "5" "17 February 2009" "" "" + +.SH NAME +modules.dep \- List of module dependencies +.SH "DESCRIPTION" +.PP +The \fImodules.dep\fR as generated by +module-init-tools \fBdepmod\fR, lists the +dependencies for every module in the directories under +\fI/lib/modules/\fR\fIversion\fR, +where \fImodules.dep\fR is. +.PP +Blank lines, and lines starting with a '#' (ignoring spaces) are +ignored. Other lines are of the form "filename: [filename]*", +listing the complete dependencies for the first filename in +descending order. +.PP +For example, if +\fI/lib/modules/2.5.53/kernel/a.ko\fR depended on +\fIb.ko\fR and \fIc.ko\fR in the +same directory, and \fIc.ko\fR depended on +\fIb.ko\fR as well, the file might look like: + +.nf +# This is a comment. +/lib/modules/2.5.53/kernel/a.ko: /lib/modules/2.5.53/kernel/c.ko /lib/modules/2.5.53/kernel/b.ko +/lib/modules/2.5.53/kernel/b.ko: +/lib/modules/2.5.53/kernel/c.ko: /lib/modules/2.5.53/kernel/b.ko + +.fi +.PP +This file is used by \fBmodprobe\fR to know the +order to load modules (they are loaded right to left, and +removed left to right). +.SH "COPYRIGHT" +.PP +This manual page Copyright 2002, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe\fR(8) diff -Naur module-init-tools-3.6.orig/rmmod.8 module-init-tools-3.6/rmmod.8 --- module-init-tools-3.6.orig/rmmod.8 1969-12-31 16:00:00.000000000 -0800 +++ module-init-tools-3.6/rmmod.8 2009-02-17 23:08:10.000000000 -0800 @@ -0,0 +1,64 @@ +.\" This manpage has been automatically generated by docbook2man +.\" from a DocBook document. This tool can be found at: +.\" +.\" Please send any bug reports, improvements, comments, patches, +.\" etc. to Steve Cheng . +.TH "RMMOD" "8" "17 February 2009" "" "" + +.SH NAME +rmmod \- simple program to remove a module from the Linux Kernel +.SH SYNOPSIS + +\fBrmmod\fR [ \fB-f\fR ] [ \fB-w\fR ] [ \fB-s\fR ] [ \fB-v\fR ] [ \fB\fImodulename\fB\fR ] + +.SH "DESCRIPTION" +.PP +\fBrmmod\fR is a trivial program to remove a +module from the kernel. Most users will want to use +\fBmodprobe\fR(8) instead, with the \fB-r\fR option. +.SH "OPTIONS" +.TP +\fB-v --verbose \fR +Print messages about what the program is doing. +Usually \fBrmmod\fR only prints messages +if something goes wrong. +.TP +\fB-f --force \fR +This option can be extremely dangerous: it has no effect unless +CONFIG_MODULE_FORCE_UNLOAD was set when the kernel was +compiled. With this option, you can remove modules which are +being used, or which are not designed to be removed, or have +been marked as unsafe (see \fBlsmod\fR(8)). +.TP +\fB-w --wait \fR +Normally, \fBrmmod\fR will refuse to +unload modules which are in use. With this option, +\fBrmmod\fR will isolate the module, and +wait until the module is no longer used. Noone new +will be able to use the module, but it's up to you to +make sure the current users eventually finish with it. +See \fBlsmod\fR(8)) for information on usage counts. +.TP +\fB-s --syslog \fR +Send errors to the syslog, instead of standard error. +.TP +\fB-V --version \fR +Show version of program, and exit. See below for caveats +when run on older kernels. +.SH "BACKWARDS COMPATIBILITY" +.PP +This version of \fBrmmod\fR is for kernels +2.5.48 and above. If it detects a kernel +with support for old-style modules (for which much of the work +was done in userspace), it will attempt to run +\fBrmmod.old\fR in its place, so it is completely +transparent to the user. +.SH "COPYRIGHT" +.PP +This manual page Copyright 2002, Rusty Russell, IBM Corporation. +.SH "SEE ALSO" +.PP +\fBmodprobe\fR(8), +\fBinsmod\fR(8), +\fBlsmod\fR(8), +\fBrmmod.old\fR(8)