/usr/share/doc/debian-kernel-handbook/kernel-handbook.html/ch-modules.html is in debian-kernel-handbook 1.0.15.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Debian Linux Kernel Handbook - Managing the kernel modules</title>
<link href="index.html" rel="start">
<link href="ch-versions.html" rel="prev">
<link href="ch-initramfs.html" rel="next">
<link href="index.html#contents" rel="contents">
<link href="index.html#copyright" rel="copyright">
<link href="ch-scope.html" rel="chapter" title="1 About this handbook">
<link href="ch-source.html" rel="chapter" title="2 Debian kernel source">
<link href="ch-packaging.html" rel="chapter" title="3 Debian kernel packages">
<link href="ch-common-tasks.html" rel="chapter" title="4 Common kernel-related tasks">
<link href="ch-versions.html" rel="chapter" title="5 Version numbers and ABIs">
<link href="ch-modules.html" rel="chapter" title="6 Managing the kernel modules">
<link href="ch-initramfs.html" rel="chapter" title="7 Managing the initial ramfs (initramfs) archive">
<link href="ch-update-hooks.html" rel="chapter" title="8 Package maintainer scripts and hooks">
<link href="ch-bugs.html" rel="chapter" title="9 Reporting and handling bugs">
<link href="ch-scope.html#s1.1" rel="section" title="1.1 Scope">
<link href="ch-scope.html#s-authors" rel="section" title="1.2 Authors and Contributors">
<link href="ch-source.html#s-changes" rel="section" title="2.1 Changes to the pristine kernel source">
<link href="ch-source.html#s-patches" rel="section" title="2.2 Debian kernel patches">
<link href="ch-source.html#s-acceptance" rel="section" title="2.3 Policy for patch acceptance">
<link href="ch-packaging.html#s-source-pkg" rel="section" title="3.1 Source package">
<link href="ch-packaging.html#s-arch-indep" rel="section" title="3.2 Architecture-independent packages">
<link href="ch-packaging.html#s-arch-dep" rel="section" title="3.3 Architecture-dependent packages">
<link href="ch-common-tasks.html#s-common-getting" rel="section" title="4.1 Obtaining the Debian kernel source">
<link href="ch-common-tasks.html#s-common-official" rel="section" title="4.2 Rebuilding official Debian kernel packages">
<link href="ch-common-tasks.html#s-common-official-vcs" rel="section" title="4.3 Building a development version of the Debian kernel package">
<link href="ch-common-tasks.html#s-gen-orig" rel="section" title="4.4 Generating orig tarball from newer upstream">
<link href="ch-common-tasks.html#s-common-building" rel="section" title="4.5 Building a custom kernel from Debian kernel source">
<link href="ch-common-tasks.html#s-kernel-org-package" rel="section" title="4.6 Building a custom kernel from the "pristine" kernel source">
<link href="ch-common-tasks.html#s-common-out-of-tree" rel="section" title="4.7 Building out-of-tree kernel modules">
<link href="ch-versions.html#s-version-types" rel="section" title="5.1 The different types of version">
<link href="ch-versions.html#s-abi" rel="section" title="5.2 The kernel ABI">
<link href="ch-initramfs.html#s-initramfs-gen-tools" rel="section" title="7.1 Initramfs generation tools">
<link href="ch-initramfs.html#s-initramfs-regen" rel="section" title="7.2 Regenerating the initramfs">
<link href="ch-initramfs.html#s-initramfs-exam" rel="section" title="7.3 Examining the initramfs contents">
<link href="ch-update-hooks.html#s-kernel-hooks" rel="section" title="8.1 Kernel hooks">
<link href="ch-update-hooks.html#s-kernel-hooks-loader" rel="section" title="8.2 Kernel hooks required for boot loaders">
<link href="ch-update-hooks.html#s-initramfs-hooks" rel="section" title="8.3 Initramfs hooks">
<link href="ch-update-hooks.html#s-kernel-hooks-initramfs" rel="section" title="8.4 Kernel hooks required for initramfs builders">
<link href="ch-update-hooks.html#s-loader-optimisation" rel="section" title="8.5 Optimising boot loader updates">
<link href="ch-update-hooks.html#s-deprecation" rel="section" title="8.6 Deprecated features">
<link href="ch-update-hooks.html#s-init-config" rel="section" title="8.7 Initial configuration by the installer">
<link href="ch-bugs.html#s9.1" rel="section" title="9.1 Bug handling policy for the kernel team">
<link href="ch-bugs.html#s9.2" rel="section" title="9.2 Filing a bug against a kernel package">
<link href="ch-common-tasks.html#s4.2.1" rel="subsection" title="4.2.1 Preparation">
<link href="ch-common-tasks.html#s-common-size" rel="subsection" title="4.2.1.1 Disk space requirements">
<link href="ch-common-tasks.html#s4.2.2" rel="subsection" title="4.2.2 Simple patching and building">
<link href="ch-common-tasks.html#s4.2.3" rel="subsection" title="4.2.3 Applying patches or configuration changes">
<link href="ch-common-tasks.html#s4.2.4" rel="subsection" title="4.2.4 Building many packages">
<link href="ch-common-tasks.html#s4.2.5" rel="subsection" title="4.2.5 Building packages for one flavour">
<link href="ch-versions.html#s-abi-name" rel="subsection" title="5.2.1 The ABI name">
<link href="ch-versions.html#s-abi-maintenance" rel="subsection" title="5.2.2 Maintaining and updating the ABI">
<link href="ch-bugs.html#s9.1.1" rel="subsection" title="9.1.1 Required information">
<link href="ch-bugs.html#s9.1.2" rel="subsection" title="9.1.2 Severities">
<link href="ch-bugs.html#s9.1.3" rel="subsection" title="9.1.3 Tagging">
<link href="ch-bugs.html#s9.1.4" rel="subsection" title="9.1.4 Analysis by maintainers">
<link href="ch-bugs.html#s9.1.5" rel="subsection" title="9.1.5 Testing by submitter">
<link href="ch-bugs.html#s9.1.6" rel="subsection" title="9.1.6 Keeping bugs separate">
<link href="ch-bugs.html#s9.1.7" rel="subsection" title="9.1.7 Applying patches">
<link href="ch-bugs.html#s9.1.8" rel="subsection" title="9.1.8 Talking to submitters">
<link href="ch-bugs.html#s9.2.1" rel="subsection" title="9.2.1 Bisecting (finding the upstream version that introduced a bug)">
</head>
<body>
<p><a name="ch-modules"></a></p>
<hr>
<p>
[ <a href="ch-versions.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch-scope.html">1</a> ]
[ <a href="ch-source.html">2</a> ]
[ <a href="ch-packaging.html">3</a> ]
[ <a href="ch-common-tasks.html">4</a> ]
[ <a href="ch-versions.html">5</a> ]
[ 6 ]
[ <a href="ch-initramfs.html">7</a> ]
[ <a href="ch-update-hooks.html">8</a> ]
[ <a href="ch-bugs.html">9</a> ]
[ <a href="ch-initramfs.html">next</a> ]
</p>
<hr>
<h1>
Debian Linux Kernel Handbook
<br>Chapter 6 - Managing the kernel modules
</h1>
<hr>
<p>
Linux device drivers come in the form of kernel modules - object files which
may be loaded into the running kernel to extend its functionality. The list of
currently loaded kernel modules can be obtained using the <samp>lsmod</samp>
command, modules may be loaded using <samp>modprobe</samp>, and removed using
<samp>modprobe -r</samp>. The <samp>depmod</samp> command may be used to
regenerate the list of available modules (after installation of the new
modules, for example), even though it is pretty unlikely that you will ever
need to invoke it by hand.
</p>
<p>
Normally, the devices are detected and neccessary kernel modules are loaded by
<samp>udev</samp> during boot time. Occasionally, one may need finer control
over the loading of kernel modules, for example to pass the additional
parameters to the module, force loading of some modules on startup, or prevent
certain module(s) from being loaded.
</p>
<p>
If some modules are not loaded automatically by <samp>udev</samp>, but you
would like them to be loaded during boot, it is possible to force it by listing
the names of the modules in <samp>/etc/modules</samp>. This will be scanned
for the names of the modules (one name per line), which will then be loaded
using <samp>modprobe</samp>. You can also specify the arguments for the
modules. For example, a typical <samp>/etc/modules</samp> might look like that
</p>
<pre>
loop max_int=32
sbp2
</pre>
<p>
To find out what parameters are accepted by a given module, you can use the
<samp>modinfo</samp> command, for example:
</p>
<pre>
# modinfo loop
filename: /lib/modules/3.2.0-2-686-pae/kernel/drivers/block/loop.ko
alias: devname:loop-control
alias: char-major-10-237
alias: block-major-7-*
license: GPL
depends:
intree: Y
vermagic: 3.2.0-2-686-pae SMP mod_unload modversions 686
parm: max_loop:Maximum number of loop devices (int)
parm: max_part:Maximum number of partitions per loop device (int)
</pre>
<p>
To add custom arguments to the modules loaded by <samp>udev</samp> early in the
boot process, you need to create a custom configuration file for
<samp>modprobe</samp>, which <samp>udev</samp> uses to load the modules. For
example, to pass an <samp>atapi_enabled=1</samp> argument to the
<samp>libata</samp> kernel module, create <samp>/etc/modprobe.d/local</samp>
file with a following line:
</p>
<pre>
options libata atapi_enabled=1
</pre>
<p>
You can choose arbitrary names for the configuration files in
<samp>/etc/modprobe.d</samp> and put multiple <samp>options</samp> lines in the
same file.
</p>
<p>
Sometimes two different modules claim support for the same device, usually
because two slightly different versions of the device exist, requiring
different kernel modules to operate. In such situation <samp>udev</samp> loads
both kernel modules, with unpredictable results. To avoid this problem, you
can prevent any module (let's say, <samp>tulip</samp>) from loading by creating
an arbitrarily named file, containing a line
</p>
<pre>
blacklist tulip
</pre>
<p>
in <samp>/etc/modprobe.d</samp> directory. See the <samp>modprobe</samp>
manual page (<samp>man modprobe</samp>) for much more information on
configuring and using modprobe.
</p>
<hr>
<p>
[ <a href="ch-versions.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ <a href="ch-scope.html">1</a> ]
[ <a href="ch-source.html">2</a> ]
[ <a href="ch-packaging.html">3</a> ]
[ <a href="ch-common-tasks.html">4</a> ]
[ <a href="ch-versions.html">5</a> ]
[ 6 ]
[ <a href="ch-initramfs.html">7</a> ]
[ <a href="ch-update-hooks.html">8</a> ]
[ <a href="ch-bugs.html">9</a> ]
[ <a href="ch-initramfs.html">next</a> ]
</p>
<hr>
<p>
Debian Linux Kernel Handbook
</p>
<address>
version 1.0.15, Fri Aug 17 02:10:28 BST 2012<br>
<br>
<a href="ch-scope.html#s-authors">The Debian Kernel Handbook Project</a><br>
<br>
</address>
<hr>
</body>
</html>
|