[deployment-guide/comm-rel: 287/727] Changed the organization of the chapter a bit.
Jaromir Hradilek
jhradile at fedoraproject.org
Tue Oct 19 12:48:43 UTC 2010
commit 6f3940282918f96dfb359c3f4dd7c8a65c44635c
Author: Jaromir Hradilek <jhradile at redhat.com>
Date: Mon Aug 9 15:38:49 2010 +0200
Changed the organization of the chapter a bit.
en-US/Working_with_Kernel_Modules.xml | 172 ++++++++++++++++++--------------
1 files changed, 97 insertions(+), 75 deletions(-)
---
diff --git a/en-US/Working_with_Kernel_Modules.xml b/en-US/Working_with_Kernel_Modules.xml
index 9c50d0c..c3a69ed 100644
--- a/en-US/Working_with_Kernel_Modules.xml
+++ b/en-US/Working_with_Kernel_Modules.xml
@@ -37,29 +37,38 @@
<primary>kernel module</primary>
<secondary>utilities</secondary>
</indexterm>
- <para>A group of commands for managing kernel modules is available if the <filename>module-init-tools</filename>
- <indexterm>
- <primary>kernel module</primary>
- <secondary>commands</secondary>
- <tertiary>group of</tertiary>
- </indexterm>
- <indexterm>
- <primary>kernel module</primary>
- <secondary>module-init-tools</secondary>
- </indexterm> package is installed. Use these commands to determine if a module has been loaded successfully or when trying different modules for a piece of new hardware.</para>
- <indexterm
- significance="normal">
- <primary>
- <command>lsmod</command>
- </primary>
+ <note>
+ <title>Note: Make Sure You Have <package>module-init-tools</package> Installed</title>
+ <para>
+ To use utilities described in this section, you must have the <package>module-init-tools</package> package installed. Refer to <xref linkend="sec-Installing" /> for more information on how to install new packages in &MAJOROS;.
+ </para>
+ </note>
+ <indexterm>
+ <primary>kernel module</primary>
+ <secondary>commands</secondary>
+ <tertiary>group of</tertiary>
</indexterm>
- <indexterm
- significance="normal">
+ <indexterm>
<primary>kernel module</primary>
- <secondary>listing</secondary>
+ <secondary>module-init-tools</secondary>
</indexterm>
- <para>The command <command>/sbin/lsmod</command> displays a list of currently loaded modules. For example:</para>
- <screen>
+ <para>To determine of a module has been loaded successfully, or when trying different modules for a piece of new hardware, you can use the following utilities.</para>
+ <section
+ id="s2-kernel-module-utils-lsmod">
+ <title>Listing Currently Loaded Modules</title>
+ <indexterm
+ significance="normal">
+ <primary>
+ <command>lsmod</command>
+ </primary>
+ </indexterm>
+ <indexterm
+ significance="normal">
+ <primary>kernel module</primary>
+ <secondary>listing</secondary>
+ </indexterm>
+ <para>The command <command>/sbin/lsmod</command> displays a list of currently loaded modules. For example:</para>
+ <screen>
~]$ <command>/sbin/lsmod</command>
Module Size Used by
autofs4 25618 3
@@ -103,66 +112,79 @@ virtio_ring 6026 1 virtio_pci
virtio 4864 4 virtio_net,virtio_balloon,virtio_blk,virtio_pci
ata_piix 22532 0
dm_mod 73839 8 dm_mirror,dm_log</screen>
- <para>The first column lists the names of modules; the second column lists the sizes of the modules, and the third column lists the use counts. The output from the <command>/sbin/lsmod</command> command is less verbose and easier to read than the output of <filename>cat /proc/modules</filename>.</para>
- <indexterm
- significance="normal">
- <primary>
- <command>modprobe</command>
- </primary>
- </indexterm>
- <indexterm
- significance="normal">
- <primary>kernel module</primary>
- <secondary>loading</secondary>
- </indexterm>
- <para>To load a kernel module, use the <command>/sbin/modprobe</command> command followed by the kernel module name. By default, <command>modprobe</command> attempts to load the module from the <filename>/lib/modules/<replaceable><kernel-version></replaceable>/kernel/drivers/</filename> subdirectories. There is a subdirectory for each type of module, such as the <filename>net/</filename> subdirectory for network interface drivers. Some kernel modules have module dependencies, meaning that other modules must be loaded first for it to load. The <command>/sbin/modprobe</command> command checks for these dependencies and loads the module dependencies before loading the specified module.</para>
- <para>For example, the command:</para>
- <screen>~]# <command>/sbin/modprobe e100</command>
- </screen>
- <para>…first loads all module dependencies of the <systemitem
- class="resource">e100</systemitem>
- module before loading the <systemitem
- class="resource">e100</systemitem>
- module itself.</para>
- <para>To print to the screen all commands as <command>/sbin/modprobe</command> executes them, use the <option>-v</option> option. For example:</para>
- <screen>~]# <command>/sbin/modprobe -v e100</command>
- </screen>
- <para>Output similar to the following is displayed:</para>
- <screen>
+ <para>The first column lists the names of modules; the second column lists the sizes of the modules, and the third column lists the use counts. The output from the <command>/sbin/lsmod</command> command is less verbose and easier to read than the output of <filename>cat /proc/modules</filename>.</para>
+ </section>
+ <section
+ id="s2-kernel-module-utils-modprobe">
+ <title>Loading a Module</title>
+ <indexterm
+ significance="normal">
+ <primary>
+ <command>modprobe</command>
+ </primary>
+ </indexterm>
+ <indexterm
+ significance="normal">
+ <primary>kernel module</primary>
+ <secondary>loading</secondary>
+ </indexterm>
+ <para>To load a kernel module, use the <command>/sbin/modprobe</command> command followed by the kernel module name. By default, <command>modprobe</command> attempts to load the module from the <filename>/lib/modules/<replaceable><kernel-version></replaceable>/kernel/drivers/</filename> subdirectories. There is a subdirectory for each type of module, such as the <filename>net/</filename> subdirectory for network interface drivers. Some kernel modules have module dependencies, meaning that other modules must be loaded first for it to load. The <command>/sbin/modprobe</command> command checks for these dependencies and loads the module dependencies before loading the specified module.</para>
+ <para>For example, the command:</para>
+ <screen>~]# <command>/sbin/modprobe e100</command>
+ </screen>
+ <para>…first loads all module dependencies of the <systemitem
+ class="resource">e100</systemitem>
+ module before loading the <systemitem
+ class="resource">e100</systemitem>
+ module itself.</para>
+ <para>To print to the screen all commands as <command>/sbin/modprobe</command> executes them, use the <option>-v</option> option. For example:</para>
+ <screen>~]# <command>/sbin/modprobe -v e100</command>
+ </screen>
+ <para>Output similar to the following is displayed:</para>
+ <screen>
/sbin/insmod /lib/modules/2.6.33-5.EL/kernel/drivers/net/e100.ko
Using /lib/modules/2.6.33-5.EL/kernel/drivers/net/e100.ko
Symbol version prefix 'smp_'
</screen>
- <indexterm
- significance="normal">
- <primary>
- <command>insmod</command>
- </primary>
- </indexterm>
- <para>The <command>/sbin/insmod</command> command can also be used to load kernel modules; however, it does not resolve dependencies. You should thus always use <command>/sbin/modprobe</command> instead of the <command>insmod</command> command to load kernel modules.</para>
- <indexterm
- significance="normal">
- <primary>
- <command>rmmod</command>
- </primary>
- </indexterm>
- <indexterm
- significance="normal">
- <primary>kernel module</primary>
- <secondary>unload</secondary>
- </indexterm>
- <para>To unload kernel modules, use the <command>/sbin/rmmod</command> command followed by the module name. The <command>rmmod</command> utility only unloads modules that are not in use and that are not a dependency of other modules in use.</para>
- <para>For example, the command:</para>
- <screen>~]# <command>/sbin/rmmod e100</command>
- </screen>
- <para>…unloads the <systemitem
+ <indexterm
+ significance="normal">
+ <primary>
+ <command>insmod</command>
+ </primary>
+ </indexterm>
+ <para>The <command>/sbin/insmod</command> command can also be used to load kernel modules; however, it does not resolve dependencies. You should thus always use <command>/sbin/modprobe</command> instead of the <command>insmod</command> command to load kernel modules.</para>
+ </section>
+ <section
+ id="s2-kernel-module-utils-rmmod">
+ <title>Unloading a Module</title>
+ <indexterm
+ significance="normal">
+ <primary>
+ <command>rmmod</command>
+ </primary>
+ </indexterm>
+ <indexterm
+ significance="normal">
+ <primary>kernel module</primary>
+ <secondary>unload</secondary>
+ </indexterm>
+ <para>To unload kernel modules, use the <command>/sbin/rmmod</command> command followed by the module name. The <command>rmmod</command> utility only unloads modules that are not in use and that are not a dependency of other modules in use.</para>
+ <para>For example, the command:</para>
+ <screen>~]# <command>/sbin/rmmod e100</command>
+ </screen>
+ <para>…unloads the <systemitem
class="resource">e100</systemitem> kernel module.</para>
- <para>Another useful kernel module utility is <command>modinfo</command>. Use the command <command>/sbin/modinfo</command> to display information about a kernel module. The general syntax is:</para>
- <screen>~]# <command>/sbin/modinfo <replaceable><optional>options</optional>
- </replaceable> <replaceable><kernel_module_name></replaceable>
- </command>
- </screen>
- <para>Options include <option>-d</option>, which displays a brief description of the module, and <option>-p</option>, which lists the parameters the module supports. The <command>modinfo</command> command is useful for listing information such as version, dependencies, paramater options, and aliases of modules.For a complete list of options, refer to the <command>modinfo</command> man page.</para>
+ </section>
+ <section
+ id="s2-kernel-module-utils-modinfo">
+ <title>Displaying Module Information</title>
+ <para>Another useful kernel module utility is <command>modinfo</command>. Use the command <command>/sbin/modinfo</command> to display information about a kernel module. The general syntax is:</para>
+ <screen>~]# <command>/sbin/modinfo <replaceable><optional>options</optional>
+ </replaceable> <replaceable><kernel_module_name></replaceable>
+ </command>
+ </screen>
+ <para>Options include <option>-d</option>, which displays a brief description of the module, and <option>-p</option>, which lists the parameters the module supports. The <command>modinfo</command> command is useful for listing information such as version, dependencies, paramater options, and aliases of modules.For a complete list of options, refer to the <command>modinfo</command> man page.</para>
+ </section>
</section>
<section
id="s1-kernel-modules-persistant">
More information about the docs-commits
mailing list