replace xml documentation with asciidoc

master
Harald Hoyer 2012-03-14 13:58:26 +01:00
parent dc824f1994
commit 888d53f270
11 changed files with 2207 additions and 3151 deletions

View File

@ -19,11 +19,16 @@ all: syncheck
%: %.xml
xsltproc -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<

dracut.html: dracut.xml $(manpages)
%.xml: %.asc
asciidoc -d manpage -b docbook -o $@ $<

dracut.html: dracut.asc $(manpages)
asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc
xsltproc -o dracut.html --xinclude -nonet \
--stringparam draft.mode yes \
--stringparam html.stylesheet http://docs.redhat.com/docs/en-US/Common_Content/css/default.css \
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml
rm dracut.xml

install: doc
mkdir -p $(DESTDIR)$(pkglibdir)

59
dracut-catimages.8.asc Normal file
View File

@ -0,0 +1,59 @@
DRACUT-CATIMAGES(8)
===================
:doctype: manpage
:man source: dracut
:man manual: dracut

NAME
----
dracut-catimages - creates initial ramdisk image by concatenating images

SYNOPSIS
--------
**dracut-catimages** [_OPTION_...] _<initramfs base image>_ [_<image>_...]

DESCRIPTION
-----------
dracut-catimages creates an initial ramdisk image by concatenating several
images from the command line and /boot/dracut/*.img

OPTIONS
-------
**-f, --force**::
overwrite existing initramfs file.

**-i, --imagedir**::
Directory with additional images to add (default: /boot/dracut/)

**-o, --overlaydir**::
Overlay directory, which contains additional files that will be used to
create an additional image

**--nooverlay**:: Do not use the overlay directory

**--noimagedir**:: Do not use the additional image directory

**-h, --help**:: display help text and exit.

**--debug**:: output debug information of the build process

**-v, --verbose**:: verbose output during the build process

FILES
-----
_/boot/dracut/*.img_::
images to work with

AUTHORS
-------
Harald Hoyer

AVAILABILITY
------------
The dracut-catimages command is part of the dracut package and is available from
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]

SEE ALSO
--------
*dracut*(8)

View File

@ -1,116 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<!-- lifted from troff+man by doclifter -->
<refentry id='dracutcatimages8'>
<refmeta>
<refentrytitle>DRACUT-CATIMAGES</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class='source'>June 2009</refmiscinfo>
<refmiscinfo class='manual'>Linux</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>dracut-catimages</refname>
<refpurpose>creates initial ramdisk image by concatenating images</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
<command>dracut-catimages</command> <arg choice='opt' rep='repeat'><replaceable>OPTION</replaceable></arg>
<arg choice='plain'><replaceable>&lt;initramfs</replaceable></arg>
<arg choice='plain'><replaceable>base</replaceable></arg>
<arg choice='plain'><replaceable>image&gt;</replaceable></arg>
<arg choice='opt' rep='repeat'><replaceable>&lt;image&gt;</replaceable></arg>
<sbr/>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para><command>dracut-catimages</command>
creates an initial ramdisk image by concatenating several images from the command
line and /boot/dracut/*.img</para>

</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<variablelist remap='TP'>
<varlistentry>
<term><option>-f</option>, <option>--force</option></term>
<listitem>
<para>overwrite existing initramfs file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-i</option>, <option>--imagedir</option></term>
<listitem>
<para>Directory with additional images to add (default: /boot/dracut/)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-o</option>, <option>--overlaydir</option></term>
<listitem>
<para>Overlay directory, which contains additional files that will be used to create an additional image</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--nooverlay</option></term>
<listitem>
<para>Do not use the overlay directory</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--noimagedir</option></term>
<listitem>
<para>Do not use the additional image directory</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-h</option>, <option>--help</option></term>
<listitem>
<para>display help text and exit.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--debug</option></term>
<listitem>
<para>output debug information of the build process</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option>, <option>--verbose</option></term>
<listitem>
<para>verbose output during the build process</para>

</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 id='files'><title>FILES</title>
<variablelist remap='TP'>
<varlistentry>
<term><filename>/boot/dracut/*.img</filename></term>
<listitem>
<para></para> <!-- FIXME: blank list item -->
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 id='authors'><title>AUTHORS</title>
<literallayout remap='.nf'>
Harald Hoyer &lt;harald@redhat.com&gt;
</literallayout> <!-- .fi -->
</refsect1>

<refsect1 id='availability'><title>AVAILABILITY</title>
<para>The dracut-catimages command is part of the dracut package and is available from
<ulink url='https://dracut.wiki.kernel.org'>https://dracut.wiki.kernel.org</ulink></para>

</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry></para>
</refsect1>
</refentry>

378
dracut.8.asc Normal file
View File

@ -0,0 +1,378 @@
DRACUT(8)
=========
:doctype: manpage
:man source: dracut
:man manual: dracut

NAME
----
dracut - low-level tool for generating an initramfs image

SYNOPSIS
--------
*dracut* ['OPTION...'] [<image> [_<kernel version>_]]

DESCRIPTION
-----------
dracut creates an initial image used by the kernel for preloading the block
device modules (such as IDE, SCSI or RAID) which are needed to access the root
filesystem, mounting the root filesystem and booting into the real system.

At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it
as initial root file system. All finding of the root device happens in this
early userspace.

For a complete list of kernel command line options see *dracut.cmdline*(7)

OPTIONS
-------
**-f, --force**::
overwrite existing initramfs file.

**-m, --modules** _<list of dracut modules>_::
specify a space-separated list of dracut modules to call when building the initramfs.
Modules are located in _/usr/lib/dracut/modules.d_. This parameter can be
specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --modules "module1 module2" ...
----
===============================

**-o, --omit** _<list of dracut modules>_::
omit a space-separated list of dracut modules. This parameter can be specified multiple times.

[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --omit "module1 module2" ...
----
===============================

**-a, --add** _<list of dracut modules>_::
add a space-separated list of dracut modules to the default set of modules.
This parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --add "module1 module2" ...
----
===============================

**--force-add** _<list of dracut modules>_::
force to add a space-separated list of dracut modules to the default set of
modules, when -H is specified. This parameter can be specified multiple
times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --force-add "module1 module2" ...
----
===============================

**-d, --drivers** _<list of kernel modules>_::
specify a space-separated list of kernel modules to exclusively include
in the initramfs. The kernel modules have to be specified without the ".ko"
suffix. This parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --drivers "kmodule1 kmodule2" ...
----
===============================

**--add-drivers** _<list of kernel modules>_::
specify a space-separated list of kernel modules to add to the initramfs.
The kernel modules have to be specified without the ".ko" suffix. This
parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --add-drivers "kmodule1 kmodule2" ...
----
===============================

**--omit-drivers** _<list of kernel modules>_::
specify a space-separated list of kernel modules not to add to the
initramfs.
The kernel modules have to be specified without the ".ko" suffix. This
parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --omit-drivers "kmodule1 kmodule2" ...
----
===============================

**--filesystems** _<list of filesystems>_::
specify a space-separated list of kernel filesystem modules to exclusively
include in the generic initramfs. This parameter can be specified multiple
times.

[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --filesystems "filesystem1 filesystem2" ...
----
===============================

**-k, --kmoddir** _<kernel directory>_::
specify the directory, where to look for kernel modules

**--fwdir** _<dir>[:<dir>...]++_::
specify additional directories, where to look for firmwares. This parameter
can be specified multiple times.

**--kernel-only**::
only install kernel drivers and firmware files

**--no-kernel**::
do not install kernel drivers and firmware files

**--mdadmconf**::
include local _/etc/mdadm.conf_

**--nomdadmconf**::
do not include local _/etc/mdadm.conf_

**--lvmconf**::
include local _/etc/lvm/lvm.conf_

**--nolvmconf**::
do not include local _/etc/lvm/lvm.conf_

**--fscks** [LIST]::
add a space-separated list of fsck tools, in addition to _dracut.conf_'s
specification; the installation is opportunistic (non-existing tools are
ignored)
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --fscks "fsck.foo barfsck" ...
----
===============================

**--nofscks**::
inhibit installation of any fsck tools

**--strip**::
strip binaries in the initramfs (default)

**--nostrip**::
do not strip binaries in the initramfs

**--prefix** _<dir>_::
prefix initramfs files with the specified directory

**--noprefix**::
do not prefix initramfs files (default)

**--ctty**::
if possible, try to spawn an emergency shell on a terminal with job control

**-h, --help**::
display help text and exit.

**--debug**::
output debug information of the build process

**-v, --verbose**::
increase verbosity level (default is info(4))

**-q, --quiet**:: decrease verbosity level (default is info(4))

**-c, --conf** _<dracut configuration file>_::
specify configuration file to use.
+
Default:
_/etc/dracut.conf_

**--confdir** _<configuration directory>_::
specify configuration directory to use.
+
Default:
_/etc/dracut.conf.d_

**--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.

**-l, --local**::
activates the local mode. dracut will use modules from the current working
directory instead of the system-wide installed modules in
_/usr/lib/dracut/modules.d_.
This is useful when running dracut from a git checkout.

**-H, --hostonly**::
Host-Only mode: Install only what is needed for booting
the local host instead of a generic host.
+
[WARNING]
====
If chrooted to another root other than the real root device, use "--fstab" and provide a valid _/etc/fstab_.
====

**--fstab**::
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.

**--add_fstab** _<filename>_ ::
Add entries of _<filename>_ to the initramfs /etc/fstab.

**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
Add entries of _<filename>_ to the initramfs /etc/fstab.

**-i, --include** _<SOURCE>_ _<TARGET>_::
include the files in the SOURCE directory into the
TARGET directory in the final initramfs. If SOURCE is a file, it will be
installed to TARGET in the final initramfs. This parameter can be specified
multiple times.

**-I, --install** _<file list>_::
install the space separated list of files into the initramfs.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
example:
+
----
# dracut --install "/bin/foo /sbin/bar" ...
----
===============================

**--gzip**::
Compress the generated initramfs using gzip. This will be done by default,
unless another compression option or --no-compress is passed. Equivalent to
"--compress=gzip -9"

**--bzip2**::
Compress the generated initramfs using bzip2.
+
[WARNING]
====
Make sure your kernel has bzip2 decompression support compiled in, otherwise you
will not be able to boot. Equivalent to "--compress=bzip2"
====

**--lzma**::
Compress the generated initramfs using lzma.
+
[WARNING]
====
Make sure your kernel has lzma decompression support compiled in, otherwise you
will not be able to boot. Equivalent to "--compress=lzma -9"
====

**--xz**::
Compress the generated initramfs using xz.
+
[WARNING]
====
Make sure your kernel has xz decompression support compiled in, otherwise you
will not be able to boot. Equivalent to "--compress=xz --check=crc32
--lzma2=dict=1MiB"
====

**--compress** _<compressor>_::
Compress the generated initramfs using the passed compression program. If
you pass it just the name of a compression program, it will call that
program with known-working arguments. If you pass a quoted string with
arguments, it will be called with exactly those arguments. Depending on what
you pass, this may result in an initramfs that the kernel cannot decompress.

**--no-compress**::
Do not compress the generated initramfs. This will override any other
compression options.

**--list-modules**::
List all available dracut modules.

**-M, --show-modules**::
Print included module's name to standard output during build.

**--keep**::
Keep the initramfs temporary directory for debugging purposes.

FILES
-----
_/var/log/dracut.log_::
logfile of initramfs image creation

_/tmp/dracut.log_::
logfile of initramfs image creation, if _/var/log/dracut.log_ is not
writable

_/etc/dracut.conf_::
see dracut.conf5

_/etc/dracut.conf.d/*.conf_::
see dracut.conf5

Configuration in the initramfs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_/etc/conf.d/_::
Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
set initial values. Command line options will override these values
set in the configuration files.

_/etc/cmdline_::
Can contain additional command line options.

AVAILABILITY
------------
The dracut command is part of the dracut package and is available from
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]

AUTHORS
-------
*Harald Hoyer*::
Project Leader and Developer

*Victor Lowther*::
Developer

*Philippe Seewer*::
Developer

*Warren Togami*::
Developer

*Amadeusz Żołnowski*::
Developer

*Jeremy Katz*::
Developer

*David Dillow*::
Developer

*Will Woods*::
Developer

SEE ALSO
--------
*dracut.cmdline*(7) *dracut.conf*(5)

View File

@ -1,684 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<!-- vim: set ts=8 sts=2 sw=2 et: -->
<refentry id="dracut8">
<refentryinfo>
<title>dracut</title>
<productname>dracut</productname>
<authorgroup>
<author>
<contrib>Project Leader, Developer</contrib>
<firstname>Harald</firstname>
<surname>Hoyer</surname>
<email>harald@redhat.com</email>
</author>
<author>
<contrib>Developer</contrib>
<firstname>Victor</firstname>
<surname>Lowther</surname>
<email>victor.lowther@gmail.com</email>
</author>
<author>
<contrib>Developer</contrib>
<firstname>Philippe</firstname>
<surname>Seewer</surname>
<email>philippe.seewer@bfh.ch</email>
</author>
<author>
<contrib>Developer</contrib>
<firstname>Warren</firstname>
<surname>Togami</surname>
</author>
<author>
<contrib>Developer</contrib>
<firstname>Amadeusz</firstname>
<surname>Żołnowski</surname>
<email>aidecoe@aidecoe.name</email>
</author>
<author>
<contrib>Developer</contrib>
<firstname>Jeremy</firstname>
<surname>Katz</surname>
</author>
<author>
<contrib>Developer</contrib>
<firstname>David</firstname>
<surname>Dillow</surname>
<email>dave@thedillows.org</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>dracut</refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo class="version"/>
</refmeta>
<refnamediv>
<refname>dracut</refname>
<refpurpose>create initial ramdisk images for preloading modules</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>dracut</command>
<arg choice="opt" rep="repeat">
<replaceable>OPTION</replaceable>
</arg>
<arg choice="opt">
<replaceable>&lt;image&gt;</replaceable>
<arg choice="opt">
<replaceable>&lt;kernel-version&gt;</replaceable>
</arg>
</arg>
<sbr/>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><command>dracut</command>
creates an initial image used by the kernel for
preloading the block device modules (such as IDE, SCSI or RAID)
which are needed to access the root filesystem.</para>
<para>
For a complete list of kernel command line options see
<citerefentry>
<refentrytitle>dracut.cmdline</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
</para>
<refsect2>
<title>Options</title>
<variablelist>
<varlistentry>
<term>
<option>-f</option>
</term>
<term>
<option>--force</option>
</term>
<listitem>
<para>overwrite existing initramfs file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-m</option>
</term>
<term>
<option>--modules&nbsp;<replaceable>&lt;list of dracut modules&gt;</replaceable></option>
</term>
<listitem>
<para>specify a space-separated list of dracut modules to call
when building the initramfs.
Modules are located in
<filename>/usr/lib/dracut/modules.d</filename>. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --modules "module1 module2" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-o</option>
</term>
<term>
<option>--omit&nbsp;<replaceable>&lt;list of dracut modules&gt;</replaceable></option>
</term>
<listitem>
<para>omit a space-separated list of dracut modules. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --omit "module1 module2" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-a</option>
</term>
<term>
<option>--add&nbsp;<replaceable>&lt;list of dracut modules&gt;</replaceable></option>
</term>
<listitem>
<para>add a space-separated list of dracut modules to the default set of modules. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --add "module1 module2" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--force-add&nbsp;<replaceable>&lt;list of dracut modules&gt;</replaceable></option>
</term>
<listitem>
<para>force to add a space-separated list of dracut modules to the default set of modules, when -H is specified. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --force-add "module1 module2" ...</screen>
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-d</option>
</term>
<term>
<option>--drivers&nbsp;<replaceable>&lt;list of kernel modules&gt;</replaceable></option>
</term>
<listitem>
<para>specify a space-separated list of kernel modules to exclusively include
in the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --drivers "kmodule1 kmodule2" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--add-drivers&nbsp;<replaceable>&lt;list of kernel modules&gt;</replaceable></option>
</term>
<listitem>
<para>specify a space-separated list of kernel modules to add to the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --add-drivers "kmodule1 kmodule2" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--omit-drivers&nbsp;<replaceable>&lt;list of kernel modules&gt;</replaceable></option>
</term>
<listitem>
<para>specify a space-separated list of kernel modules not to add to the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --omit-drivers "kmodule1 kmodule2" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--filesystems&nbsp;<replaceable>&lt;list of filesystems&gt;</replaceable></option>
</term>
<listitem>
<para>specify a space-separated list of kernel filesystem modules to exclusively
include in the generic initramfs. This parameter can be specified multiple times.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --filesystems "filesystem1 filesystem2" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-k</option>
</term>
<term>
<option>--kmoddir&nbsp;<replaceable>&lt;kernel directory&gt;</replaceable></option>
</term>
<listitem>
<para>specify the directory, where to look for kernel modules</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option> --fwdir&nbsp;<replaceable>&lt;dir&gt;[:&lt;dir&gt;...]</replaceable></option>
</term>
<listitem>
<para>specify additional directories, where to look for firmwares. This parameter can be specified multiple times.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--kernel-only</option>
</term>
<listitem>
<para>only install kernel drivers and firmware files</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--no-kernel</option>
</term>
<listitem>
<para>do not install kernel drivers and firmware files</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--mdadmconf</option>
</term>
<listitem>
<para>include local <filename>/etc/mdadm.conf</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--nomdadmconf</option>
</term>
<listitem>
<para>do not include local <filename>/etc/mdadm.conf</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--lvmconf</option>
</term>
<listitem>
<para>include local <filename>/etc/lvm/lvm.conf</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--nolvmconf</option>
</term>
<listitem>
<para>do not include local <filename>/etc/lvm/lvm.conf</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--fscks [LIST]</option>
</term>
<listitem>
<para>add a space-separated list of fsck tools, in addition to
<filename>dracut.conf</filename>'s specification; the
installation is opportunistic (non-existing tools are ignored)
</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --fscks "fsck.foo barfsck" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--nofscks</option>
</term>
<listitem>
<para>inhibit installation of any fsck tools</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--strip</option>
</term>
<listitem>
<para>strip binaries in the initramfs (default)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--nostrip</option>
</term>
<listitem>
<para>do not strip binaries in the initramfs</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--prefix&nbsp;<replaceable>&lt;dir&gt;</replaceable></option>
</term>
<listitem>
<para>prefix initramfs files with the specified directory</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--noprefix</option>
</term>
<listitem>
<para>do not prefix initramfs files (default)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--ctty</option>
</term>
<listitem>
<para>if possible, try to spawn an emergency shell on a terminal
with job control</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-h</option>
</term>
<term>
<option>--help</option>
</term>
<listitem>
<para>display help text and exit.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--debug</option>
</term>
<listitem>
<para>output debug information of the build process</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-v</option>
</term>
<term>
<option>--verbose</option>
</term>
<listitem>
<para>increase verbosity level (default is info(4))</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-q</option>
</term>
<term>
<option>--quiet</option>
</term>
<listitem>
<para>decrease verbosity level (default is info(4))</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-c</option>
</term>
<term>
<option>--conf&nbsp;<replaceable>&lt;dracut configuration file&gt;</replaceable></option>
</term>
<listitem>
<para>specify configuration file to use.
Default:
<filename>/etc/dracut.conf</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--confdir&nbsp;<replaceable>&lt;configuration directory&gt;</replaceable></option>
</term>
<listitem>
<para>specify configuration directory to use.
Default:
<filename>/etc/dracut.conf.d</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--sshkey&nbsp;<replaceable>&lt;sshkey file&gt;</replaceable></option>
</term>
<listitem>
<para>ssh key file used with ssh-client module.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-l</option>
</term>
<term>
<option>--local</option>
</term>
<listitem>
<para>activates the local mode. dracut will use modules from the current working
directory instead of the system-wide installed modules in
<filename>/usr/lib/dracut/modules.d</filename>.
This is useful when running dracut from a git checkout.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-H</option>
</term>
<term>
<option>--hostonly</option>
</term>
<listitem>
<para>Host-Only mode: Install only what is needed for booting
the local host instead of a generic host.
<warning>
<para>If chrooted to another root other than the real root device, use &quot;--fstab&quot; and provide a valid <filename>/etc/fstab</filename>.</para>
</warning></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--fstab</option>
</term>
<listitem>
<para>Use <filename>/etc/fstab</filename> instead of <filename>/proc/self/mountinfo</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--add_fstab&nbsp;<replaceable>&lt;filename&gt;</replaceable>&nbsp;</option>
</term>
<listitem>
<para>Add entries of <replaceable>&lt;filename&gt;</replaceable> to the initramfs /etc/fstab.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--mount&nbsp;&quot;<replaceable>&lt;device&gt;</replaceable> <replaceable>&lt;mountpoint&gt;</replaceable> <replaceable>&lt;filesystem type&gt;</replaceable> <replaceable>&lt;filesystem options&gt;</replaceable>&quot;</option>
</term>
<listitem>
<para>Add entries of <replaceable>&lt;filename&gt;</replaceable> to the initramfs /etc/fstab.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-i</option>
</term>
<term>
<option>--include&nbsp;<replaceable>&lt;SOURCE&gt;</replaceable>&nbsp;<replaceable>&lt;TARGET&gt;</replaceable></option>
</term>
<listitem>
<para>include the files in the SOURCE directory into the
TARGET directory in the final initramfs. If SOURCE is a file, it will be installed to TARGET in the final initramfs. This parameter can be specified multiple times.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-I</option>
</term>
<term>
<option>--install&nbsp;<replaceable>&lt;file list&gt;</replaceable></option>
</term>
<listitem>
<para>install the space separated list of files into the initramfs.</para>
<para>
If [LIST] has multiple arguments, then you have to put these in quotes.
For example:
<screen># dracut --install "/bin/foo /sbin/bar" ...</screen>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--gzip</option>
</term>
<listitem>
<para>Compress the generated initramfs using gzip.
This will be done by default, unless another compression option or --no-compress is passed. Equivalent to "--compress=gzip -9"</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--bzip2</option>
</term>
<listitem>
<para>Compress the generated initramfs using bzip2.
<warning>
<para>Make sure your kernel has bzip2 decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=bzip2"</para>
</warning></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--lzma</option>
</term>
<listitem>
<para>Compress the generated initramfs using lzma.
<warning>
<para>Make sure your kernel has lzma decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=lzma -9"</para>
</warning></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--xz</option>
</term>
<listitem>
<para>Compress the generated initramfs using xz.
<warning>
<para>Make sure your kernel has xz decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=xz --check=crc32 --lzma2=dict=1MiB"</para>
</warning></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--compress&nbsp;<replaceable>&lt;compressor&gt;</replaceable></option>
</term>
<listitem>
<para>Compress the generated initramfs using the passed compression program. If you pass it just the name of a compression program, it will call that program with known-working arguments. If you pass a quoted string with arguments, it will be called with exactly those arguments. Depending on what you pass, this may result in an initramfs that the kernel cannot decompress.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--no-compress</option>
</term>
<listitem>
<para>Do not compress the generated initramfs. This will override any other compression options.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--list-modules</option>
</term>
<listitem>
<para>List all available dracut modules.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-M</option>
</term>
<term>
<option>--show-modules</option>
</term>
<listitem>
<para>Print included module's name to standard output during build.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>--keep</option>
</term>
<listitem>
<para>Keep the initramfs temporary directory for debugging purposes.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1>
<title>Files</title>
<variablelist>
<varlistentry>
<term>
<filename>/var/log/dracut.log</filename>
</term>
<listitem>
<para>logfile of initramfs image creation</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<filename>/tmp/dracut.log</filename>
</term>
<listitem>
<para>logfile of initramfs image creation, if <filename>/var/log/dracut.log</filename> is not writable</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<filename>/etc/dracut.conf</filename>
</term>
<listitem>
<para>see <citerefentry>
<refentrytitle>dracut.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<filename>/etc/dracut.conf.d/*.conf</filename>
</term>
<listitem>
<para>see <citerefentry>
<refentrytitle>dracut.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry></para>
</listitem>
</varlistentry>
</variablelist>
<refsect2>
<title>Configuration in the Initramfs</title>
<variablelist>
<varlistentry>
<term>
<filename>/etc/conf.d/</filename>
</term>
<listitem>
<para>Any files found in <filename>/etc/conf.d/</filename> will be sourced in the initramfs to
set initial values. Command line options will override these values
set in the configuration files.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<filename>/etc/cmdline</filename>
</term>
<listitem>
<para>Can contain additional command line options.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1>
<title>Availability</title>
<para>The dracut command is part of the dracut package and is available from
<ulink url='https://dracut.wiki.kernel.org'>https://dracut.wiki.kernel.org</ulink></para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry>
<refentrytitle>dracut.cmdline</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
<citerefentry>
<refentrytitle>dracut.conf</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>

1026
dracut.asc Normal file

File diff suppressed because it is too large Load Diff

603
dracut.cmdline.7.asc Normal file
View File

@ -0,0 +1,603 @@
DRACUT.CMDLINE(7)
=================
:doctype: manpage
:man source: dracut
:man manual: dracut

NAME
----
dracut.cmdline - dracut kernel command line options

DESCRIPTION
-----------
The root device used by the kernel is specified in the boot configuration
file on the kernel command line, as always.

The traditional _root=/dev/sda1_ style device specification is allowed, but not
encouraged. The root device should better be identified by LABEL or UUID. If a
label is used, as in _root=LABEL=<label_of_root>_ the initramfs will search all
available devices for a filesystem with the appropriate label, and mount that
device as the root filesystem. _root=UUID=<uuidnumber>_ will mount the partition
with that UUID as the root filesystem.

In the following all kernel command line parameters, which are processed by
dracut, are described.

"rd.*" parameters mentioned without "=" are boolean parameters. They can be
turned on/off by setting them to {0|1}. If the assignment with "=" is missing
"=1" is implied. For example _rd.info_ can be turned off with _rd.info=0_ or
turned on with _rd.info=1_ or _rd.info_. The last value in the kernel command
line is the value, which is honored.

Standard
~~~~~~~~
**init=**_<path to real init>_::
specify the path to the init programm to be started after the initramfs has
finished

**root=**_<path to blockdevice>_::
specify the block device to use as the root filesystem.
+
E.g.:
+
----
root=/dev/sda1
root=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1
root=/dev/disk/by-label/Root
root=LABEL=Root
root=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
root=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
----

**rootfstype=**_<filesystem type>_:: "auto" if not specified, e.g.:
+
----
rootfstype=ext3
----

**rootflags=**_<mount options>_::
specify additional mount options for the root filesystem. If not set,
_/etc/fstab_ of the real root will be parsed for special mount options and
mounted accordingly.

**rd.fstab=0**::
do not honor special mount options for the root filesystem found in
_/etc/fstab_ of the real root.

Misc
~~~~
**rd.driver.blacklist=**_<drivername>[,<drivername>,...]_::
do not load kernel module <drivername>. This parameter can be specified
multiple times.

**rd.driver.pre=**_<drivername>[,<drivername>,...]_::
force loading kernel module <drivername>. This parameter can be specified
multiple times.

**rd.driver.post=**_<drivername>[,<drivername>,...]_::
force loading kernel module <drivername> after all automatic loading modules
have been loaded. This parameter can be specified multiple times.

**rd.ctty=**_<terminal>_::
if the dracut image was generated with --ctty option, try to spawn an
emergency shell on the specified terminal; if rd.ctty is specified without a
value or not provided at all, the default is /dev/tty1. The '/dev' prefix
can be omitted.

[[dracutkerneldebug]]
Debug
~~~~~
**rd.info**::
print informational output though "quiet" is set

**rd.shell**::
allow dropping to a shell, if root mounting fails

**rd.debug**::
set -x for the dracut shell and logs to dmesg, console and
_/run/initramfs/init.log_

**rd.break**::
drop to a shell at the end

**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot}_::
drop to a shell on defined breakpoint

**rd.udev.info**::
set udev to loglevel info

**rd.udev.debug**::
set udev to loglevel debug

I18N
~~~~
**vconsole.keymap=**_<keymap base file name>_::
keyboard translation table loaded by loadkeys; taken from keymaps directory;
will be written as KEYMAP to _/etc/vconsole.conf_ in the initramfs, e.g.:
+
----
vconsole.keymap=de-latin1-nodeadkeys
----

**vconsole.keymap.ext=**_<list of keymap base file names>_::
list of extra keymaps to bo loaded (sep. by space); will be written as
EXT_KEYMAP to _/etc/vconsole.conf_ in the initramfs

**vconsole.unicode**[=_{0|1}_]::
boolean, indicating UTF-8 mode; will be written as UNICODE to
_/etc/vconsole.conf_ in the initramfs

**vconsole.font=**_<font base file name>_::
console font; taken from consolefonts directory; will be written as FONT to
_/etc/vconsole.conf_ in the initramfs; e.g.:
+
----
vconsole.font=LatArCyrHeb-16
----

**vconsole.font.map=**_<console map base file name>_::
see description of '-m' parameter in setfont manual; taken from consoletrans
directory; will be written as FONT_MAP to _/etc/vconsole.conf_ in the
initramfs

**vconsole.font.unimap=**_<unicode table base file name>_::
see description of '-u' parameter in setfont manual; taken from unimaps
directory; will be written as FONT_UNIMAP to _/etc/vconsole.conf_ in the
initramfs

**locale.LANG=**_<locale>_::
taken from the environment; if no UNICODE is defined we set its value in
basis of LANG value (whether it ends with ".utf8" (or similar) or not); will
be written as LANG to _/etc/locale.conf_ in the initramfs; e.g.:
+
----
locale.LANG=pl_PL.utf8
----

**locale.LC_ALL=**_<locale>_::
taken from the environment; will be written as LC_ALL to _/etc/locale.conf_
in the initramfs

LVM
~~~
**rd.lvm=0**::
disable LVM detection

**rd.lvm.vg=**_<volume group name>_::
only activate the volume groups with the given name. rd.lvm.vg can be
specified multiple times on the kernel command line.

**rd.lvm.lv=**_<logical volume name>_::
only activate the logical volumes with the given name. rd.lvm.lv can be
specified multiple times on the kernel command line.

**rd.lvm.conf=0**::
remove any _/etc/lvm/lvm.conf_, which may exist in the initramfs

crypto LUKS
~~~~~~~~~~~
**rd.luks=0**::
disable crypto LUKS detection

**rd.luks.uuid=**_<luks uuid>_::
only activate the LUKS partitions with the given UUID. Any "luks-" of the
LUKS UUID is removed before comparing to _<luks uuid>_.
The comparisons also matches, if _<luks uuid>_ is only the beginning of the
LUKS UUID, so you don't have to specify the full UUID.
This parameter can be specified multiple times.

**rd.luks.crypttab=0**::
do not check, if LUKS partition is in _/etc/crypttab_

crypto LUKS - key on removable device support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**rd.luks.key=**_<keypath>:<keydev>:<luksdev>_::
_keypath_ is a path to key file to look for. It's REQUIRED. When _keypath_ ends with '.gpg' it's considered to be key encrypted symmetrically with GPG. You will be prompted for password on boot. GPG support comes with 'crypt-gpg' module which needs to be added explicitly.
+
_keydev_ is a device on which key file resides. It might be kernel name of devices (should start with "/dev/"), UUID (prefixed with "UUID=") or label (prefix with "LABEL="). You don't have to specify full UUID. Just its beginning will suffice, even if its ambiguous. All matching devices will be probed. This parameter is recommended, but not required. If not present, all block devices will be probed, which may significantly increase boot time.
+
If _luksdev_ is given, the specified key will only be applied for that LUKS device. Possible values are the same as for _keydev_. Unless you have several LUKS devices, you don't have to specify this parameter. The simplest usage is:
+
----
rd.luks.key=/foo/bar.key
----
+
As you see, you can skip colons in such a case.

MD RAID
~~~~~~~
**rd.md=0**::
disable MD RAID detection

**rd.md.imsm=0**::
disable MD RAID for imsm/isw raids, use DM RAID instead

**rd.md.ddf=0**::
disable MD RAID for SNIA ddf raids, use DM RAID instead

**rd.md.conf=0**::
ignore mdadm.conf included in initramfs

**rd.md.waitclean=1**::
wait for any resync, recovery, or reshape activity to finish before continuing

**rd.md.uuid=**_<md raid uuid>_::
only activate the raid sets with the given UUID. This parameter can be
specified multiple times.

DM RAID
~~~~~~~
**rd.dm=0**::
disable DM RAID detection

**rd.dm.uuid=**_<dm raid uuid>_::
only activate the raid sets with the given UUID. This parameter can be
specified multiple times.

FIPS
~~~~
**rd.fips**::
enable FIPS

**boot=**_<boot device>_::
specify the device, where /boot is located. e.g.
+
----
boot=/dev/sda1
boot=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1
boot=UUID=<uuid>
boot=LABEL=<label>
----

**rd.fips.skipkernel**::
skip checksum check of the kernel image. Useful, if the kernel image is not
in a separate boot partition.

Network
~~~~~~~
**ip=**_{dhcp|on|any|dhcp6|auto6|ibft}_::
dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp, loop
sequentially through all interfaces (eth0, eth1, ...) and use the first with
a valid DHCP root-path.

auto6::: IPv6 autoconfiguration

dhcp6::: IPv6 DHCP

ibft::: iBFT autoconfiguration

**ip=**_<interface>_:_{dhcp|on|any|dhcp6|auto6}_::
This parameter can be specified multiple times.
+
dhcp|on|any|dhcp6::: get ip from dhcp server on a specific interface
auto6::: do IPv6 autoconfiguration

**ip=**_<client-IP>_:_<server-IP>_:_<gateway-IP>_:_<netmask>_:_<client_hostname>_:_<interface>_:_{none|off}_::
explicit network configuration. If you want do define a IPv6 address, put it
in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple
times.

**ifname=**_<interface>_:_<MAC>_::
Assign network device name <interface> (ie eth0) to the NIC with MAC <MAC>.
Note: If you use this option you _must_ specify an ifname= argument for all
interfaces used in ip= or fcoe= arguments. This parameter can be specified
multiple times.

**bootdev=**_<interface>_::
specify network interface to use routing and netroot information from.
Required if multiple ip= lines are used.

**nameserver=**__<IP>__ [**nameserver=**__<IP>__ ...]::
specify nameserver(s) to use

**biosdevname=0**::
boolean, turn off biosdevname network interface renaming

**rd.neednet=1**::
boolean, bring up network even without netroot set

NFS
~~~
**root=**[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]::
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use
dhcp next_server. if server-ip is an IPv6 address it has to be put in
brackets, e.g. [2001:DB8::1]. NFS options can be appended with the prefix
":" or "," and are seperated by ",".

**root=**nfs:[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_], **root=**nfs4:[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_], **root=**_{dhcp|dhcp6}_::
root=dhcp alone directs initrd to look at the DHCP root-path where NFS
options can be specified.
+
----
root-path=<server-ip>:<root-dir>[,<nfs-options>]
root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>]
root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>]
----

**root=**_/dev/nfs_ nfsroot=[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]::
_Deprecated!_ kernel Documentation_/filesystems/nfsroot.txt_ defines this
method. This is supported by dracut, but not recommended.

**rd.nfs.domain=**_<NFSv4 domain name>_::
Set the NFSv4 domain name. Will overwrite the settings in _/etc/idmap.conf_.

iSCSI
~~~~~
**root=**iscsi:[_<username>_:_<password>_[:_<reverse>_:_<password>_]@][_<servername>_]:[_<protocol>_]:[_<port>_]:[_<LUN>_]:_<targetname>_::
protocol defaults to "6", LUN defaults to "0". If the "servername" field is
provided by BOOTP or DHCP, then that field is used in conjunction with other
associated fields to contact the boot server in the Boot stage. However, if
the "servername" field is not provided, then the "targetname" field is then
used in the Discovery Service stage in conjunction with other associated
fields. See
link:$$http://tools.ietf.org/html/rfc4173#section-5$$[rfc4173].
e.g.:
+
----
root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
----
+
If servername is an IPv6 address, it has to be put in brackets. e.g.:
+
----
root=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
----

**root=**_???_ **netroot=**iscsi:[_<username>_:_<password>_[:_<reverse>_:_<password>_]@][_<servername>_]:[_<protocol>_]:[_<port>_]:[_<LUN>_]:_<targetname>_ ...::
multiple netroot options allow setting up multiple iscsi disks. e.g.:
+
----
root=UUID=12424547
netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1
----
+
If servername is an IPv6 address, it has to be put in brackets. e.g.:
+
----
netroot=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
----

**root=**_???_ **rd.iscsi.initiator=**_<initiator>_ **rd.iscsi.target.name=**_<target name>_ **rd.iscsi.target.ip=**_<target ip>_ **rd.iscsi.target.port=**_<target port>_ **rd.iscsi.target.group=**_<target group>_ **rd.iscsi.username=**_<username>_ **rd.iscsi.password=**_<password>_ **rd.iscsi.in.username=**_<in username>_ **rd.iscsi.in.password=**_<in password>_::
manually specify all iscsistart parameter (see **+iscsistart --help+**)

**root=**_???_ **netroot=**iscsi **rd.iscsi.firmware=1**::
will read the iscsi parameter from the BIOS firmware

FCoE
~~~~
**fcoe=**_<edd|interface|MAC>_:_{dcb|nodcb}_::
Try to connect to a FCoE SAN through the NIC specified by _<interface>_ or
_<MAC>_ or EDD settings. For the second argument, currently only nodcb is
supported. This parameter can be specified multiple times. Note: letters in
the MAC-address must be lowercase!

NBD
~~~
**root=**??? **netroot=**nbd:_<server>_:_<port>_[:_<fstype>_[:_<mountopts>_[:_<nbdopts>_]]]::
mount nbd share from <server>

**root=dhcp** with **dhcp** **root-path=**nbd:_<server>_:_<port>_[:_<fstype>_[:_<mountopts>_[:_<nbdopts>_]]]::
root=dhcp alone directs initrd to look at the DHCP root-path where NBD
options can be specified. This syntax is only usable in cases where you are
directly mounting the volume as the rootfs.

DASD
~~~~
**rd.dasd_mod.dasd=**....::
same syntax as the kernel module parameter (s390 only)

**rd.dasd=**_<dasd_adaptor device bus ID>_[,readonly=_X_][,use_diag=_X_][,erplog=_X_]::
activate DASD device with the given adaptor device bus ID and setting the
sysfs attributes to the specified values. This parameter can be specified
multiple times.

ZFCP
~~~~
**rd.zfcp=**_<zfcp adaptor device bus ID>_,_<WWPN>_,_<FCPLUN>_::
rd.zfcp can be specified multiple times on the kernel command line. e.g.:
+
----
rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000
----

**rd.zfcp.conf=0**::
ignore zfcp.conf included in the initramfs

ZNET
~~~~
**rd.znet=**_<nettype>_,_<subchannels>_,_<options>_::
rd.znet can be specified multiple times on the kernel command line. e.g.:
+
----
rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portname=foo
rd.znet=ctc,0.0.0600,0.0.0601,0.0.0602,protocol=bar
----

Plymouth Boot Splash
~~~~~~~~~~~~~~~~~~~~
**plymouth.enable=0**::
disable the plymouth bootsplash completly.

**rd.plymouth=0**::
disable the plymouth bootsplash only for the initramfs.

Kernel keys
~~~~~~~~~~~
**masterkey=**_<kernel master key path name>_::
Set the path name of the kernel master key. e.g.:
+
----
masterkey=/etc/keys/kmk-trusted.blob
----

**masterkeytype=**_<kernel master key type>_::
Set the type of the kernel master key. e.g.:
+
----
masterkeytype=trusted
----

**evmkey=**_<EVM key path name>_::
Set the path name of the EVM key. e.g.:
+
----
evmkey=/etc/keys/evm-trusted.blob
----

**ecryptfskey=**_<eCryptfs key path name>_::
Set the path name of the eCryptfs key. e.g.:
+
----
ecryptfskey=/etc/keys/ecryptfs-trusted.blob
----

Deprecated, renamed Options
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is a list of options, which were used in dracut prior to version 008, and their new replacement.

rdbreak:: rd.break

rd_CCW:: rd.ccw

rd_DASD_MOD:: rd.dasd_mod.dasd

rd_DASD:: rd.dasd

rdinitdebug rdnetdebug:: rd.debug

rd_NO_DM:: rd.dm=0

rd_DM_UUID:: rd.dm.uuid

rdblacklist:: rd.driver.blacklist

rdinsmodpost:: rd.driver.post

rdloaddriver:: rd.driver.pre

rd_NO_FSTAB:: rd.fstab=0

rdinfo:: rd.info

check:: rd.live.check

rdlivedebug:: rd.live.debug

live_dir:: rd.live.dir

liveimg:: rd.live.image

overlay:: rd.live.overlay

readonly_overlay:: rd.live.overlay.readonly

reset_overlay:: rd.live.overlay.reset

live_ram:: rd.live.ram

rd_NO_CRYPTTAB:: rd.luks.crypttab=0

rd_LUKS_KEYDEV_UUID:: rd.luks.keydev.uuid

rd_LUKS_KEYPATH:: rd.luks.keypath

rd_NO_LUKS:: rd.luks=0

rd_LUKS_UUID:: rd.luks.uuid

rd_NO_LVMCONF:: rd.lvm.conf

rd_LVM_LV:: rd.lvm.lv

rd_NO_LVM:: rd.lvm=0

rd_LVM_SNAPSHOT:: rd.lvm.snapshot

rd_LVM_SNAPSIZE:: rd.lvm.snapsize

rd_LVM_VG:: rd.lvm.vg

rd_NO_MDADMCONF:: rd.md.conf=0

rd_NO_MDIMSM:: rd.md.imsm=0

rd_NO_MD:: rd.md=0

rd_MD_UUID:: rd.md.uuid

rd_NFS_DOMAIN:: rd.nfs.domain

iscsi_initiator:: rd.iscsi.initiator

iscsi_target_name:: rd.iscsi.target.name

iscsi_target_ip:: rd.iscsi.target.ip

iscsi_target_port:: rd.iscsi.target.port

iscsi_target_group:: rd.iscsi.target.group

iscsi_username:: rd.iscsi.username

iscsi_password:: rd.iscsi.password

iscsi_in_username:: rd.iscsi.in.username

iscsi_in_password:: rd.iscsi.in.password

iscsi_firmware:: rd.iscsi.firmware=0

rd_NO_PLYMOUTH:: rd.plymouth=0

rd_retry:: rd.retry

rdshell:: rd.shell

rd_NO_SPLASH:: rd.splash

rdudevdebug:: rd.udev.debug

rdudevinfo:: rd.udev.info

rd_NO_ZFCPCONF:: rd.zfcp.conf=0

rd_ZFCP:: rd.zfcp

rd_ZNET:: rd.znet

KEYMAP:: vconsole.keymap

KEYTABLE:: vconsole.keymap

SYSFONT:: vconsole.font

CONTRANS:: vconsole.font.map

UNIMAP:: vconsole.font.unimap

UNICODE:: vconsole.unicode

EXT_KEYMAP:: vconsole.keymap.ext

Configuration in the Initramfs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_/etc/conf.d/_::
Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
set initial values. Command line options will override these values
set in the configuration files.

_/etc/cmdline_::
Can contain additional command line options.

_/etc/cmdline.d/*.conf_::
Can contain additional command line options.

AUTHOR
------
*Harald Hoyer*::
Project Leader and Developer

SEE ALSO
--------
*dracut*(8) *dracut.conf*(5)

File diff suppressed because it is too large Load Diff

135
dracut.conf.5.asc Normal file
View File

@ -0,0 +1,135 @@
DRACUT.CONF(5)
==============
:doctype: manpage
:man source: dracut
:man manual: dracut

NAME
----
dracut.conf - configuration file(s) for dracut

SYNOPSIS
--------
_/etc/dracut.conf_ _/etc/dracut.conf.d/*.conf_

Description
-----------
_dracut.conf_ is loaded during the initialisation phase of dracut. Command line
parameter will overwrite any values set here. _dracut.conf.d/*.conf_ files are
read in alphanumerical order and will overwrite parameters set in
_/etc/dracut.conf_. Each line specifies an attribute and a value. A '#'
indicates the beginning of a comment; following characters, up to the end of the
line are not interpreted.

*dracutmodules+=*" __<dracut modules>__ "::
Specify a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.

*omit_dracutmodules+=*" __<dracut modules>__ "::
Omit a space-separated list of dracut modules.

*add_dracutmodules+=*" __<dracut modules>__ "::
Add a space-separated list of dracut modules.

*drivers+=*" __<kernel modules>__ "::
Specify a space-separated list of kernel modules to exclusively include in
the initramfs. The kernel modules have to be specified without the ".ko"
suffix.

*add_drivers+=*" __<kernel modules>__ "::
Specify a space-separated list of kernel modules to add to the initramfs.
The kernel modules have to be specified without the ".ko" suffix.

*omit_drivers+=*" __<kernel modules>__ "::
Specify a space-separated list of kernel modules not to add to the
initramfs. The kernel modules have to be specified without the ".ko" suffix.

*install_items+=*" __<kernel modules>__ "::
Specify a space-separated list of files, which are added to the initramfs
image.

*filesystems+=*" __<filesystem names>__ "::
Specify a space-separated list of kernel filesystem modules to exclusively
include in the generic initramfs.

*drivers_dir=*"__<kernel modules directory>__"::
Specify the directory, where to look for kernel modules

*fw_dir+=*" :__<dir>__[:__<dir>__ ...] "::
Specify additional directories, where to look for firmwares, separated by :

*install_items+=*" __<file>__[ __<file>__ ...] "::
Specify additional files to include in the initramfs, separated by spaces.

*do_strip=*"__{yes|no}__"::
Strip binaries in the initramfs (default=yes)

*hostonly=*"__{yes|no}__"::
Host-Only mode: Install only what is needed for booting the local host instead of a generic host.

[WARNING]
====
If chrooted to another root other than the real root device, use --fstab and provide a valid _/etc/fstab_.
====

*use_fstab=*"__{yes|no}__"::
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.

*add_fstab+=*" __<filename>__ "::
Add entries of __<filename>__ to the initramfs /etc/fstab.

*mdadmconf=*"__{yes|no}__"::
Include local _/etc/mdadm.conf_ (default=yes)

*lvmconf=*"__{yes|no}__"::
Include local _/etc/lvm/lvm.conf_ (default=yes)

*fscks=*" __<fsck tools>__ "::
Add a space-separated list of fsck tools. If nothing is specified, the
default is: "umount mount /sbin/fsck* xfs_db xfs_check xfs_repair e2fsck
jfs_fsck reiserfsck btrfsck". The installation is opportunistic
(non-existing tools are ignored).

*nofscks=*"__{yes|no}__"::
If specified, inhibit installation of any fsck tools.

*kernel_only=*"__{yes|no}__"::
Only install kernel drivers and firmware files. (default=no)

*no_kernel=*"{yes|no}"::
Do not install kernel drivers and firmware files (default=no)

*stdloglvl*="__\{0-6\}__"::
Set logging to standard error level.

*sysloglvl*="__\{0-6\}__"::
Set logging to syslog level.

*fileloglvl=*"__\{0-6\}__"::
Set logging to file level.

*logfile=*"__<file>__"::
Path to log file.

*show_modules=*"__{yes|no}__"::
Print included module's name to standard output during build.

Files
-----
_/etc/dracut.conf_::
Old configuration file. You better use your own file in
_/etc/dracut/conf.d/_.

_/etc/dracut/conf.d/_::
Any _/etc/dracut/conf.d/*.conf_ file can overwrite the values in
_/etc/dracut.conf_. The configuration files are read in alphanumerical
order.

AUTHOR
------
Harald Hoyer

See Also
--------
*dracut*(8) *dracut.cmdline*(7)

View File

@ -1,297 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<!-- vim: set ts=8 sts=2 sw=2 et: -->
<refentry id="dracutconf5">
<refentryinfo>
<title>dracut.conf</title>
<productname>dracut</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Harald</firstname>
<surname>Hoyer</surname>
<email>harald@redhat.com</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>dracut.conf</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>dracut.conf</refname>
<refpurpose>configuration file(s) for dracut</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>/etc/dracut.conf</command>
<arg choice="plain">
<replaceable>/etc/dracut.conf.d/*.conf</replaceable>
</arg>
<sbr/>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><filename>dracut.conf</filename>
is loaded during the initialisation phase of dracut.
Command line parameter will overwrite any values set here.
<emphasis><filename>dracut.conf.d/*.conf</filename> files are read in alphanumerical order and will</emphasis>
overwrite parameters set in <filename>/etc/dracut.conf</filename>. Each line specifies an attribute and a value. A &apos;#&apos; indicates the beginning of a comment; following characters, up to the end of the line are not interpreted.</para>
<variablelist>
<varlistentry>
<term>
<envar>dracutmodules+=&quot;&nbsp;<replaceable>&lt;dracut modules&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify a space-separated list of dracut modules to
call when building the initramfs. Modules are located
in <filename>/usr/lib/dracut/modules.d</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>omit_dracutmodules+=&quot;&nbsp;<replaceable>&lt;dracut modules&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Omit a space-separated list of dracut modules.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>add_dracutmodules+=&quot;&nbsp;<replaceable>&lt;dracut modules&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Add a space-separated list of dracut modules.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>drivers+=&quot;&nbsp;<replaceable>&lt;kernel modules&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify a space-separated list of kernel modules to
exclusively include in the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>add_drivers+=&quot;&nbsp;<replaceable>&lt;kernel modules&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify a space-separated list of kernel
modules to add to the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>omit_drivers+=&quot;&nbsp;<replaceable>&lt;kernel modules&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify a space-separated list of kernel
modules not to add to the initramfs.
The kernel modules have to be specified without the &quot;.ko&quot; suffix.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>install_items+=&quot;&nbsp;<replaceable>&lt;kernel modules&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify a space-separated list of files, which are added to the initramfs image.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>filesystems+=&quot;&nbsp;<replaceable>&lt;filesystem names&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify a space-separated list of kernel filesystem
modules to exclusively include in the generic
initramfs.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>drivers_dir=&quot;<replaceable>&lt;kernel modules directory&gt;</replaceable>&quot;</envar>
</term>
<listitem>
<para>Specify the directory, where to look for kernel modules</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>fw_dir+=&quot;&#160;:<replaceable>&lt;dir&gt;</replaceable>[:<replaceable>&lt;dir&gt;</replaceable>&nbsp;...]&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify additional directories, where to look for firmwares, separated by <constant>:</constant></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>install_items+=&quot;&#160;<replaceable>&lt;file&gt;</replaceable>[ <replaceable>&lt;file&gt;</replaceable>&nbsp;...]&nbsp;&quot;</envar>
</term>
<listitem>
<para>Specify additional files to include in the initramfs, separated by spaces.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>do_strip=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Strip binaries in the initramfs (default=yes)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>hostonly=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Host-Only mode: Install only what is needed for booting
the local host instead of a generic host.
<warning><para>If chrooted to another root other than the real root device, use <option>--fstab</option> and provide a valid <filename>/etc/fstab</filename>.</para>
</warning>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>use_fstab=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Use <filename>/etc/fstab</filename> instead of <filename>/proc/self/mountinfo</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>add_fstab+=&quot;&nbsp;<replaceable>&lt;filename&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Add entries of <replaceable>&lt;filename&gt;</replaceable> to the initramfs /etc/fstab.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>mdadmconf=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Include local <filename>/etc/mdadm.conf</filename> (default=yes)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>lvmconf=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Include local <filename>/etc/lvm/lvm.conf</filename> (default=yes)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>fscks=&quot;&nbsp;<replaceable>&lt;fsck tools&gt;</replaceable>&nbsp;&quot;</envar>
</term>
<listitem>
<para>Add a space-separated list of fsck tools. If nothing is
specified, the default is: &quot;<replaceable>umount mount
/sbin/fsck* xfs_db xfs_check xfs_repair e2fsck jfs_fsck
reiserfsck btrfsck</replaceable>&quot;
</para>
<para>The installation is opportunistic (non-existing tools are ignored).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>nofscks=&quot;<replaceable>{yes}</replaceable>&quot;</envar>
</term>
<listitem>
<para>If specified, inhibit installation of any fsck tools.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>kernel_only=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Only install kernel drivers and firmware files. (default=no)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>no_kernel=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Do not install kernel drivers and firmware files (default=no)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>stdloglvl=&quot;<replaceable>{0-6}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Set logging to standard error level.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>sysloglvl=&quot;<replaceable>{0-6}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Set logging to syslog level.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>fileloglvl=&quot;<replaceable>{0-6}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Set logging to file level.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>logfile=&quot;<replaceable>&lt;file&gt;</replaceable>&quot;</envar>
</term>
<listitem>
<para>Path to log file.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<envar>show_modules=&quot;<replaceable>{yes|no}</replaceable>&quot;</envar>
</term>
<listitem>
<para>Print included module's name to standard output during build.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Files</title>
<variablelist>
<varlistentry>
<term>
<filename>/etc/dracut/conf.d/</filename>
</term>
<listitem>
<para>Any <filename>/etc/dracut/conf.d/*.conf</filename> file can overwrite the values in <filename>/etc/dracut.conf</filename>.
The configuration files are read in alphanumerical order.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>See Also</title>
<para><citerefentry>
<refentrytitle>dracut</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>
<citerefentry>
<refentrytitle>dracut.cmdline</refentrytitle>
<manvolnum>7</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1,729 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This document was created with Syntext Serna Free. -->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<book>
<title><inlinemediaobject>
<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>
<firstname>Harald</firstname>
<surname>Hoyer</surname>
</author>
<pubdate>2010</pubdate>
<edition>Version 1.0</edition>
<copyright>
<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.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.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>
<title>Creating an initramfs Image</title>
<para>To create a initramfs image, the most simple command is:</para>
<screen># dracut</screen>
<para>This will generate a general purpose initramfs image, with all possible functionality resulting of the combination of the installed dracut modules and system tools. The image is /boot/initramfs-<replaceable>&lt;kernel version&gt;</replaceable>.img and contains the kernel modules of the currently active kernel with version <replaceable>&lt;kernel version&gt;</replaceable>.</para>
<para>If the initramfs image already exists, dracut will display an error message, and to overwrite the existing image, you have to use the <option>--force</option> option. </para>
<screen># dracut --force</screen>
<para>If you want to specify another filename for the resulting image you would issue a command like:</para>
<screen># dracut foobar.img</screen>
<para>To generate an image for a specific kernel version, the command would be:</para>
<screen># dracut foobar.img 2.6.40-1.rc5.f20</screen>
<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>
<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>
<para>To display the contents of a file in the initramfs also use the <command>lsinitrd</command> tool:</para>
<screen># lsinitrd /boot/initramfs-$(uname -r).img /etc/ld.so.conf
include ld.so.conf.d/*.conf</screen>
</section>
<section>
<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, use the <option>--list-modules</option> option:</para>
<screen># dracut --list-modules</screen>
<para>or, if you have a dracut version earlier than <literal>008</literal>, issue the command:</para>
<screen># for mod in /usr/lib/dracut/modules.d/*; do echo ${mod##*/??}; done</screen>
</section>
<section>
<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>
<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>
</section>
</section>
<section>
<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>
<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>
<para>Because device node names can change, dependent on the drive ordering, you are encouraged to use the filesystem identifier (UUID) or filesystem label (LABEL) to specify your root partition:</para>
<screen>root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331</screen>
<para>or</para>
<screen>root=LABEL=myrootpartitionlabel</screen>
<para>To see all <envar>UUID</envar>s or <envar>LABEL</envar>s on your system, do:</para>
<screen># ls -l /dev/disk/by-uuid</screen>
<para>or</para>
<screen># ls -l /dev/disk/by-label</screen>
<para>If your root partition is on the network see <xref linkend="NetworkBoot"/>.</para>
</section>
<section>
<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>vconsole.font=latarcyrheb-sun16 vconsole.keymap=de-latin1-nodeadkeys locale.LANG=de_DE.UTF-8</screen>
<para>Setting these options can override the setting stored on your system, if you use a modern init system, like systemd.</para>
<para>For dracut versions prior to version <literal>008</literal> the line would look like:</para>
<screen>LANG=de_DE.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys</screen>
</section>
<section>
<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>rd.blacklist=mptsas rd.blacklist=nouveau</screen>
<para>The option can be specified multiple times on the kernel command line.</para>
</section>
<section>
<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.luks=0 rd.lvm=0 rd.md=0 rd.dm=0</screen>
<para>on systems with dracut version prior to <literal>008</literal> the line would look like:</para>
<screen>rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM</screen>
<para>This turns off every automatic assembly of <acronym>LVM</acronym>, <acronym>MD</acronym> raids, <acronym>DM</acronym> raids and crypto <acronym>LUKS</acronym>.</para>
<para>Of course, you could also omit the dracut modules in the initramfs creation process, but then you would lose the posibility to turn it on on demand.</para>
</section>
<section id="Injecting">
<title>Injecting custom Files</title>
<para>To add your own files to the initramfs image, you have several possibilities.</para>
<para>The <option>--include</option> option let you specify a source path and a target path. For example</para>
<screen># dracut --include cmdline-preset /etc/cmdline initramfs-cmdline-pre.img</screen>
<para>will create an initramfs image, where the file cmdline-preset will be copied inside the initramfs to <filename>/etc/cmdline</filename>. <option>--include</option> can only be specified once.</para>
<screen># mkdir rd.live.overlay
# mkdir rd.live.overlay/etc
# mkdir rd.live.overlay/etc/conf.d
# echo &quot;ip=auto&quot; &gt;&gt; rd.live.overlay/etc/cmdline
# echo export TESTVAR=testtest &gt;&gt; rd.live.overlay/etc/conf.d/testvar.conf
# echo export TESTVAR=testtest &gt;&gt; rd.live.overlay/etc/conf.d/testvar.conf
# tree rd.live.overlay/
rd.live.overlay/
└── etc
├── cmdline
└── conf.d
└── testvar.conf
# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img</screen>
<para>This will put the contents of the rd.live.overlay directory into the root of the initramfs image.</para>
<para>The <option>--install</option> option let you specify several files, which will get installed in the initramfs image at the same location, as they are present on initramfs creation time.</para>
<screen># dracut --install &apos;strace fsck.ext3 ssh&apos; initramfs-dbg.img</screen>
<para>This will create an initramfs with the <command>strace</command>, <command>fsck.ext3</command> and <command>ssh</command> executables, together with the libraries needed to start those. The <option>--install</option> option can be specified multiple times.</para>
</section>
</section>
<section id="NetworkBoot">
<title>Network Boot</title>
<para>If your root partition is on a network drive, you have to have the network dracut modules installed to create a network aware initramfs image.</para>
<para>On a Red Hat Enterprise Linux or Fedora system, this means, you have to install the <filename>dracut-network</filename> rpm package:</para>
<screen># yum install dracut-network</screen>
<para>The resulting initramfs image can be served by a boot manager residing on your local hard drive or it can be served by a <acronym>PXE</acronym>/<acronym>TFTP</acronym> server.</para>
<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>
<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>
<para>For example for a <acronym>NFS</acronym> image, you would do:</para>
<screen># dracut -m &quot;nfs network base&quot; initramfs-nfs-only.img</screen>
<para>Then you would boot from this image with your target machine and reduce the size once more by creating it on the target machine with the <option>--host-only</option> option:</para>
<screen># dracut -m &quot;nfs network base&quot; --host-only initramfs-nfs-host-only.img</screen>
<para>This will reduce the size of the initramfs image significantly.</para>
</section>
<section>
<title>NFS Root Device</title>
<para/>
</section>
<section>
<title>iSCSI Root Device</title>
<para>
</para>
</section>
<section>
<title>FCoE Root Device</title>
<para>
</para>
</section>
</section>
<section>
<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">
<title>Identifying your problem area</title>
<orderedlist>
<listitem>
<para>Remove &apos;&apos;rhgb&apos;&apos; and &apos;&apos;quiet&apos;&apos; from the kernel command line
</para>
</listitem>
<listitem>
<para>Add &apos;&apos;rd.shell&apos;&apos; to the kernel command line. This will present a shell should dracut be unable to locate your root device
</para>
</listitem>
<listitem>
<para>Add &apos;&apos;rd.shell rd.debug log_buf_len=1M&apos;&apos; to the kernel command line so that dracut shell commands are printed as they are executed
</para>
</listitem>
<listitem>
<para>With dracut &gt;= 002-11, you can inspect the rd.debug output with:
</para>
<screen># less /run/initramfs/init.log
# dmesg | less</screen>
</listitem>
</orderedlist>
</section>
<section id="information-to-include-in-your-report">
<title id="information-to-include-in-your-report-title">Information to include in your report</title>
<section id="all-bug-reports">
<title id="all-bug-reports-title">All bug reports</title>
<para>In all cases, the following should be mentioned and attached to your bug report:
</para>
<itemizedlist>
<listitem>
<para>The exact kernel command-line used. Typically from the bootloader configuration file (e.g. <filename>/etc/grub.conf</filename>) or from <filename>/proc/cmdline</filename>.</para>
</listitem>
<listitem>
<para>A copy of your disk partition information from <filename>/etc/fstab</filename>, which might be obtained booting an old working initramfs or a rescue medium.</para>
</listitem>
<listitem>
<para>A device listing from device-mapper. This can be obtained by running the command <screen># dmsetup ls --tree</screen></para>
</listitem>
<listitem>
<para>A list of block device attributes including vol_id compatible mode. This can be obtained by running the commands: <screen># blkid -p
# blkid -p -o udev</screen></para>
</listitem>
<listitem>
<para>Turn on dracut debugging (see <filename>the &apos;debugging dracut&apos; section</filename>), and attach all relevant information from the boot log. This can be obtained by running the command <screen># dmesg|grep dracut</screen></para>
</listitem>
<listitem>
<para>If you use a dracut configuration file, please include <filename>/etc/dracut.conf</filename>
and all files in <filename>/etc/dracut.conf.d/*.conf</filename></para>
</listitem>
</itemizedlist>
</section>
<section id="logical-volume-management-related-problems">
<title id="logical-volume-management-related-problems-title">Logical Volume Management related problems</title>
<para>As well as the information from <xref linkend="all-bug-reports"/> include the following information:
</para>
<itemizedlist>
<listitem>
<para>Include physical volume information by running the command: <screen># lvm pvdisplay</screen></para>
</listitem>
<listitem>
<para>Include volume group information by running the command: <screen># lvm vgdisplay</screen></para>
</listitem>
<listitem>
<para>Include logical volume information by running the command: <screen># lvm lvdisplay</screen></para>
</listitem>
</itemizedlist>
</section>
<section id="software-raid-related-problems">
<title id="software-raid-related-problems-title">Software RAID related problems</title>
<para>As well as the information from <xref linkend="all-bug-reports"/>, include the following information:
</para>
<itemizedlist>
<listitem>
<para>If using software RAID disk partitions, please include the output of <screen># cat /proc/mdstat</screen></para>
</listitem>
</itemizedlist>
</section>
<section id="network-root-device-related-problems">
<title id="network-root-device-related-problems-title">Network root device related problems</title>
<para>This section details information to include when experiencing problems on a system whose root device is located on a network attached volume (e.g. iSCSI, NFS or NBD). As well as the information from <xref linkend="all-bug-reports"/>, include the following information:
</para>
<itemizedlist>
<listitem>
<para>Please include the output of <screen># /sbin/ifup <replaceable>&lt;interfacename&gt;</replaceable>
# ip addr show</screen></para>
</listitem>
</itemizedlist>
</section>
</section>
<section id="debugging-dracut">
<title id="debugging-dracut-title">Debugging dracut</title>
<section id="configure-a-serial-console">
<title id="configure-a-serial-console-title">Configure a serial console</title>
<para>Successfully debugging dracut will require some form of console logging during the system boot. This section documents configuring a serial console connection to record boot messages.
</para>
<orderedlist>
<listitem>
<para>First, enable serial console output for both the kernel and the bootloader.
</para>
</listitem>
<listitem>
<para>Open the file <filename>/etc/grub.conf</filename> for editing. Below the line &apos;&apos;timeout=5&apos;&apos;, add the following:
<screen>serial --unit=0 --speed=9600
terminal --timeout=5 serial console</screen></para>
</listitem>
<listitem>
<para>Also in <filename>/etc/grub.conf</filename>, add the following boot arguemnts to the &apos;&apos;kernel&apos;&apos; line:
<screen>console=tty0 console=ttyS0,9600</screen></para>
</listitem>
<listitem>
<para>When finished, the <filename>/etc/grub.conf</filename> file should look similar to the example below.
<screen>default=0
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title Fedora (2.6.29.5-191.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
initrd /dracut-2.6.29.5-191.fc11.x86_64.img</screen></para>
</listitem>
<listitem>
<para>More detailed information on how to configure the kernel for console output can be found at <ulink url="http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL">http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL</ulink>.
</para>
</listitem>
</orderedlist>
<note>
<title>Redirecting non-interactive output</title>
<para>You can redirect all non-interactive output to <filename>/dev/kmsg</filename> and the kernel will put it out on the console when it reaches the kernel buffer by doing<screen># exec &gt;/dev/kmsg 2&gt;&amp;1 &lt;/dev/console</screen></para>
</note>
</section>
<section id="using-the-dracut-shell">
<title id="using-the-dracut-shell-title">Using the dracut shell</title>
<para>Dracut offers a shell for interactive debugging in the event dracut fails to locate your root filesystem. To enable the shell:
<orderedlist>
<listitem>
<para>Add the boot parameter &apos;&apos;rd.shell&apos;&apos; to your bootloader configuration file (e.g. <filename>/etc/grub.conf</filename>)</para>
</listitem>
<listitem>
<para>Remove the boot arguments &apos;&apos;rhgb&apos;&apos; and &apos;&apos;quiet&apos;&apos;
</para>
<para>
A sample <filename>/etc/grub.conf</filename> bootloader configuration file is listed below.
</para>
<para><screen>default=0
timeout=5
serial --unit=0 --speed=9600
terminal --timeout=5 serial console
title Fedora (2.6.29.5-191.fc11.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
initrd /dracut-2.6.29.5-191.fc11.x86_64.img</screen></para>
</listitem>
<listitem>
<para>If system boot fails, you will be dropped into a shell as seen in the example below.
<screen>No root device found
Dropping to debug shell.

sh: can&apos;t access tty; job control turned off

# </screen></para>
</listitem>
<listitem>
<para>Use this shell prompt to gather the information requested above (see <xref linkend="all-bug-reports"/>).
</para>
</listitem>
</orderedlist></para>
</section>
<section id="accessing-the-root-volume-from-the-dracut-shell">
<title id="accessing-the-root-volume-from-the-dracut-shell-title">Accessing the root volume from the dracut shell</title>
<para>From the dracut debug shell, you can manually perform the task of locating and preparing your root volume for boot. The required steps will depend on how your root volume is configured. Common scenarios include:
</para>
<itemizedlist>
<listitem>
<para>A block device (e.g. <filename>/dev/sda7</filename>)
</para>
</listitem>
<listitem>
<para>A LVM logical volume (e.g. <filename>/dev/VolGroup00/LogVol00</filename>)
</para>
</listitem>
<listitem>
<para>An encrypted device (e.g. <filename>/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83</filename>)
</para>
</listitem>
<listitem>
<para>A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all)
</para>
</listitem>
</itemizedlist>
<para>The exact method for locating and preparing will vary. However, to continue with a successful boot, the objective is to locate your root volume and create a symlink <filename>/dev/root</filename> which points to the file system. For example, the following example demonstrates accessing and booting a root volume that is an encrypted LVM Logical volume. </para>
<orderedlist>
<listitem>
<para>Inspect your partitions using <command>parted</command><screen># parted /dev/sda -s p
Model: ATA HTS541060G9AT00 (scsi)
Disk /dev/sda: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 10.8GB 107MB primary ext4 boot
2 10.8GB 55.6GB 44.7GB logical lvm</screen></para>
</listitem>
<listitem>
<para>You recall that your root volume was a LVM logical volume. Scan and activate any logical volumes.
<screen># lvm vgscan
# lvm vgchange -ay</screen></para>
</listitem>
<listitem>
<para>You should see any logical volumes now using the command <command>blkid</command>:
<screen># blkid
/dev/sda1: UUID=&quot;3de247f3-5de4-4a44-afc5-1fe179750cf7&quot; TYPE=&quot;ext4&quot;
/dev/sda2: UUID=&quot;Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I&quot; TYPE=&quot;LVM2_member&quot;
/dev/mapper/linux-root: UUID=&quot;def0269e-424b-4752-acf3-1077bf96ad2c&quot; TYPE=&quot;crypto_LUKS&quot;
/dev/mapper/linux-home: UUID=&quot;c69127c1-f153-4ea2-b58e-4cbfa9257c5e&quot; TYPE=&quot;ext3&quot;
/dev/mapper/linux-swap: UUID=&quot;47b4d329-975c-4c08-b218-f9c9bf3635f1&quot; TYPE=&quot;swap&quot;
</screen></para>
</listitem>
<listitem>
<para>From the output above, you recall that your root volume exists on an encrypted block device. Following the guidance disk encryption guidance from the Installation Guide, you unlock your encrypted root volume.
<screen># UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
# cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
Enter passphrase for /dev/mapper/linux-root:
Key slot 0 unlocked. </screen></para>
</listitem>
<listitem>
<para>Next, make a symbolic link to the unlocked root volume
<screen># ln -s /dev/mapper/luks-$UUID /dev/root</screen></para>
</listitem>
<listitem>
<para>With the root volume available, you may continue booting the system by exiting the dracut shell
<screen># exit</screen></para>
</listitem>
</orderedlist>
</section>
<section id="additional-dracut-boot-parameters">
<title id="additional-dracut-boot-parameters-title">Additional dracut boot parameters</title>
<para>For more debugging options, see <xref linkend="dracut-kernel-debug"/> in the man page <xref linkend="dracutkernel7"/>.</para>
</section>
</section>
</section>
</chapter>
<chapter>
<title>Developer Manual</title>
<section>
<title>dracut Components</title>
<para>dracut uses a modular system to build and extend the initramfs image. All modules are located in <filename>/usr/lib/dracut/modules.d</filename> or in <filename><replaceable>&lt;git-src&gt;</replaceable>/modules.d</filename>. The most basic dracut module is <filename>99base</filename>. In <filename>99base</filename> the initial shell script <command>init</command> is defined, which gets run by the kernel after initramfs loading. Although you can replace <command>init</command> with your own version of <filename>99base</filename>, this is not encouraged. Instead you should use, if possible, the hooks of dracut. All hooks, and the point of time in which they are executed, are described in <xref linkend="stages"/>.</para>
<para>The main script, which creates the initramfs is <command>dracut</command> itsself. It parses all arguments and sets up the directory, in which everything is installed. It then executes all <command>check</command>, <command>install</command>, <command>installkernel</command> scripts found in the modules, which are to be processed. After everything is installed, the install directory is archived and compressed to the final initramfs image. All helper functions used by <command>check</command>, <command>install</command> and <command>installkernel</command> are found in in the file <filename>dracut-functions</filename>. These shell functions are available to all module installer (<command>install</command>, <command>installkernel</command>) scripts, without the need to source <filename>dracut-functions</filename>.</para>
<para>A module can check the preconditions for <command>install</command> and <command>installkernel</command> with the <command>check</command> script. Also dependencies can be expressed with <command>check</command>. If a module passed <command>check</command>, <command>install</command> and <command>installkernel</command> will be called to install all of the necessary files for the module. To split between kernel and non-kernel parts of the installation, all kernel module related parts have to be in <command>installkernel</command>. All other files found in a module directory are module specific and mostly are hook scripts and udev rules.</para>
</section>
<section id="stages">
<title>Boot Process Stages</title>
<para>The <command>init</command> script in <filename>99base</filename> is the main script, which prepares the root file system for usage, runs udev, mounts the real root device, kills the remaining processes, and switches to the real root device for further booting. dracut modules can insert custom script at various points, to control the boot process. These hooks are plain directories containing shell scripts ending with &quot;.sh&quot;, which are sourced by <command>init</command>.
Common used functions are in <filename>dracut-lib.sh</filename>, which can be sourced by any script. </para>
<section>
<title>Basic Setup</title>
<para>The first thing <command>init</command> does, is to mount <filename>/proc</filename> and <filename>/sys</filename> and manually create the basic device nodes and symbolic links in <filename>/dev</filename> needed to execute basic commands. Then logging is setup according to kernel command line arguments. <filename>/dev/pts</filename> and <filename>/dev/shm</filename> are mounted and the first hook is sourced.</para>
</section>
<section>
<title>Hook: cmdline</title>
<para>The <literal>
<function>cmdline</function>
</literal> hook is a place to insert scripts to parse the kernel command line and prepare the later actions, like setting up udev rules and configuration files.</para>
<para>In this hook the most important environment variable is defined: <envar>root</envar>. The second one is <envar>rootok</envar>, which indicates, that a module claimed to be able to parse the <envar>root</envar> defined. So for example, <envar>root=</envar><replaceable>iscsi:....</replaceable> will be claimed by the <function>iscsi</function> dracut module, which then sets <envar>rootok</envar>.</para>
</section>
<section>
<title>Hook: pre-udev</title>
<para>This hook is executed right after the <function>cmdline</function> hook and a check if <envar>root</envar> and <envar>rootok</envar> were set. Here modules can take action with the final <envar>root</envar>, and before <command>udev</command> has been run.</para>
</section>
<section>
<title>Start Udev</title>
<para>Now <command>udev</command> is started and the logging for <command>udev</command> is setup.</para>
</section>
<section>
<title>Hook: pre-trigger</title>
<para>In this hook, you can set udev environment variables with <code>udevadm control --property=<envar>KEY</envar>=<replaceable>value</replaceable></code> or control the further execution of <command>udev</command> with <command>udevadm</command>.</para>
</section>
<section>
<title>Trigger Udev</title>
<para><command>udev</command> is triggered by calling <command>udevadm trigger</command>, which sends <constant>add</constant> events for all devices and subsystems.
</para>
</section>
<section>
<title>Main Loop</title>
<para>Now the main loop of <command>99base/init</command> begins. Here we loop until <command>udev</command> has settled and all scripts in <filename>initqueue/finished</filename> returned true. In this loop there are three hooks, where scripts can be inserted by calling <command>/sbin/initqueue</command>.
</para>
<section>
<title>Initqueue</title>
<para>This hook gets executed every time a script is inserted here, regardless of the <command>udev</command> state.</para>
</section>
<section>
<title>Initqueue settled</title>
<para>This hooks gets executed every time <command>udev</command> has settled.</para>
</section>
<section>
<title>Initqueue timeout</title>
<para>This hooks gets executed, when the main loop counter becomes half of the rd.retry counter.</para>
</section>
<section>
<title>Initqueue finished</title>
<para>This hook is called after <command>udev</command> has settled and if all scripts herein return <errorcode>0</errorcode> the main loop will be ended.</para>
</section>
</section>
<section>
<title>Hook: pre-mount</title>
<para>Before the root device is mounted all scripts in the hook pre-mount are executed. In some cases (e.g. <acronym>NFS</acronym>) the real root device is already mounted, though.</para>
</section>
<section>
<title>Hook: mount</title>
<para>This hook is mainly to mount the real root device.</para>
</section>
<section>
<title>Hook: pre-pivot</title>
<para>This hook is the last hook and is called before init finally switches root to the real root device. This is a good place to clean up and kill processes not needed anymore.</para>
</section>
<section>
<title>Cleanup and switch_root</title>
<para>Init kills all <command>udev</command> processes, cleans up the environment, sets up the arguments for the real <command>init</command> process and finally calls <command>switch_root</command>. <command>switch_root</command> removes the whole filesystem hierarchy of the initramfs, chroot()s to the real root device and calls <command>/sbin/init</command> with the specified arguments.</para>
<para>To ensure all files in the initramfs hierarchy can be removed, all processes still running from the initramfs should not have any open file descriptors left.</para>
</section>
</section>
<section>
<title>Network Infrastructure</title>
<para>
</para>
</section>
<section>
<title>Writing a Module</title>
<para>A simple example module is <filename>96insmodpost</filename>, which modprobes a kernel module after udev has settled and the basic device drivers have been loaded.</para>
<para>All module installation information is in the file module-setup.sh.</para>
<para>First we create a <function>check()</function> function, which just exits with <errorcode>0</errorcode> indicating that this module should be included by default.</para>
<para><function>check()</function>:</para>
<programlisting>return 0</programlisting>
<para>The we create the <function>install()</function> function, which installs a cmdline hook with priority number 20 called <filename>parse-insmodpost.sh</filename>. It also installs the <filename>insmodpost.sh</filename> script in <filename>/sbin</filename>.</para>
<para><function>install()</function>:</para>
<programlisting>inst_hook cmdline 20 &quot;$moddir/parse-insmodpost.sh&quot;
inst_simple &quot;$moddir/insmodpost.sh&quot; /sbin/insmodpost.sh</programlisting>
<para>The <filename>pase-instmodpost.sh</filename> parses the kernel command line for a argument <envar>rd.driver.post</envar>, blacklists the module from being autoloaded and installs the hook <filename>insmodpost.sh</filename> in the <filename>initqueue/settled</filename>.</para>
<para><filename>parse-insmodpost.sh</filename>:</para>
<programlisting>for p in $(getargs rd.driver.post=); do
echo &quot;blacklist $p&quot; &gt;&gt; /etc/modprobe.d/initramfsblacklist.conf
_do_insmodpost=1
done

[ -n &quot;$_do_insmodpost&quot; ] &amp;&amp; /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh
unset _do_insmodpost
</programlisting>
<para><filename>insmodpost.sh</filename>, which is called in the <filename>initqueue/settled</filename> hook will just modprobe the kernel modules specified in all <envar>rd.driver.post</envar> kernel command line parameters. It runs after <command>udev</command> has settled and is only called once (<parameter>--onetime</parameter>).</para>
<para><filename>insmodpost.sh</filename>:</para>
<programlisting>. /lib/dracut-lib.sh

for p in $(getargs rd.driver.post=); do
modprobe $p
done
</programlisting>
<section>
<title>check()</title>
<para><filename>
<function>check()</function>
</filename> is called by dracut to evaluate the inclusion of a dracut module in the initramfs.</para>
<variablelist>
<varlistentry>
<term> $hostonly</term>
<listitem>
<para>If the $hostonly variable is set, then the module check() function should be in &quot;hostonly&quot; mode, which means, that the check() should only return 0, if the module is really needed to boot this specific host.</para>
</listitem>
</varlistentry>
</variablelist>
<para><function>check()</function> should return with:</para>
<variablelist>
<varlistentry>
<term>0</term>
<listitem>
<para>Include the dracut module in the initramfs.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>1</term>
<listitem>
<para>Do not include the dracut module. The requirements are not fullfilled (missing tools, etc.)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>255</term>
<listitem>
<para>Only include the dracut module, if another module requires it or if explicitly specified in the config file or on the argument list.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>depends()</title>
<para>The function <function>depends()</function> should <function>echo</function> all other dracut module names the module depends on.</para>
</section>
<section>
<title>install()</title>
<para>dracut_install</para>
<para>inst</para>
<para>inst_hook</para>
<para>inst_rules</para>
<para/>
</section>
<section>
<title>installkernel()</title>
<para>instmods</para>
</section>
<section>
<title>Creation Functions</title>
<para>
</para>
</section>
<section>
<title>Initramfs Functions</title>
<para>
</para>
</section>
<section>
<title>Network Modules</title>
<para>
</para>
</section>
</section>
</chapter>
<appendix>
<title>Man Pages</title>
<section id="dracut.man">
<title>dracut</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dracut.8.xml" encoding="UTF-8" parse="xml"/>
</section>
<section id="dracut.conf">
<title>dracut.conf</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dracut.conf.5.xml" encoding="UTF-8" parse="xml"/>
</section>
<section id="dracut.cmdline">
<title>dracut.cmdline</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dracut.cmdline.7.xml" encoding="UTF-8" parse="xml"/>
</section>
</appendix>
</book>