From c3a4119beb0d5548f1f7957a3f1571b41dcb1147 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 18 Feb 2011 09:07:51 +0100
Subject: [PATCH] dracut-rhel6.xml: update

---
 dracut-rhel6.xml | 172 ++++++++++++-------------------------------------------
 1 file changed, 36 insertions(+), 136 deletions(-)

diff --git a/dracut-rhel6.xml b/dracut-rhel6.xml
index f347439..612416b 100644
--- a/dracut-rhel6.xml
+++ b/dracut-rhel6.xml
@@ -5,12 +5,6 @@
       <imageobject>
         <imagedata valign="middle" fileref="dracut.png" format="PNG"/>
       </imageobject>
-      <imageobject>
-        <imagedata valign="middle" fileref="dracut.svg" format="SVG"/>
-      </imageobject>
-      <imageobject>
-        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dracut.svg" encoding="UTF-8" parse="xml"/>
-      </imageobject>
     </inlinemediaobject>dracut</title>
   <bookinfo>
     <author>
@@ -23,124 +17,11 @@
       <year>2010</year>
       <holder>Harald Hoyer</holder>
     </copyright>
-    <legalnotice>
-      <para>
- This work is licensed under the Creative Commons Attribution/Share-Alike License. To view a copy of this license, visit <ulink url="http://creativecommons.org/licenses/by-sa/3.0/">http://creativecommons.org/licenses/by-sa/3.0/</ulink> or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
-      </para>
-    </legalnotice>
   </bookinfo>
   <toc/>
   <chapter>
-    <chapterinfo>
-      <legalnotice>
-        <para>
-   This section is a modified version of <ulink url="http://en.wikipedia.org/wiki/Initrd">http://en.wikipedia.org/wiki/Initrd</ulink>, which is licensed under the Creative Commons Attribution/Share-Alike License.
- </para>
-      </legalnotice>
-    </chapterinfo>
-    <title>Introduction</title>
-    <section>
-      <title>Definition</title>
-      <para>An <emphasis>initial ramdisk</emphasis> is a temporary file system used in the boot process of the Linux kernel.  <emphasis>initrd</emphasis> and <emphasis>initramfs</emphasis> refer to slightly different schemes for loading this file system into memory.  Both are commonly used to make preparations before the real root file system can be mounted.</para>
-    </section>
-    <section>
-      <title>Rationale </title>
-      <para>Many Linux distributions ship a single, generic kernel image that is intended to boot as wide a variety of hardware as possible.  The device drivers for this generic kernel image are included as loadable modules, as it is not possible to statically compile them all into the one kernel without making it too large to boot from computers with limited memory or from lower-capacity media like floppy disks.
-      </para>
-      <para>This then raises the problem of detecting and loading the modules necessary to mount the root file system at boot time (or, for that matter, deducing where or what the root file system is).
-      </para>
-      <para>To further complicate matters, the root file system may be on a software <acronym>RAID</acronym> volume, <acronym>LVM</acronym>, <acronym>NFS</acronym> (on diskless workstations), or on an encrypted partition.  All of these require special preparations to mount.
-      </para>
-      <para>Another complication is kernel support for hibernation, which suspends the computer to disk by dumping an image of the entire system to a swap partition or a regular file, then powering off.  On next boot, this image has to be made accessible before it can be loaded back into memory. </para>
-      <para>To avoid having to hardcode handling for so many special cases into the kernel, an initial boot stage with a temporary root file system—now dubbed early user space—is used.  This root file system would contain user-space helpers that would do the hardware detection, module loading and device discovery necessary to get the real root file system mounted.
-      </para>
-    </section>
-    <section>
-      <title>Implementation </title>
-      <para>An image of this initial root file system (along with the kernel image) must be stored somewhere accessible by the Linux bootloader or the boot firmware of the computer.  This can be: </para>
-      <itemizedlist>
-        <listitem>
-          <para>The root file system itself </para>
-        </listitem>
-        <listitem>
-          <para>A boot image on an optical disc
-   </para>
-        </listitem>
-        <listitem>
-          <para>A small ext2/ext3 or <acronym>FAT</acronym>-formatted partition on a local disk (a <emphasis>boot partition</emphasis>)</para>
-        </listitem>
-        <listitem>
-          <para>A <acronym>TFTP</acronym> server (on systems that can boot from Ethernet) </para>
-        </listitem>
-      </itemizedlist>
-      <para>The bootloader will load the kernel and initial root file system image into memory and then start the kernel, passing in the memory address of the image. 
-      </para>
-      <para>Depending on which algorithms were compiled statically into it, the kernel can currently unpack initrd/initramfs images compressed with gzip, bzip2 and <acronym>LZMA</acronym>. </para>
-    </section>
-    <section>
-      <title>Mount preparations </title>
-      <para>dracut can generate a customized initrams image which contains only whatever is necessary to boot some particular computer, such as <acronym>ATA</acronym>, <acronym>SCSI</acronym> and filesystem kernel modules (host-only mode).</para>
-      <para>dracut can also generate a more generic initramfs image (default mode).  </para>
-      <para>dracut&apos;s initramfs starts only with the device name of the root file system (or its <acronym>UUID</acronym>) and must discover everything else at boot time.  A complex cascade of tasks must be performed to get the root file system mounted: </para>
-      <itemizedlist>
-        <listitem>
-          <para>Any hardware drivers that the boot process depends on must be loaded.  All kernel modules for common storage devices are packed onto the initramfs and then udev pulls in modules matching the computer&apos;s detected hardware. </para>
-        </listitem>
-        <listitem>
-          <para>On systems which display a boot rd_NO_SPLASH screen, the video hardware must be initialized and a user-space helper started to paint animations onto the display in lockstep with the boot process. </para>
-        </listitem>
-        <listitem>
-          <para>If the root file system is on NFS, dracut does  then: <itemizedlist>
-              <listitem>
-                <para>Bring up the primary network interface. </para>
-              </listitem>
-              <listitem>
-                <para>Invoke a DHCP client, with which it can obtain a DHCP lease. </para>
-              </listitem>
-              <listitem>
-                <para>Extract the name of the NFS share and the address of the NFS server from the lease. </para>
-              </listitem>
-              <listitem>
-                <para>Mount the <acronym>NFS</acronym> share. </para>
-              </listitem>
-            </itemizedlist></para>
-        </listitem>
-        <listitem>
-          <para>If the root file system appears to be on a software <acronym>RAID</acronym> device, there is no way of knowing which devices the <acronym>RAID</acronym> volume spans; the standard <acronym>MD</acronym> utilities must be invoked to scan all available block devices with a raid signature and bring the required ones online. </para>
-        </listitem>
-        <listitem>
-          <para>If the root file system appears to be on a logical volume, the <acronym>LVM</acronym> utilities must be invoked to scan for and activate the volume group containing it. </para>
-        </listitem>
-        <listitem>
-          <para>If the root file system is on an encrypted block device: <itemizedlist>
-              <listitem>
-                <para>Invoke a helper script to prompt the user to type in a passphrase and/or insert a hardware token (such as a smart card or a <acronym>USB</acronym> security dongle). </para>
-              </listitem>
-              <listitem>
-                <para>Create a decryption target with the device mapper. </para>
-              </listitem>
-            </itemizedlist></para>
-        </listitem>
-      </itemizedlist>
-      <para>dracut uses udev, an event-driven hotplug agent, which invokes helper programs as hardware devices, disk partitions and storage volumes matching certain rules come online.  This allows discovery to run in parallel, and to progressively cascade into arbitrary nestings of <acronym>LVM</acronym>, <acronym>RAID</acronym> or encryption to get at the root file system. </para>
-      <para>When the root file system finally becomes visible: <itemizedlist>
-          <listitem>
-            <para>Any maintenance tasks which cannot run on a mounted root file system are done.  </para>
-          </listitem>
-          <listitem>
-            <para>The root file system is mounted read-only. </para>
-          </listitem>
-          <listitem>
-            <para>Any processes which must continue running (such as the rd_NO_SPLASH screen helper and its command <acronym>FIFO</acronym>) are hoisted into the newly-mounted root file system. </para>
-          </listitem>
-        </itemizedlist></para>
-      <para>The final root file system cannot simply be mounted over /, since that would make the scripts and tools on the initial root file system inaccessible for any final cleanup tasks. On an initramfs, the initial root file system cannot be rotated away. Instead, it is simply emptied and the final root file system mounted over the top.
-      </para>
-    </section>
-  </chapter>
-  <chapter>
     <title>User Manual</title>
-    <section>
+    <section id="create_image">
       <title>Creating an initramfs Image</title>
       <para>To create a initramfs image, the most simple command is:</para>
       <screen># dracut</screen>
@@ -154,7 +35,7 @@
       <para>A shortcut to generate the image at the default location for a specific kernel version is:</para>
       <screen># dracut &apos;&apos; 2.6.40-1.rc5.f20</screen>
       <para>If you want to create lighter, smaller initramfs images, you may want to specify the <option>--host-only</option> or  <option>-H</option> option. Using this option, the resulting image will contain only those dracut modules, kernel modules and filesystems, which are needed to boot this specific machine. This has the drawback, that you can&apos;t put the disk on another controller or machine, and that you can&apos;t switch to another root filesystem, without recreating the initramfs image. The usage of the <option>--host-only</option> option is only for experts and you will have to keep the broken pieces. At least keep a copy of a general purpose image (and corresponding kernel) as a fallback to rescue your system.</para>
-      <section>
+      <section id="lsinitrd">
         <title>Inspecting the Contents</title>
         <para>To see the contents of the image created by dracut, you can use the <command>lsinitrd</command> tool.</para>
         <screen># lsinitrd /boot/initramfs-$(uname -r).img | less</screen>
@@ -162,31 +43,46 @@
         <screen># lsinitrd /boot/initramfs-$(uname -r).img  /etc/ld.so.conf
  include ld.so.conf.d/*.conf</screen>
       </section>
-      <section>
+      <section id="add_dracut_modules">
         <title>Adding dracut Modules</title>
         <para>Some dracut modules are turned off by default and have to be activated manually. You can do this by adding the dracut modules to the configuration file <filename>/etc/dracut.conf</filename> or <filename>/etc/dracut.conf.d/myconf.conf</filename>. See the man page <xref linkend="dracutconf5"/>. You can also add dracut modules on the command line by using the <option>-a</option> or <option>--add</option> option:</para>
         <screen># dracut --add bootchart initramfs-bootchart.img</screen>
         <para>To see a list of available dracut modules, issue the command:</para>
         <screen># for mod in /usr/share/dracut/modules.d/*; do echo ${mod##*/??}; done</screen>
       </section>
-      <section>
+      <section id="omit_dracut_modules">
         <title>Omitting dracut Modules</title>
         <para>Sometimes you don&apos;t want a dracut module to be included for reasons of speed, size or functionality. To do this, either specify the <envar>omit_dracutmodules</envar> variable in  the <filename>dracut.conf</filename> or <filename>/etc/dracut.conf.d/myconf.conf</filename> configuration file (see man page <xref linkend="dracutconf5"/>), or use the <option>-o</option> or <option>--omit</option> option on the command line:</para>
         <screen># dracut -o &quot;multipath lvm&quot; no-multipath-lvm.img</screen>
       </section>
-      <section>
+      <section id="add_kernel_modules">
         <title>Adding Kernel Modules</title>
         <para>If you need a special kernel module in the initramfs, which is not automatically picked up by dracut, you have the use the <option>--add-drivers</option> option on the command line or  the drivers vaiable in  the <filename>/etc/dracut.conf</filename> or <filename>/etc/dracut.conf.d/myconf.conf</filename> configuration file (see man page <xref linkend="dracutconf5"/>):</para>
         <screen># dracut --add-drivers mymod initramfs-with-mymod.img</screen>
+        <para>dracut searches for kernel modules in </para>
+        <itemizedlist>
+          <listitem>
+            <para><filename>/lib/modules/&lt;kernel version&gt;/kernel/drivers</filename></para>
+          </listitem>
+          <listitem>
+            <para><filename>/lib/modules/&lt;kernel version&gt;/updates</filename></para>
+          </listitem>
+          <listitem>
+            <para><filename>/lib/modules/&lt;kernel version&gt;/extra</filename></para>
+          </listitem>
+          <listitem>
+            <para><filename>/lib/modules/&lt;kernel version&gt;/weak-updates</filename></para>
+          </listitem>
+        </itemizedlist>
       </section>
     </section>
-    <section>
+    <section id="boot_parameters">
       <title>Boot parameters</title>
       <para>The generated initramfs.img file normally does not contain any system configuration files (except for some special exceptions), so the configuration has to be done on the kernel command line. With this flexibility, you can easily boot from a changed root partition, without the need to recompile the initramfs image. So, you could completly change your root partition (move it inside a md raid with encryption and LVM on top), as long as you specify the correct filesystem <varname>LABEL</varname> or <varname>UUID</varname> on the kernel command line for your root device, dracut will find it and boot from it.</para>
       <para>The kernel command line usually can be configured in <filename>/boot/grub/grub.conf</filename>, if grub is your bootloader and it also can be edited in the real boot process in the grub menu.</para>
       <para>The kernel command line can also be provided by the dhcp server with the root-path option. See <xref linkend="NetworkBoot"/>.</para>
       <para>For a full reference of all kernel command line parameters, see the <xref linkend="dracutconf5"/> or <xref linkend="dracut8"/> man page.</para>
-      <section>
+      <section id="root_device">
         <title>Specifying the root Device</title>
         <para>This is the only option dracut really needs to boot from your root partition. Because your root partition can live in various environments, there are a lot of formats for the <envar>root=</envar> option. The most basic one is <envar>root=<replaceable>&lt;path to device node&gt;</replaceable></envar>:</para>
         <screen>root=/dev/sda2</screen>
@@ -200,19 +96,23 @@
         <screen># ls -l /dev/disk/by-label</screen>
         <para>If your root partition is on the network see <xref linkend="NetworkBoot"/>.</para>
       </section>
-      <section>
+      <section id="keyboard">
         <title>Keyboard Settings</title>
         <para>If you have to input passwords for encrypted disk volumes, you might want to set the keyboard layout and specify a display font.</para>
         <para>A typical german kernel command would contain:</para>
         <screen>LANG=de_DE.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys</screen>
       </section>
-      <section>
+      <section id="force_kernel_modules">
+        <title>Force loading of Kernel Modules</title>
+        <para>dracut can force load a kernel module with the <envar>rdloaddriver=<replaceable>&lt;drivername&gt;</replaceable></envar> kernel command line parameter, if the kernel module is included in the initramfs (see previous section). If you want the kernel module to be force loaded after all automatic loading modules have been loaded, use the <envar>rdrdinsmodpost=<replaceable>&lt;drivername&gt;</replaceable></envar> kernel command line parameter.</para>
+      </section>
+      <section id="blacklist_kernel_modules">
         <title>Blacklisting Kernel Modules</title>
         <para>Sometimes it is required to prevent the automatic kernel module loading of a specific kernel module. To do this, just add <envar>rd.blacklist=<replaceable>&lt;kernel module name&gt;</replaceable></envar>, with <replaceable>&lt;kernel module name&gt;</replaceable> not containing the <filename>.ko</filename> suffix, to the kernel command line. For example:</para>
         <screen>rdblacklist=mptsas rdblacklist=nouveau</screen>
         <para>The option can be specified multiple times on the kernel command line.</para>
       </section>
-      <section>
+      <section id="speedup">
         <title>Speeding up the Boot Process</title>
         <para>If you want to speed up the boot process, you can specify as much information for dracut on the kernel command as possible. For example, you can tell dracut, that you root partition is not on a <acronym>LVM</acronym> volume or not on a raid partition, or that it lives inside a specific crypto <acronym>LUKS</acronym> encrypted volume. By default, dracut searches everywhere. A typical dracut kernel command line for a plain primary or logical partition would contain:</para>
         <screen>rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM</screen>
@@ -253,7 +153,7 @@
       <para>How to setup your <acronym>PXE</acronym>/<acronym>TFTP</acronym> server can be found in the <ulink url="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/">Red Hat Enterprise Linux Storage Administration Guide</ulink>.</para>
       <para>If you specify <envar>rd.ip=auto</envar> on the kernel command line,  then dracut asks a dhcp server about the ip adress for the machine. The dhcp server can also serve an additional root-path, which will set the root device for dracut.  With this mechanism, you have static configuration on your client machine and  a centralized boot configuration on your <acronym>TFTP</acronym>/<acronym>DHCP</acronym> server. If you can&apos;t pass a kernel command line, then you can inject <filename>/etc/cmdline</filename>, with a method described in <xref linkend="Injecting"/>.
       </para>
-      <section>
+      <section id="reduce">
         <title>Reducing the Image Size</title>
         <para>To reduce the size of the initramfs, you should create it with by ommitting all dracut modules, which you know, you don&apos;t need to boot the machine.</para>
         <para>You can also specify the exact dracut and kernel modules to produce a very tiny initramfs image.</para>
@@ -264,7 +164,7 @@
         <para>This will reduce the size of the initramfs image significantly.</para>
       </section>
     </section>
-    <section>
+    <section id="troubleshooting">
       <title>Troubleshooting</title>
       <para>If the boot process does not succeed, you have several options to debug the situation. Some of the basic operations are covered here. For more information you should also visit:  <ulink url="http://fedoraproject.org/wiki/How_to_debug_Dracut_problems">http://fedoraproject.org/wiki/How_to_debug_Dracut_problems</ulink></para>
       <section id="identifying-your-problem-area">
@@ -1167,8 +1067,8 @@
           </authorgroup>
         </refentryinfo>
         <refmeta>
-          <refentrytitle>dracut.kernel</refentrytitle>
-          <manvolnum>7</manvolnum>
+          <refentrytitle>dracut</refentrytitle>
+          <manvolnum>8</manvolnum>
           <refmiscinfo class="version"/>
         </refmeta>
         <refnamediv>
@@ -1412,7 +1312,7 @@ KEYTABLE=de-latin1-nodeadkeys</programlisting></para>
               <varlistentry>
                 <term>
                   <envar>rd_NO_LVMCONF</envar>
-                 </term>
+                </term>
                 <listitem>
                   <para>remove any <filename>/etc/lvm/lvm.conf</filename>, which may exist in the initramfs</para>
                 </listitem>
@@ -1445,7 +1345,7 @@ KEYTABLE=de-latin1-nodeadkeys</programlisting></para>
               <varlistentry>
                 <term>
                   <envar>rd_NO_CRYPTTAB</envar>
-                 </term>
+                </term>
                 <listitem>
                   <para>do not check, if LUKS partition is in <filename>/etc/crypttab</filename></para>
                 </listitem>
@@ -1474,7 +1374,7 @@ KEYTABLE=de-latin1-nodeadkeys</programlisting></para>
               <varlistentry>
                 <term>
                   <envar>rd_NO_MDADMCONF</envar>
-                 </term>
+                </term>
                 <listitem>
                   <para>ignore mdadm.conf included in initramfs</para>
                 </listitem>
-- 
1.8.3.1

