|
|
18971c |
From 84fe197facb96947638c518639c0913ecad1599b Mon Sep 17 00:00:00 2001
|
|
|
18971c |
From: Harald Hoyer <harald@redhat.com>
|
|
|
18971c |
Date: Tue, 8 Oct 2013 14:59:47 +0200
|
|
|
18971c |
Subject: [PATCH] Doc: cleanup, extend and split and reuse
|
|
|
18971c |
|
|
|
18971c |
---
|
|
|
18971c |
Makefile | 8 +-
|
|
|
18971c |
dracut.8.asc | 61 +--
|
|
|
18971c |
dracut.asc | 888 +------------------------------------------
|
|
|
18971c |
dracut.cmdline.7.asc | 414 +++++++++++---------
|
|
|
18971c |
dracut.css | 434 +--------------------
|
|
|
18971c |
dracut.modules.7.asc | 293 ++++++++++++++
|
|
|
18971c |
dracut.spec | 1 +
|
|
|
18971c |
dracut.usage.asc | 526 +++++++++++++++++++++++++
|
|
|
18971c |
8 files changed, 1084 insertions(+), 1541 deletions(-)
|
|
|
18971c |
create mode 100644 dracut.modules.7.asc
|
|
|
18971c |
create mode 100644 dracut.usage.asc
|
|
|
18971c |
|
|
|
18971c |
diff --git a/Makefile b/Makefile
|
|
|
18971c |
index 124a41b1..e7da9484 100644
|
|
|
18971c |
--- a/Makefile
|
|
|
18971c |
+++ b/Makefile
|
|
|
18971c |
@@ -21,7 +21,8 @@ man1pages = lsinitrd.1
|
|
|
18971c |
man5pages = dracut.conf.5
|
|
|
18971c |
|
|
|
18971c |
man7pages = dracut.cmdline.7 \
|
|
|
18971c |
- dracut.bootup.7
|
|
|
18971c |
+ dracut.bootup.7 \
|
|
|
18971c |
+ dracut.modules.7
|
|
|
18971c |
|
|
|
18971c |
man8pages = dracut.8 \
|
|
|
18971c |
dracut-catimages.8 \
|
|
|
18971c |
@@ -37,7 +38,6 @@ man8pages = dracut.8 \
|
|
|
18971c |
|
|
|
18971c |
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
|
|
|
18971c |
|
|
|
18971c |
-
|
|
|
18971c |
.PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh
|
|
|
18971c |
|
|
|
18971c |
all: dracut-version.sh dracut-install
|
|
|
18971c |
@@ -76,7 +76,9 @@ endif
|
|
|
18971c |
%.xml: %.asc
|
|
|
18971c |
asciidoc -d manpage -b docbook -o $@ $<
|
|
|
18971c |
|
|
|
18971c |
-dracut.html: dracut.asc $(manpages) dracut.css
|
|
|
18971c |
+dracut.8: dracut.usage.asc dracut.8.asc
|
|
|
18971c |
+
|
|
|
18971c |
+dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc
|
|
|
18971c |
asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc
|
|
|
18971c |
xsltproc -o dracut.html --xinclude -nonet \
|
|
|
18971c |
--stringparam custom.css.source dracut.css \
|
|
|
18971c |
diff --git a/dracut.8.asc b/dracut.8.asc
|
|
|
18971c |
index 76fc75c4..584514c0 100644
|
|
|
18971c |
--- a/dracut.8.asc
|
|
|
18971c |
+++ b/dracut.8.asc
|
|
|
18971c |
@@ -10,7 +10,7 @@ dracut - low-level tool for generating an initramfs image
|
|
|
18971c |
|
|
|
18971c |
SYNOPSIS
|
|
|
18971c |
--------
|
|
|
18971c |
-*dracut* ['OPTION...'] [<image> [_<kernel version>_]]
|
|
|
18971c |
+*dracut* [__OPTION...__] [__<image>__ [__<kernel version>__]]
|
|
|
18971c |
|
|
|
18971c |
DESCRIPTION
|
|
|
18971c |
-----------
|
|
|
18971c |
@@ -37,53 +37,10 @@ Additional debugging info can be produced by adding **rd.debug** to the kernel c
|
|
|
18971c |
_/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools.
|
|
|
18971c |
It should be attached to any report about dracut problems.
|
|
|
18971c |
|
|
|
18971c |
-EXAMPLE
|
|
|
18971c |
--------
|
|
|
18971c |
-
|
|
|
18971c |
-To create a initramfs image, the most simple command is:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-This will generate a general purpose initramfs image, with all possible
|
|
|
18971c |
-functionality resulting of the combination of the installed dracut modules and
|
|
|
18971c |
-system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
|
|
|
18971c |
-contains the kernel modules of the currently active kernel with version
|
|
|
18971c |
-_++<kernel version>++_.
|
|
|
18971c |
-
|
|
|
18971c |
-If the initramfs image already exists, dracut will display an error message, and
|
|
|
18971c |
-to overwrite the existing image, you have to use the --force option.
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --force
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-If you want to specify another filename for the resulting image you would issue
|
|
|
18971c |
-a command like:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut foobar.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-To generate an image for a specific kernel version, the command would be:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut foobar.img 2.6.40-1.rc5.f20
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-A shortcut to generate the image at the default location for a specific kernel
|
|
|
18971c |
-version is:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --kver 2.6.40-1.rc5.f20
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-If you want to create lighter, smaller initramfs images, you may want to specify
|
|
|
18971c |
-the --hostonly or -H option. Using this option, the resulting image will
|
|
|
18971c |
-contain only those dracut modules, kernel modules and filesystems, which are
|
|
|
18971c |
-needed to boot this specific machine. This has the drawback, that you can't put
|
|
|
18971c |
-the disk on another controller or machine, and that you can't switch to another
|
|
|
18971c |
-root filesystem, without recreating the initramfs image. The usage of the
|
|
|
18971c |
---hostonly option is only for experts and you will have to keep the broken
|
|
|
18971c |
-pieces. At least keep a copy of a general purpose image (and corresponding
|
|
|
18971c |
-kernel) as a fallback to rescue your system.
|
|
|
18971c |
+USAGE
|
|
|
18971c |
+-----
|
|
|
18971c |
|
|
|
18971c |
+include::dracut.usage.asc[]
|
|
|
18971c |
|
|
|
18971c |
OPTIONS
|
|
|
18971c |
-------
|
|
|
18971c |
@@ -337,7 +294,7 @@ provide a valid _/etc/fstab_.
|
|
|
18971c |
**-N, --no-hostonly**::
|
|
|
18971c |
Disable Host-Only mode
|
|
|
18971c |
|
|
|
18971c |
-**--persistent-policy**Â _<policy>_::
|
|
|
18971c |
+**--persistent-policy** _<policy>_::
|
|
|
18971c |
Use _<policy>_ to address disks and partitions.
|
|
|
18971c |
_<policy>_ can be any directory name found in /dev/disk.
|
|
|
18971c |
E.g. "by-uuid", "by-label"
|
|
|
18971c |
@@ -345,7 +302,7 @@ provide a valid _/etc/fstab_.
|
|
|
18971c |
**--fstab**::
|
|
|
18971c |
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
|
|
|
18971c |
|
|
|
18971c |
-**--add-fstab**Â _<filename>_Â ::
|
|
|
18971c |
+**--add-fstab** _<filename>_::
|
|
|
18971c |
Add entries of _<filename>_ to the initramfs /etc/fstab.
|
|
|
18971c |
|
|
|
18971c |
**--mount**Â "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
|
|
|
18971c |
@@ -358,13 +315,13 @@ provide a valid _/etc/fstab_.
|
|
|
18971c |
LVM or an encrypted partition.
|
|
|
18971c |
[NB --device can be used for compatibility with earlier releases]
|
|
|
18971c |
|
|
|
18971c |
-**-i, --include**Â _<SOURCE>_Â _<TARGET>_::
|
|
|
18971c |
+**-i, --include** _<SOURCE>_ _<TARGET>_::
|
|
|
18971c |
include the files in the SOURCE directory into the
|
|
|
18971c |
TARGET directory in the final initramfs. If SOURCE is a file, it will be
|
|
|
18971c |
installed to TARGET in the final initramfs. This parameter can be specified
|
|
|
18971c |
multiple times.
|
|
|
18971c |
|
|
|
18971c |
-**-I, --install**Â _<file list>_::
|
|
|
18971c |
+**-I, --install** _<file list>_::
|
|
|
18971c |
install the space separated list of files into the initramfs.
|
|
|
18971c |
+
|
|
|
18971c |
[NOTE]
|
|
|
18971c |
@@ -481,7 +438,7 @@ _/etc/conf.d/_::
|
|
|
18971c |
_/etc/cmdline_::
|
|
|
18971c |
Can contain additional command line options. Deprecated, better use /etc/cmdline.d/*.conf.
|
|
|
18971c |
|
|
|
18971c |
-_/etc/cmdline.d/*.conf::
|
|
|
18971c |
+_/etc/cmdline.d/*.conf_::
|
|
|
18971c |
Can contain additional command line options.
|
|
|
18971c |
|
|
|
18971c |
AVAILABILITY
|
|
|
18971c |
diff --git a/dracut.asc b/dracut.asc
|
|
|
18971c |
index c0116581..031b2014 100644
|
|
|
18971c |
--- a/dracut.asc
|
|
|
18971c |
+++ b/dracut.asc
|
|
|
18971c |
@@ -1,7 +1,7 @@
|
|
|
18971c |
dracut
|
|
|
18971c |
======
|
|
|
18971c |
Harald Hoyer <harald@redhat.com>
|
|
|
18971c |
-v2.0, March 2011
|
|
|
18971c |
+v3.0, October 2013
|
|
|
18971c |
|
|
|
18971c |
:language: bash
|
|
|
18971c |
|
|
|
18971c |
@@ -145,885 +145,10 @@ This ensures, that all devices are disassembled and unmounted cleanly.
|
|
|
18971c |
|
|
|
18971c |
= User Manual
|
|
|
18971c |
|
|
|
18971c |
-== Creating an initramfs Image
|
|
|
18971c |
-To create a initramfs image, the most simple command is:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-This will generate a general purpose initramfs image, with all possible
|
|
|
18971c |
-functionality resulting of the combination of the installed dracut modules and
|
|
|
18971c |
-system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
|
|
|
18971c |
-contains the kernel modules of the currently active kernel with version
|
|
|
18971c |
-_++<kernel version>++_.
|
|
|
18971c |
-
|
|
|
18971c |
-If the initramfs image already exists, dracut will display an error message, and
|
|
|
18971c |
-to overwrite the existing image, you have to use the --force option.
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --force
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-If you want to specify another filename for the resulting image you would issue
|
|
|
18971c |
-a command like:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut foobar.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-To generate an image for a specific kernel version, the command would be:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut foobar.img 2.6.40-1.rc5.f20
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-A shortcut to generate the image at the default location for a specific kernel
|
|
|
18971c |
-version is:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --kver 2.6.40-1.rc5.f20
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-If you want to create lighter, smaller initramfs images, you may want to specify
|
|
|
18971c |
-the --host-only or -H option. Using this option, the resulting image will
|
|
|
18971c |
-contain only those dracut modules, kernel modules and filesystems, which are
|
|
|
18971c |
-needed to boot this specific machine. This has the drawback, that you can't put
|
|
|
18971c |
-the disk on another controller or machine, and that you can't switch to another
|
|
|
18971c |
-root filesystem, without recreating the initramfs image. The usage of the
|
|
|
18971c |
---host-only option is only for experts and you will have to keep the broken
|
|
|
18971c |
-pieces. At least keep a copy of a general purpose image (and corresponding
|
|
|
18971c |
-kernel) as a fallback to rescue your system.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Inspecting the Contents
|
|
|
18971c |
-To see the contents of the image created by dracut, you can use the lsinitrd tool.
|
|
|
18971c |
-----
|
|
|
18971c |
-# lsinitrd /boot/initramfs-$(uname -r).img | less
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-To display the contents of a file in the initramfs also use the lsinitrd tool:
|
|
|
18971c |
-----
|
|
|
18971c |
-# lsinitrd /boot/initramfs-$(uname -r).img /etc/ld.so.conf
|
|
|
18971c |
-include ld.so.conf.d/*.conf
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-=== Adding dracut Modules
|
|
|
18971c |
-Some dracut modules are turned off by default and have to be activated manually.
|
|
|
18971c |
-You can do this by adding the dracut modules to the configuration file
|
|
|
18971c |
-_/etc/dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_. See <<dracutconf5>>.
|
|
|
18971c |
-You can also add dracut modules on the command line
|
|
|
18971c |
-by using the -a or --add option:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --add bootchart initramfs-bootchart.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-To see a list of available dracut modules, use the --list-modules option:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --list-modules
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-or, if you have a dracut version earlier than +008+, issue the command:
|
|
|
18971c |
-----
|
|
|
18971c |
-# for mod in /usr/lib/dracut/modules.d/*; do echo ${mod##*/??}; done
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-=== Omitting dracut Modules
|
|
|
18971c |
-Sometimes you don't want a dracut module to be included for reasons of speed,
|
|
|
18971c |
-size or functionality. To do this, either specify the omit_dracutmodules
|
|
|
18971c |
-variable in the _dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_ configuration
|
|
|
18971c |
-file (see <<dracutconf5>>), or use the -o or --omit option
|
|
|
18971c |
-on the command line:
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut -o "multipath lvm" no-multipath-lvm.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-=== Adding Kernel Modules
|
|
|
18971c |
-If you need a special kernel module in the initramfs, which is not
|
|
|
18971c |
-automatically picked up by dracut, you have the use the --add-drivers option
|
|
|
18971c |
-on the command line or the drivers vaiable in the _/etc/dracut.conf_
|
|
|
18971c |
-or _/etc/dracut.conf.d/myconf.conf_ configuration file (see <<dracutconf5>>):
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --add-drivers mymod initramfs-with-mymod.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-== Boot parameters
|
|
|
18971c |
-The generated initramfs.img file normally does not contain any system
|
|
|
18971c |
-configuration files (except for some special exceptions), so the configuration
|
|
|
18971c |
-has to be done on the kernel command line. With this flexibility, you can easily
|
|
|
18971c |
-boot from a changed root partition, without the need to recompile the initramfs
|
|
|
18971c |
-image. So, you could completly change your root partition (move it inside a md
|
|
|
18971c |
-raid with encryption and LVM on top), as long as you specify the correct
|
|
|
18971c |
-filesystem LABEL or UUID on the kernel command line for your root device, dracut
|
|
|
18971c |
-will find it and boot from it.
|
|
|
18971c |
-
|
|
|
18971c |
-The kernel command line usually can be configured in _/boot/grub/grub.conf_, if
|
|
|
18971c |
-grub is your bootloader and it also can be edited in the real boot process in
|
|
|
18971c |
-the grub menu.
|
|
|
18971c |
-
|
|
|
18971c |
-The kernel command line can also be provided by the dhcp server with the
|
|
|
18971c |
-root-path option. See <<NetworkBoot>>.
|
|
|
18971c |
-
|
|
|
18971c |
-For a full reference of all kernel command line parameters, see <<dracut8>>.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Specifying the root Device
|
|
|
18971c |
-This is the only option dracut really needs to boot from your root partition.
|
|
|
18971c |
-Because your root partition can live in various environments, there are a lot of
|
|
|
18971c |
-formats for the root= option. The most basic one is root=_++
|
|
|
18971c |
-node>++_:
|
|
|
18971c |
-----
|
|
|
18971c |
-root=/dev/sda2
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-Because device node names can change, dependent on the drive ordering, you are
|
|
|
18971c |
-encouraged to use the filesystem identifier (UUID) or filesystem label (LABEL)
|
|
|
18971c |
-to specify your root partition:
|
|
|
18971c |
-----
|
|
|
18971c |
-root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-or
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-root=LABEL=myrootpartitionlabel
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-To see all UUIDs or LABELs on your system, do:
|
|
|
18971c |
-----
|
|
|
18971c |
-# ls -l /dev/disk/by-uuid
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-or
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-# ls -l /dev/disk/by-label
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-If your root partition is on the network see <<NetworkBoot>>.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Keyboard Settings
|
|
|
18971c |
-If you have to input passwords for encrypted disk volumes, you might want to set
|
|
|
18971c |
-the keyboard layout and specify a display font.
|
|
|
18971c |
-
|
|
|
18971c |
-A typical german kernel command would contain:
|
|
|
18971c |
-----
|
|
|
18971c |
-vconsole.font=latarcyrheb-sun16 vconsole.keymap=de-latin1-nodeadkeys locale.LANG=de_DE.UTF-8
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-Setting these options can override the setting stored on your system, if you use
|
|
|
18971c |
-a modern init system, like systemd.
|
|
|
18971c |
-
|
|
|
18971c |
-For dracut versions prior to version +008+ the line would look like:
|
|
|
18971c |
-----
|
|
|
18971c |
-LANG=de_DE.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-=== Blacklisting Kernel Modules
|
|
|
18971c |
-Sometimes it is required to prevent the automatic kernel module loading of a
|
|
|
18971c |
-specific kernel module. To do this, just add rd.blacklist=_++
|
|
|
18971c |
-name>++_, with _++<kernel module name>++_ not containing the _.ko_
|
|
|
18971c |
-suffix, to the kernel command line. For example:
|
|
|
18971c |
-----
|
|
|
18971c |
-rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-The option can be specified multiple times on the kernel command line.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Speeding up the Boot Process
|
|
|
18971c |
-If you want to speed up the boot process, you can specify as much information
|
|
|
18971c |
-for dracut on the kernel command as possible. For example, you can tell dracut,
|
|
|
18971c |
-that you root partition is not on a LVM volume or not on a raid partition, or
|
|
|
18971c |
-that it lives inside a specific crypto LUKS encrypted volume. By default, dracut
|
|
|
18971c |
-searches everywhere. A typical dracut kernel command line for a plain primary or
|
|
|
18971c |
-logical partition would contain:
|
|
|
18971c |
-----
|
|
|
18971c |
-rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-On systems with dracut version prior to +008+ the line would look like:
|
|
|
18971c |
-----
|
|
|
18971c |
-rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-This turns off every automatic assembly of LVM, MD raids, DM raids and crypto LUKS.
|
|
|
18971c |
-
|
|
|
18971c |
-Of course, you could also omit the dracut modules in the initramfs creation
|
|
|
18971c |
-process, but then you would lose the posibility to turn it on on demand.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-[[Injecting]]
|
|
|
18971c |
-=== Injecting custom Files
|
|
|
18971c |
-To add your own files to the initramfs image, you have several possibilities.
|
|
|
18971c |
-
|
|
|
18971c |
-The --include option let you specify a source path and a target path. For example
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img
|
|
|
18971c |
-----
|
|
|
18971c |
-will create an initramfs image, where the file cmdline-preset will be copied
|
|
|
18971c |
-inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only be specified once.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-# mkdir rd.live.overlay
|
|
|
18971c |
-# mkdir rd.live.overlay/etc
|
|
|
18971c |
-# mkdir rd.live.overlay/etc/conf.d
|
|
|
18971c |
-# mkdir rd.live.overlay/etc/cmdline.d
|
|
|
18971c |
-# echo "ip=auto" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf
|
|
|
18971c |
-# echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
|
|
|
18971c |
-# echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
|
|
|
18971c |
-# tree rd.live.overlay/
|
|
|
18971c |
-rd.live.overlay/
|
|
|
18971c |
-└── etc
|
|
|
18971c |
- ├── cmdline.d
|
|
|
18971c |
- │  └── mycmdline.conf
|
|
|
18971c |
- └── conf.d
|
|
|
18971c |
- └── testvar.conf
|
|
|
18971c |
-
|
|
|
18971c |
-# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-This will put the contents of the rd.live.overlay directory into the root of the
|
|
|
18971c |
-initramfs image.
|
|
|
18971c |
-
|
|
|
18971c |
-The --install option let you specify several files, which will get installed in
|
|
|
18971c |
-the initramfs image at the same location, as they are present on initramfs
|
|
|
18971c |
-creation time.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-This will create an initramfs with the strace, fsck.ext3 and ssh executables,
|
|
|
18971c |
-together with the libraries needed to start those. The --install option can be
|
|
|
18971c |
-specified multiple times.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-[[NetworkBoot]]
|
|
|
18971c |
-== Network Boot
|
|
|
18971c |
-
|
|
|
18971c |
-If your root partition is on a network drive, you have to have the network
|
|
|
18971c |
-dracut modules installed to create a network aware initramfs image.
|
|
|
18971c |
-
|
|
|
18971c |
-On a Red Hat Enterprise Linux or Fedora system, this means, you have to install
|
|
|
18971c |
-the _dracut-network_ rpm package:
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-# yum install dracut-network
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-The resulting initramfs image can be served by a boot manager residing on your
|
|
|
18971c |
-local hard drive or it can be served by a PXE/TFTP server.
|
|
|
18971c |
-
|
|
|
18971c |
-How to setup your PXE/TFTP server can be found in the
|
|
|
18971c |
-http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red
|
|
|
18971c |
-Hat Enterprise Linux Storage Administration Guide].
|
|
|
18971c |
-
|
|
|
18971c |
-If you specify ip=auto on the kernel command line, then dracut asks a dhcp
|
|
|
18971c |
-server about the ip adress for the machine. The dhcp server can also serve an
|
|
|
18971c |
-additional root-path, which will set the root device for dracut. With this
|
|
|
18971c |
-mechanism, you have static configuration on your client machine and a
|
|
|
18971c |
-centralized boot configuration on your TFTP/DHCP server. If you can't pass a
|
|
|
18971c |
-kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a method described
|
|
|
18971c |
-in <<Injecting>>.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== Reducing the Image Size
|
|
|
18971c |
-
|
|
|
18971c |
-To reduce the size of the initramfs, you should create it with by ommitting all
|
|
|
18971c |
-dracut modules, which you know, you don't need to boot the machine.
|
|
|
18971c |
-
|
|
|
18971c |
-You can also specify the exact dracut and kernel modules to produce a very tiny
|
|
|
18971c |
-initramfs image.
|
|
|
18971c |
-
|
|
|
18971c |
-For example for a NFS image, you would do:
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut -m "nfs network base" initramfs-nfs-only.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-Then you would boot from this image with your target machine and reduce the size
|
|
|
18971c |
-once more by creating it on the target machine with the --host-only option:
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-# dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-This will reduce the size of the initramfs image significantly.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== NFS Root Device
|
|
|
18971c |
-
|
|
|
18971c |
-FIXME
|
|
|
18971c |
-
|
|
|
18971c |
-=== iSCSI Root Device
|
|
|
18971c |
-
|
|
|
18971c |
-FIXME
|
|
|
18971c |
-
|
|
|
18971c |
-=== FCoE Root Device
|
|
|
18971c |
-
|
|
|
18971c |
-FIXME
|
|
|
18971c |
-
|
|
|
18971c |
-== Troubleshooting
|
|
|
18971c |
-
|
|
|
18971c |
-If the boot process does not succeed, you have several options to debug the
|
|
|
18971c |
-situation. Some of the basic operations are covered here. For more information
|
|
|
18971c |
-you should also visit:
|
|
|
18971c |
-http://fedoraproject.org/wiki/How_to_debug_Dracut_problems
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-[[identifying-your-problem-area]]
|
|
|
18971c |
-=== Identifying your problem area
|
|
|
18971c |
-. Remove ''rhgb'' and ''quiet'' from the kernel command line
|
|
|
18971c |
-. Add ''rd.shell'' to the kernel command line. This will present a shell should
|
|
|
18971c |
-dracut be unable to locate your root device
|
|
|
18971c |
-. Add ''rd.shell rd.debug log_buf_len=1M'' to the kernel command line so that
|
|
|
18971c |
-dracut shell commands are printed as they are executed
|
|
|
18971c |
-. With dracut >= 002-11, you can inspect the rd.debug output with:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# less /run/initramfs/init.log
|
|
|
18971c |
-# dmesg | less
|
|
|
18971c |
-----
|
|
|
18971c |
-. With dracut >= 022 and systemd, you can inspect the rd.debug output with:
|
|
|
18971c |
-----
|
|
|
18971c |
-# journalctl -ab
|
|
|
18971c |
-----
|
|
|
18971c |
-. With dracut >= 025 the file /run/initramfs/rdsosreport.txt is generated, which contains all the logs and the output of all significant tools, which are mentioned later.
|
|
|
18971c |
-
|
|
|
18971c |
-If you want to save that output, simply mount /boot by hand or insert an USB stick and mount that.
|
|
|
18971c |
-Then you can store the output for later inspection.
|
|
|
18971c |
-
|
|
|
18971c |
-[[information-to-include-in-your-report]]
|
|
|
18971c |
-=== Information to include in your report
|
|
|
18971c |
-
|
|
|
18971c |
-[[all-bug-reports]]
|
|
|
18971c |
-==== All bug reports
|
|
|
18971c |
-In all cases, the following should be mentioned and attached to your bug report:
|
|
|
18971c |
-
|
|
|
18971c |
-* The exact kernel command-line used. Typically from the bootloader
|
|
|
18971c |
-configuration file (e.g. _/etc/grub.conf_) or from _/proc/cmdline_.
|
|
|
18971c |
-* A copy of your disk partition information from _/etc/fstab_, which might be
|
|
|
18971c |
-obtained booting an old working initramfs or a rescue medium.
|
|
|
18971c |
-* A device listing from device-mapper. This can be obtained by running the
|
|
|
18971c |
-command
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# dmsetup ls --tree
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-* A list of block device attributes. This can be obtained by running the commands:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# blkid -p
|
|
|
18971c |
-# blkid -p -o udev
|
|
|
18971c |
-----
|
|
|
18971c |
-* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach
|
|
|
18971c |
-all relevant information from the boot log. This can be obtained by running the
|
|
|
18971c |
-command
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# dmesg|grep dracut
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-* If you use a dracut configuration file, please include _/etc/dracut.conf_ and
|
|
|
18971c |
-all files in _/etc/dracut.conf.d/*.conf_
|
|
|
18971c |
-
|
|
|
18971c |
-[[logical-volume-management-related-problems]]
|
|
|
18971c |
-==== Logical Volume Management related problems
|
|
|
18971c |
-As well as the information from <<all-bug-reports>> include the following
|
|
|
18971c |
-information:
|
|
|
18971c |
-
|
|
|
18971c |
-* Include physical volume information by running the command:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# lvm pvdisplay
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-* Include volume group information by running the command:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# lvm vgdisplay
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-* Include logical volume information by running the command:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# lvm lvdisplay
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-[[software-raid-related-problems]]
|
|
|
18971c |
-==== Software RAID related problems
|
|
|
18971c |
-As well as the information from <<all-bug-reports>>, include the following
|
|
|
18971c |
-information:
|
|
|
18971c |
-
|
|
|
18971c |
-* If using software RAID disk partitions, please include the output of
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# cat /proc/mdstat
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-[[network-root-device-related-problems]]
|
|
|
18971c |
-==== Network root device related problems
|
|
|
18971c |
-This section details information to include when experiencing problems on a
|
|
|
18971c |
-system whose root device is located on a network attached volume (e.g. iSCSI,
|
|
|
18971c |
-NFS or NBD). As well as the information from <<all-bug-reports>>, include the
|
|
|
18971c |
-following information:
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-* Please include the output of
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# /sbin/ifup <interfacename>
|
|
|
18971c |
-# ip addr show
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-[[debugging-dracut]]
|
|
|
18971c |
-=== Debugging dracut
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-[[configure-a-serial-console]]
|
|
|
18971c |
-==== Configure a serial console
|
|
|
18971c |
-
|
|
|
18971c |
-Successfully debugging dracut will require some form of console
|
|
|
18971c |
-logging during the system boot. This section documents configuring a
|
|
|
18971c |
-serial console connection to record boot messages.
|
|
|
18971c |
-
|
|
|
18971c |
-. First, enable serial console output for both the kernel and the bootloader.
|
|
|
18971c |
-. Open the file _/etc/grub.conf_ for editing. Below the line ''timeout=5'', add
|
|
|
18971c |
-the following:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-serial --unit=0 --speed=9600
|
|
|
18971c |
-terminal --timeout=5 serial console
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. Also in _/etc/grub.conf_, add the following boot arguemnts to the ''kernel''
|
|
|
18971c |
-line:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-console=tty0 console=ttyS0,9600
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. When finished, the _/etc/grub.conf_ file should look similar to the example
|
|
|
18971c |
-below.
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-default=0
|
|
|
18971c |
-timeout=5
|
|
|
18971c |
-serial --unit=0 --speed=9600
|
|
|
18971c |
-terminal --timeout=5 serial console
|
|
|
18971c |
-title Fedora (2.6.29.5-191.fc11.x86_64)
|
|
|
18971c |
- root (hd0,0)
|
|
|
18971c |
- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
|
|
|
18971c |
- initrd /dracut-2.6.29.5-191.fc11.x86_64.img
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. More detailed information on how to configure the kernel for console output
|
|
|
18971c |
-can be found at
|
|
|
18971c |
-http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL.
|
|
|
18971c |
-. Redirecting non-interactive output
|
|
|
18971c |
-+
|
|
|
18971c |
---
|
|
|
18971c |
-NOTE: You can redirect all non-interactive output to _/dev/kmsg_ and the kernel
|
|
|
18971c |
-will put it out on the console when it reaches the kernel buffer by doing
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-# exec >/dev/kmsg 2>&1
|
|
|
18971c |
-----
|
|
|
18971c |
---
|
|
|
18971c |
-
|
|
|
18971c |
-[[using-the-dracut-shell]]
|
|
|
18971c |
-==== Using the dracut shell
|
|
|
18971c |
-
|
|
|
18971c |
-dracut offers a shell for interactive debugging in the event dracut fails to
|
|
|
18971c |
-locate your root filesystem. To enable the shell:
|
|
|
18971c |
-
|
|
|
18971c |
-. Add the boot parameter ''rd.shell'' to your bootloader configuration file
|
|
|
18971c |
-(e.g. _/etc/grub.conf_)
|
|
|
18971c |
-. Remove the boot arguments ''rhgb'' and ''quiet''
|
|
|
18971c |
-+
|
|
|
18971c |
-A sample _/etc/grub.conf_ bootloader configuration file is listed below.
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-default=0
|
|
|
18971c |
-timeout=5
|
|
|
18971c |
-serial --unit=0 --speed=9600
|
|
|
18971c |
-terminal --timeout=5 serial console
|
|
|
18971c |
-title Fedora (2.6.29.5-191.fc11.x86_64)
|
|
|
18971c |
- root (hd0,0)
|
|
|
18971c |
- kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
|
|
|
18971c |
- initrd /dracut-2.6.29.5-191.fc11.x86_64.img
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. If system boot fails, you will be dropped into a shell as seen in the example below.
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-No root device found
|
|
|
18971c |
-Dropping to debug shell.
|
|
|
18971c |
-
|
|
|
18971c |
-#
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. Use this shell prompt to gather the information requested above (see <<all-bug-reports>>).
|
|
|
18971c |
-
|
|
|
18971c |
-[[accessing-the-root-volume-from-the-dracut-shell]]
|
|
|
18971c |
-==== Accessing the root volume from the dracut shell
|
|
|
18971c |
-From the dracut debug shell, you can manually perform the task of locating and
|
|
|
18971c |
-preparing your root volume for boot. The required steps will depend on how your
|
|
|
18971c |
-root volume is configured. Common scenarios include:
|
|
|
18971c |
-
|
|
|
18971c |
-* A block device (e.g. _/dev/sda7_)
|
|
|
18971c |
-* A LVM logical volume (e.g. _/dev/VolGroup00/LogVol00_)
|
|
|
18971c |
-* An encrypted device (e.g. _/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83_)
|
|
|
18971c |
-* A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all)
|
|
|
18971c |
-
|
|
|
18971c |
-The exact method for locating and preparing will vary. However, to continue with
|
|
|
18971c |
-a successful boot, the objective is to locate your root volume and create a
|
|
|
18971c |
-symlink _/dev/root_ which points to the file system. For example, the following
|
|
|
18971c |
-example demonstrates accessing and booting a root volume that is an encrypted
|
|
|
18971c |
-LVM Logical volume.
|
|
|
18971c |
-
|
|
|
18971c |
-. Inspect your partitions using parted
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# parted /dev/sda -s p
|
|
|
18971c |
-Model: ATA HTS541060G9AT00 (scsi)
|
|
|
18971c |
-Disk /dev/sda: 60.0GB
|
|
|
18971c |
-Sector size (logical/physical): 512B/512B
|
|
|
18971c |
-Partition Table: msdos
|
|
|
18971c |
-Number Start End Size Type File system Flags
|
|
|
18971c |
-1 32.3kB 10.8GB 107MB primary ext4 boot
|
|
|
18971c |
-2 10.8GB 55.6GB 44.7GB logical lvm
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. You recall that your root volume was a LVM logical volume. Scan and activate
|
|
|
18971c |
-any logical volumes.
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# lvm vgscan
|
|
|
18971c |
-# lvm vgchange -ay
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. You should see any logical volumes now using the command blkid:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# blkid
|
|
|
18971c |
-/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
|
|
|
18971c |
-/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
|
|
|
18971c |
-/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
|
|
|
18971c |
-/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
|
|
|
18971c |
-/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. From the output above, you recall that your root volume exists on an encrypted
|
|
|
18971c |
-block device. Following the guidance disk encryption guidance from the
|
|
|
18971c |
-Installation Guide, you unlock your encrypted root volume.
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
|
|
|
18971c |
-# cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
|
|
|
18971c |
-Enter passphrase for /dev/mapper/linux-root:
|
|
|
18971c |
-Key slot 0 unlocked.
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. Next, make a symbolic link to the unlocked root volume
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# ln -s /dev/mapper/luks-$UUID /dev/root
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-. With the root volume available, you may continue booting the system by exiting
|
|
|
18971c |
-the dracut shell
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
-# exit
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-[[additional-dracut-boot-parameters]]
|
|
|
18971c |
-==== Additional dracut boot parameters
|
|
|
18971c |
-For more debugging options, see <<dracutkerneldebug>> in <<dracutcmdline7>>.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-[[debugging-dracut-on-shutdown]]
|
|
|
18971c |
-==== Debugging dracut on shutdown
|
|
|
18971c |
-
|
|
|
18971c |
-To debug the shutdown sequence on systemd systems, you can _rd.break_
|
|
|
18971c |
-on _pre-shutdown_ or _shutdown_.
|
|
|
18971c |
-
|
|
|
18971c |
-To do this from an already booted system:
|
|
|
18971c |
-----
|
|
|
18971c |
-# mkdir -p /run/initramfs/etc/cmdline.d
|
|
|
18971c |
-# echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
|
|
|
18971c |
-# touch /run/initramfs/.need_shutdown
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-This will give you a dracut shell after the system pivot'ed back in the initramfs.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-= Developer Manual
|
|
|
18971c |
-
|
|
|
18971c |
-== dracut Components
|
|
|
18971c |
-
|
|
|
18971c |
-dracut uses a modular system to build and extend the initramfs image. All
|
|
|
18971c |
-modules are located in _/usr/lib/dracut/modules.d_ or in _<git-src>/modules.d_.
|
|
|
18971c |
-The most basic dracut module is _99base_. In _99base_ the initial shell script
|
|
|
18971c |
-init is defined, which gets run by the kernel after initramfs loading. Although
|
|
|
18971c |
-you can replace init with your own version of _99base_, this is not encouraged.
|
|
|
18971c |
-Instead you should use, if possible, the hooks of dracut. All hooks, and the
|
|
|
18971c |
-point of time in which they are executed, are described in <<stages>>.
|
|
|
18971c |
-
|
|
|
18971c |
-The main script, which creates the initramfs is dracut itsself. It parses all
|
|
|
18971c |
-arguments and sets up the directory, in which everything is installed. It then
|
|
|
18971c |
-executes all check, install, installkernel scripts found in the modules, which
|
|
|
18971c |
-are to be processed. After everything is installed, the install directory is
|
|
|
18971c |
-archived and compressed to the final initramfs image. All helper functions used
|
|
|
18971c |
-by check, install and installkernel are found in in the file _dracut-functions_.
|
|
|
18971c |
-These shell functions are available to all module installer (install,
|
|
|
18971c |
-installkernel) scripts, without the need to source _dracut-functions_.
|
|
|
18971c |
-
|
|
|
18971c |
-A module can check the preconditions for install and installkernel with the
|
|
|
18971c |
-check script. Also dependencies can be expressed with check. If a module passed
|
|
|
18971c |
-check, install and installkernel will be called to install all of the necessary
|
|
|
18971c |
-files for the module. To split between kernel and non-kernel parts of the
|
|
|
18971c |
-installation, all kernel module related parts have to be in installkernel. All
|
|
|
18971c |
-other files found in a module directory are module specific and mostly are hook
|
|
|
18971c |
-scripts and udev rules.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-[[stages]]
|
|
|
18971c |
-== Boot Process Stages
|
|
|
18971c |
-
|
|
|
18971c |
-dracut modules can insert custom script at various points, to control the boot
|
|
|
18971c |
-process.
|
|
|
18971c |
-These hooks are plain directories containing shell scripts ending with ".sh",
|
|
|
18971c |
-which are sourced by init.
|
|
|
18971c |
-Common used functions are in _dracut-lib.sh_, which can be sourced by any script.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Hook: cmdline
|
|
|
18971c |
-
|
|
|
18971c |
-The _cmdline_ hook is a place to insert scripts to parse the kernel command line
|
|
|
18971c |
-and prepare the later actions, like setting up udev rules and configuration
|
|
|
18971c |
-files.
|
|
|
18971c |
-
|
|
|
18971c |
-In this hook the most important environment variable is defined: root. The
|
|
|
18971c |
-second one is rootok, which indicates, that a module claimed to be able to parse
|
|
|
18971c |
-the root defined. So for example, **root=**__iscsi:....__ will be claimed by the
|
|
|
18971c |
-iscsi dracut module, which then sets rootok.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Hook: pre-udev
|
|
|
18971c |
-
|
|
|
18971c |
-This hook is executed right after the cmdline hook and a check if root and
|
|
|
18971c |
-rootok were set. Here modules can take action with the final root, and before
|
|
|
18971c |
-udev has been run.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Start Udev
|
|
|
18971c |
-
|
|
|
18971c |
-Now udev is started and the logging for udev is setup.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Hook: pre-trigger
|
|
|
18971c |
-
|
|
|
18971c |
-In this hook, you can set udev environment variables with **udevadm control
|
|
|
18971c |
---property=KEY=_value_** or control the further execution of udev with
|
|
|
18971c |
-udevadm.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Trigger Udev
|
|
|
18971c |
-
|
|
|
18971c |
-udev is triggered by calling udevadm trigger, which sends add events for all
|
|
|
18971c |
-devices and subsystems.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Main Loop
|
|
|
18971c |
-
|
|
|
18971c |
-In the main loop of dracut loops until udev has settled and
|
|
|
18971c |
-all scripts in _initqueue/finished_ returned true.
|
|
|
18971c |
-In this loop there are three hooks, where scripts can be inserted
|
|
|
18971c |
-by calling /sbin/initqueue.
|
|
|
18971c |
-
|
|
|
18971c |
-==== Initqueue
|
|
|
18971c |
-
|
|
|
18971c |
-This hook gets executed every time a script is inserted here, regardless of the
|
|
|
18971c |
-udev state.
|
|
|
18971c |
-
|
|
|
18971c |
-==== Initqueue settled
|
|
|
18971c |
-
|
|
|
18971c |
-This hooks (initqueue/settled) gets executed every time udev has settled.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-==== Initqueue timeout
|
|
|
18971c |
-
|
|
|
18971c |
-This hooks (initqueue/timeout) gets executed, when the main loop counter becomes half of the
|
|
|
18971c |
-rd.retry counter.
|
|
|
18971c |
-
|
|
|
18971c |
-==== Initqueue finished
|
|
|
18971c |
-
|
|
|
18971c |
-This hook (initqueue/finished) is called after udev has settled and
|
|
|
18971c |
-if all scripts herein return 0 the main loop will be ended.
|
|
|
18971c |
-Abritary scripts can be added here, to loop in the
|
|
|
18971c |
-initqueue until something happens, which a dracut module wants to wait for.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Hook: pre-mount
|
|
|
18971c |
-
|
|
|
18971c |
-Before the root device is mounted all scripts in the hook pre-mount are
|
|
|
18971c |
-executed. In some cases (e.g. NFS) the real root device is already mounted,
|
|
|
18971c |
-though.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Hook: mount
|
|
|
18971c |
-
|
|
|
18971c |
-This hook is mainly to mount the real root device.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Hook: pre-pivot
|
|
|
18971c |
-
|
|
|
18971c |
-This hook is called before cleanup hook, This is a good place for
|
|
|
18971c |
-actions other than cleanups which need to be called before pivot.
|
|
|
18971c |
-
|
|
|
18971c |
-=== Hook: cleanup
|
|
|
18971c |
-
|
|
|
18971c |
-This hook is the last hook and is called before init finally switches root to
|
|
|
18971c |
-the real root device. This is a good place to clean up and kill processes not
|
|
|
18971c |
-needed anymore.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== Cleanup and switch_root
|
|
|
18971c |
-
|
|
|
18971c |
-Init (or systemd) kills all udev processes, cleans up the environment,
|
|
|
18971c |
-sets up the arguments for the real init process and finally calls switch_root.
|
|
|
18971c |
-switch_root removes the whole filesystem hierarchy of the initramfs,
|
|
|
18971c |
-chroot()s to the real root device and calls /sbin/init with the specified arguments.
|
|
|
18971c |
-
|
|
|
18971c |
-To ensure all files in the initramfs hierarchy can be removed, all processes
|
|
|
18971c |
-still running from the initramfs should not have any open file descriptors left.
|
|
|
18971c |
-
|
|
|
18971c |
-== Network Infrastructure
|
|
|
18971c |
-
|
|
|
18971c |
-FIXME
|
|
|
18971c |
-
|
|
|
18971c |
-== Writing a Module
|
|
|
18971c |
-
|
|
|
18971c |
-A simple example module is _96insmodpost_, which modprobes a kernel module after
|
|
|
18971c |
-udev has settled and the basic device drivers have been loaded.
|
|
|
18971c |
-
|
|
|
18971c |
-All module installation information is in the file module-setup.sh.
|
|
|
18971c |
-
|
|
|
18971c |
-First we create a check() function, which just exits with 0 indicating that this
|
|
|
18971c |
-module should be included by default.
|
|
|
18971c |
-
|
|
|
18971c |
-check():
|
|
|
18971c |
-----
|
|
|
18971c |
-return 0
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-The we create the install() function, which installs a cmdline hook with
|
|
|
18971c |
-priority number 20 called _parse-insmodpost.sh_. It also installs the
|
|
|
18971c |
-_insmodpost.sh_ script in _/sbin_.
|
|
|
18971c |
-
|
|
|
18971c |
-install():
|
|
|
18971c |
-----
|
|
|
18971c |
-inst_hook cmdline 20 "$moddir/parse-insmodpost.sh"
|
|
|
18971c |
-inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-The _pase-instmodpost.sh_ parses the kernel command line for a argument
|
|
|
18971c |
-rd.driver.post, blacklists the module from being autoloaded and installs the
|
|
|
18971c |
-hook _insmodpost.sh_ in the _initqueue/settled_.
|
|
|
18971c |
-
|
|
|
18971c |
-_parse-insmodpost.sh_:
|
|
|
18971c |
-----
|
|
|
18971c |
-for p in $(getargs rd.driver.post=); do
|
|
|
18971c |
- echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
|
|
|
18971c |
- _do_insmodpost=1
|
|
|
18971c |
-done
|
|
|
18971c |
-
|
|
|
18971c |
-[ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh
|
|
|
18971c |
-unset _do_insmodpost
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-_insmodpost.sh_, which is called in the _initqueue/settled_ hook will just
|
|
|
18971c |
-modprobe the kernel modules specified in all rd.driver.post kernel command line
|
|
|
18971c |
-parameters. It runs after udev has settled and is only called once (--onetime).
|
|
|
18971c |
-
|
|
|
18971c |
-_insmodpost.sh_:
|
|
|
18971c |
-----
|
|
|
18971c |
-. /lib/dracut-lib.sh
|
|
|
18971c |
-
|
|
|
18971c |
-for p in $(getargs rd.driver.post=); do
|
|
|
18971c |
- modprobe $p
|
|
|
18971c |
-done
|
|
|
18971c |
-
|
|
|
18971c |
-----
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== check()
|
|
|
18971c |
-
|
|
|
18971c |
-_check()_ is called by dracut to evaluate the inclusion of a dracut module in
|
|
|
18971c |
-the initramfs.
|
|
|
18971c |
-
|
|
|
18971c |
-$hostonly:: If the $hostonly variable is set, then the module check() function
|
|
|
18971c |
-should be in "hostonly" mode, which means, that the check() should only return
|
|
|
18971c |
-0, if the module is really needed to boot this specific host.
|
|
|
18971c |
-
|
|
|
18971c |
-check() should return with:
|
|
|
18971c |
-
|
|
|
18971c |
-0:: Include the dracut module in the initramfs.
|
|
|
18971c |
-
|
|
|
18971c |
-1:: Do not include the dracut module. The requirements are not fullfilled
|
|
|
18971c |
-(missing tools, etc.)
|
|
|
18971c |
-
|
|
|
18971c |
-255:: Only include the dracut module, if another module requires it or if
|
|
|
18971c |
-explicitly specified in the config file or on the argument list.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== depends()
|
|
|
18971c |
-
|
|
|
18971c |
-The function depends() should echo all other dracut module names the module
|
|
|
18971c |
-depends on.
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== install()
|
|
|
18971c |
-
|
|
|
18971c |
-inst_multiple
|
|
|
18971c |
-
|
|
|
18971c |
-inst
|
|
|
18971c |
-
|
|
|
18971c |
-inst_hook
|
|
|
18971c |
-
|
|
|
18971c |
-inst_rules
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== installkernel()
|
|
|
18971c |
-
|
|
|
18971c |
-instmods
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== Creation Functions
|
|
|
18971c |
-
|
|
|
18971c |
-FIXME
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== Initramfs Functions
|
|
|
18971c |
-
|
|
|
18971c |
-FIXME
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-=== Network Modules
|
|
|
18971c |
-
|
|
|
18971c |
-FIXME
|
|
|
18971c |
-
|
|
|
18971c |
:leveloffset: 1
|
|
|
18971c |
-[[dracutbootup7]]
|
|
|
18971c |
-include::dracut.bootup.7.asc[]
|
|
|
18971c |
-
|
|
|
18971c |
-:leveloffset: 1
|
|
|
18971c |
-[[dracut8]]
|
|
|
18971c |
include::dracut.8.asc[]
|
|
|
18971c |
|
|
|
18971c |
+:leveloffset: 1
|
|
|
18971c |
[[dracutconf5]]
|
|
|
18971c |
include::dracut.conf.5.asc[]
|
|
|
18971c |
|
|
|
18971c |
@@ -1036,6 +161,15 @@ include::lsinitrd.1.asc[]
|
|
|
18971c |
[[mkinitrd8]]
|
|
|
18971c |
include::mkinitrd.8.asc[]
|
|
|
18971c |
|
|
|
18971c |
+= Developer Manual
|
|
|
18971c |
+
|
|
|
18971c |
+:leveloffset: 1
|
|
|
18971c |
+[[dracutmodules7]]
|
|
|
18971c |
+include::dracut.modules.7.asc[]
|
|
|
18971c |
+
|
|
|
18971c |
+[[dracutbootup7]]
|
|
|
18971c |
+include::dracut.bootup.7.asc[]
|
|
|
18971c |
+
|
|
|
18971c |
:leveloffset: 0
|
|
|
18971c |
[appendix]
|
|
|
18971c |
License
|
|
|
18971c |
diff --git a/dracut.cmdline.7.asc b/dracut.cmdline.7.asc
|
|
|
18971c |
index 4b2ab035..19bfb939 100644
|
|
|
18971c |
--- a/dracut.cmdline.7.asc
|
|
|
18971c |
+++ b/dracut.cmdline.7.asc
|
|
|
18971c |
@@ -31,16 +31,16 @@ line is the value, which is honored.
|
|
|
18971c |
|
|
|
18971c |
Standard
|
|
|
18971c |
~~~~~~~~
|
|
|
18971c |
-**init=**_<path to real init>_::
|
|
|
18971c |
+**init=**__<path to real init>__::
|
|
|
18971c |
specify the path to the init programm to be started after the initramfs has
|
|
|
18971c |
finished
|
|
|
18971c |
|
|
|
18971c |
-**root=**_<path to blockdevice>_::
|
|
|
18971c |
+**root=**__<path to blockdevice>__::
|
|
|
18971c |
specify the block device to use as the root filesystem.
|
|
|
18971c |
+
|
|
|
18971c |
-E.g.:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
root=/dev/sda1
|
|
|
18971c |
root=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1
|
|
|
18971c |
root=/dev/disk/by-label/Root
|
|
|
18971c |
@@ -48,15 +48,17 @@ root=LABEL=Root
|
|
|
18971c |
root=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
|
|
|
18971c |
root=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
|
|
|
18971c |
root=PARTUUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**rootfstype=**_<filesystem type>_:: "auto" if not specified, e.g.:
|
|
|
18971c |
+**rootfstype=**__<filesystem type>__:: "auto" if not specified.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
rootfstype=ext3
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**rootflags=**_<mount options>_::
|
|
|
18971c |
+**rootflags=**__<mount options>__::
|
|
|
18971c |
specify additional mount options for the root filesystem. If not set,
|
|
|
18971c |
_/etc/fstab_ of the real root will be parsed for special mount options and
|
|
|
18971c |
mounted accordingly.
|
|
|
18971c |
@@ -69,7 +71,7 @@ rootfstype=ext3
|
|
|
18971c |
force mounting _/_ and _/usr_ (if it is a separate device) read-write.
|
|
|
18971c |
See also ro option.
|
|
|
18971c |
|
|
|
18971c |
-**rootfallback=**_<path to blockdevice>_::
|
|
|
18971c |
+**rootfallback=**__<path to blockdevice>__::
|
|
|
18971c |
specify the block device to use as the root filesystem, if the normal root cannot be found.
|
|
|
18971c |
This can only be a simple block device with a simple file system, for which the filesystem
|
|
|
18971c |
driver is either compiled in, or added manually to the initramfs.
|
|
|
18971c |
@@ -83,16 +85,16 @@ rootfstype=ext3
|
|
|
18971c |
do not honor special mount options for the root filesystem found in
|
|
|
18971c |
_/etc/fstab_ of the real root.
|
|
|
18971c |
|
|
|
18971c |
-**resume=**_<path to resume partition>_::
|
|
|
18971c |
+**resume=**__<path to resume partition>__::
|
|
|
18971c |
resume from a swap partition
|
|
|
18971c |
+
|
|
|
18971c |
-E.g.:
|
|
|
18971c |
-+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
resume=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1
|
|
|
18971c |
resume=/dev/disk/by-uuid/3f5ad593-4546-4a94-a374-bcfb68aa11f7
|
|
|
18971c |
resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
**rd.skipfsck**::
|
|
|
18971c |
skip fsck for rootfs and _/usr_. If you're mounting _/usr_ read-only and
|
|
|
18971c |
@@ -102,19 +104,19 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
|
|
|
18971c |
|
|
|
18971c |
Misc
|
|
|
18971c |
~~~~
|
|
|
18971c |
-**rd.driver.blacklist=**_<drivername>[,<drivername>,...]_::
|
|
|
18971c |
+**rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]::
|
|
|
18971c |
do not load kernel module <drivername>. This parameter can be specified
|
|
|
18971c |
multiple times.
|
|
|
18971c |
|
|
|
18971c |
-**rd.driver.pre=**_<drivername>[,<drivername>,...]_::
|
|
|
18971c |
+**rd.driver.pre=**__<drivername>__[,__<drivername>__,...]::
|
|
|
18971c |
force loading kernel module <drivername>. This parameter can be specified
|
|
|
18971c |
multiple times.
|
|
|
18971c |
|
|
|
18971c |
-**rd.driver.post=**_<drivername>[,<drivername>,...]_::
|
|
|
18971c |
+**rd.driver.post=**__<drivername>__[,__<drivername>__,...]::
|
|
|
18971c |
force loading kernel module <drivername> after all automatic loading modules
|
|
|
18971c |
have been loaded. This parameter can be specified multiple times.
|
|
|
18971c |
|
|
|
18971c |
-**rd.retry=**_<seconds>_::
|
|
|
18971c |
+**rd.retry=**__<seconds>__::
|
|
|
18971c |
specify how long dracut should wait for devices to appear.
|
|
|
18971c |
The default is 30 seconds. After 2/3 of the time, degraded raids are force
|
|
|
18971c |
started. If you have hardware, which takes a very long time to announce its
|
|
|
18971c |
@@ -123,7 +125,7 @@ Misc
|
|
|
18971c |
**rd.noverifyssl**::
|
|
|
18971c |
accept self-signed certificates for ssl downloads.
|
|
|
18971c |
|
|
|
18971c |
-**rd.ctty=**_<terminal device>_**::
|
|
|
18971c |
+**rd.ctty=**__<terminal device>__::
|
|
|
18971c |
specify the controlling terminal for the console.
|
|
|
18971c |
This is useful, if you have multiple "console=" arguments.
|
|
|
18971c |
|
|
|
18971c |
@@ -150,17 +152,20 @@ It should be attached to any report about dracut problems.
|
|
|
18971c |
If "quiet" is set, it also logs to the console.
|
|
|
18971c |
|
|
|
18971c |
**rd.memdebug=[0-3]**::
|
|
|
18971c |
- Print memory usage info at various points, set the verbose level from 0 to 3
|
|
|
18971c |
+ Print memory usage info at various points, set the verbose level from 0 to 3. +
|
|
|
18971c |
Higher level means more debugging output:
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
0 - no output
|
|
|
18971c |
1 - partial /proc/meminfo
|
|
|
18971c |
2 - /proc/meminfo
|
|
|
18971c |
3 - /proc/meminfo + /proc/slabinfo
|
|
|
18971c |
+----
|
|
|
18971c |
|
|
|
18971c |
**rd.break**::
|
|
|
18971c |
drop to a shell at the end
|
|
|
18971c |
|
|
|
18971c |
-**rd.break=**_{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}_::
|
|
|
18971c |
+**rd.break=**__{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}__::
|
|
|
18971c |
drop to a shell on defined breakpoint
|
|
|
18971c |
|
|
|
18971c |
**rd.udev.info**::
|
|
|
18971c |
@@ -171,50 +176,56 @@ It should be attached to any report about dracut problems.
|
|
|
18971c |
|
|
|
18971c |
I18N
|
|
|
18971c |
~~~~
|
|
|
18971c |
-**vconsole.keymap=**_<keymap base file name>_::
|
|
|
18971c |
+**rd.vconsole.keymap=**__<keymap base file name>__::
|
|
|
18971c |
keyboard translation table loaded by loadkeys; taken from keymaps directory;
|
|
|
18971c |
- will be written as KEYMAP to _/etc/vconsole.conf_ in the initramfs, e.g.:
|
|
|
18971c |
+ will be written as KEYMAP to _/etc/vconsole.conf_ in the initramfs.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
-vconsole.keymap=de-latin1-nodeadkeys
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
+rd.vconsole.keymap=de-latin1-nodeadkeys
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**vconsole.keymap.ext=**_<list of keymap base file names>_::
|
|
|
18971c |
+**rd.vconsole.keymap.ext=**__<list of keymap base file names>__::
|
|
|
18971c |
list of extra keymaps to bo loaded (sep. by space); will be written as
|
|
|
18971c |
EXT_KEYMAP to _/etc/vconsole.conf_ in the initramfs
|
|
|
18971c |
|
|
|
18971c |
-**vconsole.unicode**[=_{0|1}_]::
|
|
|
18971c |
+**rd.vconsole.unicode**::
|
|
|
18971c |
boolean, indicating UTF-8 mode; will be written as UNICODE to
|
|
|
18971c |
_/etc/vconsole.conf_ in the initramfs
|
|
|
18971c |
|
|
|
18971c |
-**vconsole.font=**_<font base file name>_::
|
|
|
18971c |
+**rd.vconsole.font=**__<font base file name>__::
|
|
|
18971c |
console font; taken from consolefonts directory; will be written as FONT to
|
|
|
18971c |
- _/etc/vconsole.conf_ in the initramfs; e.g.:
|
|
|
18971c |
+ _/etc/vconsole.conf_ in the initramfs.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
-vconsole.font=LatArCyrHeb-16
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
+rd.vconsole.font=LatArCyrHeb-16
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**vconsole.font.map=**_<console map base file name>_::
|
|
|
18971c |
+**rd.vconsole.font.map=**__<console map base file name>__::
|
|
|
18971c |
see description of '-m' parameter in setfont manual; taken from consoletrans
|
|
|
18971c |
directory; will be written as FONT_MAP to _/etc/vconsole.conf_ in the
|
|
|
18971c |
initramfs
|
|
|
18971c |
|
|
|
18971c |
-**vconsole.font.unimap=**_<unicode table base file name>_::
|
|
|
18971c |
+**rd.vconsole.font.unimap=**__<unicode table base file name>__::
|
|
|
18971c |
see description of '-u' parameter in setfont manual; taken from unimaps
|
|
|
18971c |
directory; will be written as FONT_UNIMAP to _/etc/vconsole.conf_ in the
|
|
|
18971c |
initramfs
|
|
|
18971c |
|
|
|
18971c |
-**locale.LANG=**_<locale>_::
|
|
|
18971c |
+**rd.locale.LANG=**__<locale>__::
|
|
|
18971c |
taken from the environment; if no UNICODE is defined we set its value in
|
|
|
18971c |
basis of LANG value (whether it ends with ".utf8" (or similar) or not); will
|
|
|
18971c |
- be written as LANG to _/etc/locale.conf_ in the initramfs; e.g.:
|
|
|
18971c |
+ be written as LANG to _/etc/locale.conf_ in the initramfs.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
-locale.LANG=pl_PL.utf8
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
+rd.locale.LANG=pl_PL.utf8
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**locale.LC_ALL=**_<locale>_::
|
|
|
18971c |
+**rd.locale.LC_ALL=**__<locale>__::
|
|
|
18971c |
taken from the environment; will be written as LC_ALL to _/etc/locale.conf_
|
|
|
18971c |
in the initramfs
|
|
|
18971c |
|
|
|
18971c |
@@ -223,11 +234,11 @@ LVM
|
|
|
18971c |
**rd.lvm=0**::
|
|
|
18971c |
disable LVM detection
|
|
|
18971c |
|
|
|
18971c |
-**rd.lvm.vg=**_<volume group name>_::
|
|
|
18971c |
+**rd.lvm.vg=**__<volume group name>__::
|
|
|
18971c |
only activate the volume groups with the given name. rd.lvm.vg can be
|
|
|
18971c |
specified multiple times on the kernel command line.
|
|
|
18971c |
|
|
|
18971c |
-**rd.lvm.lv=**_<logical volume name>_::
|
|
|
18971c |
+**rd.lvm.lv=**__<logical volume name>__::
|
|
|
18971c |
only activate the logical volumes with the given name. rd.lvm.lv can be
|
|
|
18971c |
specified multiple times on the kernel command line.
|
|
|
18971c |
|
|
|
18971c |
@@ -239,14 +250,14 @@ crypto LUKS
|
|
|
18971c |
**rd.luks=0**::
|
|
|
18971c |
disable crypto LUKS detection
|
|
|
18971c |
|
|
|
18971c |
-**rd.luks.uuid=**_<luks uuid>_::
|
|
|
18971c |
+**rd.luks.uuid=**__<luks uuid>__::
|
|
|
18971c |
only activate the LUKS partitions with the given UUID. Any "luks-" of the
|
|
|
18971c |
LUKS UUID is removed before comparing to _<luks uuid>_.
|
|
|
18971c |
The comparisons also matches, if _<luks uuid>_ is only the beginning of the
|
|
|
18971c |
LUKS UUID, so you don't have to specify the full UUID.
|
|
|
18971c |
This parameter can be specified multiple times.
|
|
|
18971c |
|
|
|
18971c |
-**rd.luks.allow-discards=**_<luks uuid>_::
|
|
|
18971c |
+**rd.luks.allow-discards=**__<luks uuid>__::
|
|
|
18971c |
Allow using of discards (TRIM) requests for LUKS partitions with the given UUID.
|
|
|
18971c |
Any "luks-" of the LUKS UUID is removed before comparing to _<luks uuid>_.
|
|
|
18971c |
The comparisons also matches, if _<luks uuid>_ is only the beginning of the
|
|
|
18971c |
@@ -261,16 +272,18 @@ crypto LUKS
|
|
|
18971c |
|
|
|
18971c |
crypto LUKS - key on removable device support
|
|
|
18971c |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
18971c |
-**rd.luks.key=**_<keypath>:<keydev>:<luksdev>_::
|
|
|
18971c |
+**rd.luks.key=**__<keypath>__:__<keydev>__:__<luksdev>__::
|
|
|
18971c |
_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.
|
|
|
18971c |
+
|
|
|
18971c |
_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.
|
|
|
18971c |
+
|
|
|
18971c |
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:
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
rd.luks.key=/foo/bar.key
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
+
|
|
|
18971c |
As you see, you can skip colons in such a case.
|
|
|
18971c |
+
|
|
|
18971c |
@@ -281,20 +294,20 @@ to crypsetup luksFormat with _-d -_, too!
|
|
|
18971c |
|
|
|
18971c |
Here follows example for key encrypted with GPG:
|
|
|
18971c |
|
|
|
18971c |
-----
|
|
|
18971c |
-gpg --quiet --decrypt rootkey.gpg \
|
|
|
18971c |
-| cryptsetup -d - -v \
|
|
|
18971c |
---cipher serpent-cbc-essiv:sha256 \
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+--
|
|
|
18971c |
+gpg --quiet --decrypt rootkey.gpg | \
|
|
|
18971c |
+cryptsetup -d - -v --cipher serpent-cbc-essiv:sha256 \
|
|
|
18971c |
--key-size 256 luksFormat /dev/sda3
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
If you use plain keys, just add path to _-d_ option:
|
|
|
18971c |
|
|
|
18971c |
-----
|
|
|
18971c |
-cryptsetup -d rootkey.key -v \
|
|
|
18971c |
---cipher serpent-cbc-essiv:sha256 \
|
|
|
18971c |
---key-size 256 luksFormat /dev/sda3
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+--
|
|
|
18971c |
+cryptsetup -d rootkey.key -v --cipher serpent-cbc-essiv:sha256 \
|
|
|
18971c |
+ --key-size 256 luksFormat /dev/sda3
|
|
|
18971c |
+--
|
|
|
18971c |
===============================
|
|
|
18971c |
|
|
|
18971c |
MD RAID
|
|
|
18971c |
@@ -314,7 +327,7 @@ MD RAID
|
|
|
18971c |
**rd.md.waitclean=1**::
|
|
|
18971c |
wait for any resync, recovery, or reshape activity to finish before continuing
|
|
|
18971c |
|
|
|
18971c |
-**rd.md.uuid=**_<md raid uuid>_::
|
|
|
18971c |
+**rd.md.uuid=**__<md raid uuid>__::
|
|
|
18971c |
only activate the raid sets with the given UUID. This parameter can be
|
|
|
18971c |
specified multiple times.
|
|
|
18971c |
|
|
|
18971c |
@@ -323,7 +336,7 @@ DM RAID
|
|
|
18971c |
**rd.dm=0**::
|
|
|
18971c |
disable DM RAID detection
|
|
|
18971c |
|
|
|
18971c |
-**rd.dm.uuid=**_<dm raid uuid>_::
|
|
|
18971c |
+**rd.dm.uuid=**__<dm raid uuid>__::
|
|
|
18971c |
only activate the raid sets with the given UUID. This parameter can be
|
|
|
18971c |
specified multiple times.
|
|
|
18971c |
|
|
|
18971c |
@@ -332,15 +345,17 @@ FIPS
|
|
|
18971c |
**rd.fips**::
|
|
|
18971c |
enable FIPS
|
|
|
18971c |
|
|
|
18971c |
-**boot=**_<boot device>_::
|
|
|
18971c |
- specify the device, where /boot is located. e.g.
|
|
|
18971c |
+**boot=**__<boot device>__::
|
|
|
18971c |
+ specify the device, where /boot is located.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
boot=/dev/sda1
|
|
|
18971c |
boot=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1
|
|
|
18971c |
boot=UUID=<uuid>
|
|
|
18971c |
boot=LABEL=<label>
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
**rd.fips.skipkernel**::
|
|
|
18971c |
skip checksum check of the kernel image. Useful, if the kernel image is not
|
|
|
18971c |
@@ -348,7 +363,66 @@ boot=LABEL=<label>
|
|
|
18971c |
|
|
|
18971c |
Network
|
|
|
18971c |
~~~~~~~
|
|
|
18971c |
-**ip=**_{dhcp|on|any|dhcp6|auto6|ibft}_::
|
|
|
18971c |
+
|
|
|
18971c |
+[IMPORTANT]
|
|
|
18971c |
+=====================
|
|
|
18971c |
+It is recommended to either bind an interface to a MAC with the **ifname** argument,
|
|
|
18971c |
+or to use the systemd-udevd predictable network interface names.
|
|
|
18971c |
+
|
|
|
18971c |
+Predictable network interface device names based on:
|
|
|
18971c |
+
|
|
|
18971c |
+- firmware/bios-provided index numbers for on-board devices
|
|
|
18971c |
+- firmware-provided pci-express hotplug slot index number
|
|
|
18971c |
+- physical/geographical location of the hardware
|
|
|
18971c |
+- the interface's MAC address
|
|
|
18971c |
+
|
|
|
18971c |
+See: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
|
|
|
18971c |
+
|
|
|
18971c |
+Two character prefixes based on the type of interface:
|
|
|
18971c |
+
|
|
|
18971c |
+en:: ethernet
|
|
|
18971c |
+wl:: wlan
|
|
|
18971c |
+ww:: wwan
|
|
|
18971c |
+
|
|
|
18971c |
+Type of names:
|
|
|
18971c |
+
|
|
|
18971c |
+o<index>:: on-board device index number
|
|
|
18971c |
+s<slot>[f<function>][d<dev_id>]:: hotplug slot index number
|
|
|
18971c |
+x<MAC>:: MAC address
|
|
|
18971c |
+[P<domain>]p<bus>s<slot>[f<function>][d<dev_id>]:: PCI geographical location
|
|
|
18971c |
+[P<domain>]p<bus>s<slot>[f<function>][u<port>][..][c<config>][i<interface>]:: USB port number chain
|
|
|
18971c |
+
|
|
|
18971c |
+All multi-function PCI devices will carry the [f<function>] number in the
|
|
|
18971c |
+device name, including the function 0 device.
|
|
|
18971c |
+
|
|
|
18971c |
+When using PCI geography, The PCI domain is only prepended when it is not 0.
|
|
|
18971c |
+
|
|
|
18971c |
+For USB devices the full chain of port numbers of hubs is composed. If the
|
|
|
18971c |
+name gets longer than the maximum number of 15 characters, the name is not
|
|
|
18971c |
+exported.
|
|
|
18971c |
+The usual USB configuration == 1 and interface == 0 values are suppressed.
|
|
|
18971c |
+
|
|
|
18971c |
+PCI ethernet card with firmware index "1"::
|
|
|
18971c |
+* eno1
|
|
|
18971c |
+
|
|
|
18971c |
+PCI ethernet card in hotplug slot with firmware index number::
|
|
|
18971c |
+* ens1
|
|
|
18971c |
+
|
|
|
18971c |
+PCI ethernet multi-function card with 2 ports::
|
|
|
18971c |
+* enp2s0f0
|
|
|
18971c |
+* enp2s0f1
|
|
|
18971c |
+
|
|
|
18971c |
+PCI wlan card::
|
|
|
18971c |
+* wlp3s0
|
|
|
18971c |
+
|
|
|
18971c |
+USB built-in 3G modem::
|
|
|
18971c |
+* wwp0s29u1u4i6
|
|
|
18971c |
+
|
|
|
18971c |
+USB Android phone::
|
|
|
18971c |
+* enp0s29u1u2
|
|
|
18971c |
+=====================
|
|
|
18971c |
+
|
|
|
18971c |
+**ip=**__{dhcp|on|any|dhcp6|auto6|ibft}__::
|
|
|
18971c |
dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp, loop
|
|
|
18971c |
sequentially through all interfaces (eth0, eth1, ...) and use the first with
|
|
|
18971c |
a valid DHCP root-path.
|
|
|
18971c |
@@ -359,7 +433,7 @@ Network
|
|
|
18971c |
|
|
|
18971c |
ibft::: iBFT autoconfiguration
|
|
|
18971c |
|
|
|
18971c |
-**ip=**_<interface>_:_{dhcp|on|any|dhcp6|auto6}_[:[_<mtu>_][:_<macaddr>_]]::
|
|
|
18971c |
+**ip=**__<interface>__:__{dhcp|on|any|dhcp6|auto6}__[:[__<mtu>__][:__<macaddr>__]]::
|
|
|
18971c |
This parameter can be specified multiple times.
|
|
|
18971c |
+
|
|
|
18971c |
=====================
|
|
|
18971c |
@@ -370,16 +444,7 @@ cannot be used in conjunction with the **ifname** argument for the
|
|
|
18971c |
same <interface>.
|
|
|
18971c |
=====================
|
|
|
18971c |
|
|
|
18971c |
-[IMPORTANT]
|
|
|
18971c |
-=====================
|
|
|
18971c |
-It is recommended to either bind <interface> to a MAC with the **ifname**
|
|
|
18971c |
-argument. Or use biosdevname to name your interfaces, which will then have names according to their hardware location.
|
|
|
18971c |
-
|
|
|
18971c |
-em<port>::: for embedded NICs
|
|
|
18971c |
-p<slot>#<port>_<virtual instance>::: for cards in PCI slots
|
|
|
18971c |
-=====================
|
|
|
18971c |
-
|
|
|
18971c |
-**ip=**_<client-IP>_:_<server-IP>_:_<gateway-IP>_:_<netmask>_:_<client_hostname>_:_<interface>_:_{none|off|dhcp|on|any|dhcp6|auto6|ibft}_[:[_<mtu>_][:_<macaddr>_]]::
|
|
|
18971c |
+**ip=**__<client-IP>__:__<server-IP>__:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[__<mtu>__][:__<macaddr>__]]::
|
|
|
18971c |
explicit network configuration. If you want do define a IPv6 address, put it
|
|
|
18971c |
in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple
|
|
|
18971c |
times.
|
|
|
18971c |
@@ -390,25 +455,14 @@ cannot be used in conjunction with the **ifname** argument for the
|
|
|
18971c |
same <interface>.
|
|
|
18971c |
=====================
|
|
|
18971c |
|
|
|
18971c |
-[IMPORTANT]
|
|
|
18971c |
-=====================
|
|
|
18971c |
-It is recommended to either bind <interface> to a MAC with the **ifname**
|
|
|
18971c |
-argument. Or use biosdevname to name your interfaces, which will then have names according to their hardware location.
|
|
|
18971c |
-
|
|
|
18971c |
-em<port>::: for embedded NICs
|
|
|
18971c |
-p<slot>#<port>_<virtual instance>::: for cards in PCI slots
|
|
|
18971c |
-=====================
|
|
|
18971c |
-
|
|
|
18971c |
-**ifname=**_<interface>_:_<MAC>_::
|
|
|
18971c |
+**ifname=**__<interface>__:__<MAC>__::
|
|
|
18971c |
Assign network device name <interface> (ie "bootnet") to the NIC with MAC <MAC>.
|
|
|
18971c |
+
|
|
|
18971c |
-[IMPORTANT]
|
|
|
18971c |
-
|
|
|
18971c |
-Do **not** use the default kernel naming scheme for the interface name,
|
|
|
18971c |
+WARNING: Do **not** use the default kernel naming scheme for the interface name,
|
|
|
18971c |
as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the
|
|
|
18971c |
interface name. Better name it "bootnet" or "bluesocket".
|
|
|
18971c |
|
|
|
18971c |
-**bootdev=**_<interface>_::
|
|
|
18971c |
+**bootdev=**__<interface>__::
|
|
|
18971c |
specify network interface to use routing and netroot information from.
|
|
|
18971c |
Required if multiple ip= lines are used.
|
|
|
18971c |
|
|
|
18971c |
@@ -421,12 +475,12 @@ interface name. Better name it "bootnet" or "bluesocket".
|
|
|
18971c |
**rd.neednet=1**::
|
|
|
18971c |
boolean, bring up network even without netroot set
|
|
|
18971c |
|
|
|
18971c |
-**vlan=_<vlanname>_:_<phydevice>_**::
|
|
|
18971c |
+**vlan=**__<vlanname>__:__<phydevice>__::
|
|
|
18971c |
Setup vlan device named <vlanname> on <phydeivce>.
|
|
|
18971c |
We support the four styles of vlan names: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
|
|
|
18971c |
DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
|
|
|
18971c |
|
|
|
18971c |
-**bond=_<bondname>_[:_<bondslaves>_:[:_<options>_]]**::
|
|
|
18971c |
+**bond=**__<bondname>__[:__<bondslaves>__:[:__<options>__]]::
|
|
|
18971c |
Setup bonding device <bondname> on top of <bondslaves>.
|
|
|
18971c |
<bondslaves> is a comma-separated list of physical (ethernet) interfaces.
|
|
|
18971c |
<options> is a comma-separated list on bonding options (modinfo bonding for details)
|
|
|
18971c |
@@ -434,68 +488,63 @@ interface name. Better name it "bootnet" or "bluesocket".
|
|
|
18971c |
then its values should be separated by semicolon.
|
|
|
18971c |
Bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
|
|
|
18971c |
|
|
|
18971c |
-**team =_<teammaster>_:_<teamslaves>_**::
|
|
|
18971c |
+**team=**__<teammaster>__:__<teamslaves>__::
|
|
|
18971c |
Setup team device <teammaster> on top of <teamslaves>.
|
|
|
18971c |
<teamslaves> is a comma-separated list of physical (ethernet) interfaces.
|
|
|
18971c |
|
|
|
18971c |
-**bridge=_<bridgename>_:_<ethnames>_**::
|
|
|
18971c |
+**bridge=**__<bridgename>__:__<ethnames>__::
|
|
|
18971c |
Setup bridge <bridgename> with <ethnames>. <ethnames> is a comma-separated
|
|
|
18971c |
list of physical (ethernet) interfaces. Bridge without parameters assumes bridge=br0:eth0
|
|
|
18971c |
|
|
|
18971c |
-
|
|
|
18971c |
NFS
|
|
|
18971c |
~~~
|
|
|
18971c |
-**root=**[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]::
|
|
|
18971c |
+**root=**\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]::
|
|
|
18971c |
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use
|
|
|
18971c |
dhcp next_server. if server-ip is an IPv6 address it has to be put in
|
|
|
18971c |
brackets, e.g. [2001:DB8::1]. NFS options can be appended with the prefix
|
|
|
18971c |
":" or "," and are seperated by ",".
|
|
|
18971c |
|
|
|
18971c |
-**root=**nfs:[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_], **root=**nfs4:[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_], **root=**_{dhcp|dhcp6}_::
|
|
|
18971c |
+**root=**nfs:\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__], **root=**nfs4:\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__], **root=**__{dhcp|dhcp6}__::
|
|
|
18971c |
root=dhcp alone directs initrd to look at the DHCP root-path where NFS
|
|
|
18971c |
options can be specified.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
root-path=<server-ip>:<root-dir>[,<nfs-options>]
|
|
|
18971c |
root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>]
|
|
|
18971c |
root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>]
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**root=**_/dev/nfs_ nfsroot=[_<server-ip>_:]_<root-dir>_[:_<nfs-options>_]::
|
|
|
18971c |
+**root=**_/dev/nfs_ nfsroot=\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]::
|
|
|
18971c |
_Deprecated!_ kernel Documentation_/filesystems/nfsroot.txt_ defines this
|
|
|
18971c |
method. This is supported by dracut, but not recommended.
|
|
|
18971c |
|
|
|
18971c |
-**rd.nfs.domain=**_<NFSv4 domain name>_::
|
|
|
18971c |
+**rd.nfs.domain=**__<NFSv4 domain name>__::
|
|
|
18971c |
Set the NFSv4 domain name. Will overwrite the settings in _/etc/idmap.conf_.
|
|
|
18971c |
|
|
|
18971c |
CIFS
|
|
|
18971c |
~~~
|
|
|
18971c |
-**root=**cifs://[_<username>_[:_<password>_]@]_<server-ip>_:_<root-dir>_::
|
|
|
18971c |
+**root=**cifs://[__<username>__[:__<password>__]@]__<server-ip>__:__<root-dir>__::
|
|
|
18971c |
mount cifs share from <server-ip>:/<root-dir>, if no server-ip is given, use
|
|
|
18971c |
dhcp next_server. if server-ip is an IPv6 address it has to be put in
|
|
|
18971c |
brackets, e.g. [2001:DB8::1]. If a username or password are not specified
|
|
|
18971c |
as part of the root, then they must be passed on the command line through
|
|
|
18971c |
cifsuser/cifspass.
|
|
|
18971c |
+
|
|
|
18971c |
-[WARNING]
|
|
|
18971c |
-====
|
|
|
18971c |
-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path.
|
|
|
18971c |
-====
|
|
|
18971c |
+WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path.
|
|
|
18971c |
|
|
|
18971c |
-**cifsuser=_<username>_::
|
|
|
18971c |
+**cifsuser**=__<username>__::
|
|
|
18971c |
Set the cifs username, if not specified as part of the root.
|
|
|
18971c |
|
|
|
18971c |
-**cifspass=_<password>_::
|
|
|
18971c |
+**cifspass**=__<password>__::
|
|
|
18971c |
Set the cifs password, if not specified as part of the root.
|
|
|
18971c |
+
|
|
|
18971c |
-[WARNING]
|
|
|
18971c |
-====
|
|
|
18971c |
-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path.
|
|
|
18971c |
-====
|
|
|
18971c |
+WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path.
|
|
|
18971c |
|
|
|
18971c |
iSCSI
|
|
|
18971c |
~~~~~
|
|
|
18971c |
-**root=**iscsi:[_<username>_:_<password>_[:_<reverse>_:_<password>_]@][_<servername>_]:[_<protocol>_]:[_<port>_][:[_<iscsi_iface_name>_]:[_<netdev_name>_]]:[_<LUN>_]:_<targetname>_::
|
|
|
18971c |
+**root=**iscsi:[__<username>__:__<password>__[:__<reverse>__:__<password>__]@][__<servername>__]:[__<protocol>__]:[__<port>__][:[__<iscsi_iface_name>__]:[__<netdev_name>__]]:[__<LUN>__]:__<targetname>__::
|
|
|
18971c |
protocol defaults to "6", LUN defaults to "0". If the "servername" field is
|
|
|
18971c |
provided by BOOTP or DHCP, then that field is used in conjunction with other
|
|
|
18971c |
associated fields to contact the boot server in the Boot stage. However, if
|
|
|
18971c |
@@ -503,85 +552,84 @@ iSCSI
|
|
|
18971c |
used in the Discovery Service stage in conjunction with other associated
|
|
|
18971c |
fields. See
|
|
|
18971c |
link:$$http://tools.ietf.org/html/rfc4173#section-5$$[rfc4173].
|
|
|
18971c |
- e.g.:
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path.
|
|
|
18971c |
++
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
+
|
|
|
18971c |
-If servername is an IPv6 address, it has to be put in brackets. e.g.:
|
|
|
18971c |
+If servername is an IPv6 address, it has to be put in brackets:
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
root=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
|
|
|
18971c |
-----
|
|
|
18971c |
-+
|
|
|
18971c |
-[WARNING]
|
|
|
18971c |
-====
|
|
|
18971c |
-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path.
|
|
|
18971c |
-====
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**root=**_???_ **netroot=**iscsi:[_<username>_:_<password>_[:_<reverse>_:_<password>_]@][_<servername>_]:[_<protocol>_]:[_<port>_][:[_<iscsi_iface_name>_]:[_<netdev_name>_]]:[_<LUN>_]:_<targetname>_ ...::
|
|
|
18971c |
- multiple netroot options allow setting up multiple iscsi disks. e.g.:
|
|
|
18971c |
+**root=**__???__ **netroot=**iscsi:[__<username>__:__<password>__[:__<reverse>__:__<password>__]@][__<servername>__]:[__<protocol>__]:[__<port>__][:[__<iscsi_iface_name>__]:[__<netdev_name>__]]:[__<LUN>__]:__<targetname>__ ...::
|
|
|
18971c |
+ multiple netroot options allow setting up multiple iscsi disks:
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
root=UUID=12424547
|
|
|
18971c |
netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
|
|
|
18971c |
netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
+
|
|
|
18971c |
-If servername is an IPv6 address, it has to be put in brackets. e.g.:
|
|
|
18971c |
+If servername is an IPv6 address, it has to be put in brackets:
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
netroot=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
+
|
|
|
18971c |
-[WARNING]
|
|
|
18971c |
-====
|
|
|
18971c |
-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware.
|
|
|
18971c |
-====
|
|
|
18971c |
+WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware.
|
|
|
18971c |
|
|
|
18971c |
-**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>_::
|
|
|
18971c |
+**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>__::
|
|
|
18971c |
manually specify all iscsistart parameter (see **+iscsistart --help+**)
|
|
|
18971c |
+
|
|
|
18971c |
-[WARNING]
|
|
|
18971c |
-====
|
|
|
18971c |
-Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware.
|
|
|
18971c |
-====
|
|
|
18971c |
+WARNING: Passwords specified on the kernel command line are visible for all users via the file _/proc/cmdline_ and via dmesg or can be sniffed on the network, when using DHCP with DHCP root-path. You may want to use rd.iscsi.firmware.
|
|
|
18971c |
|
|
|
18971c |
**root=**_???_ **netroot=**iscsi **rd.iscsi.firmware=1**::
|
|
|
18971c |
will read the iscsi parameter from the BIOS firmware
|
|
|
18971c |
|
|
|
18971c |
-**rd.iscsi.param=**_<param>_::
|
|
|
18971c |
+**rd.iscsi.param=**__<param>__::
|
|
|
18971c |
<param> will be passed as "--param <param>" to iscsistart.
|
|
|
18971c |
This parameter can be specified multiple times.
|
|
|
18971c |
- e.g.:
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
"netroot=iscsi rd.iscsi.firmware=1 rd.iscsi.param=node.session.timeo.replacement_timeout=30"
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
+
|
|
|
18971c |
will result in
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+--
|
|
|
18971c |
iscsistart -b --param node.session.timeo.replacement_timeout=30
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
FCoE
|
|
|
18971c |
~~~~
|
|
|
18971c |
-**fcoe=**_<edd|interface|MAC>_:_{dcb|nodcb}_::
|
|
|
18971c |
+**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__::
|
|
|
18971c |
Try to connect to a FCoE SAN through the NIC specified by _<interface>_ or
|
|
|
18971c |
_<MAC>_ or EDD settings. For the second argument, currently only nodcb is
|
|
|
18971c |
supported. This parameter can be specified multiple times.
|
|
|
18971c |
+
|
|
|
18971c |
-[NOTE]
|
|
|
18971c |
-letters in the MAC-address must be lowercase!
|
|
|
18971c |
+NOTE: letters in the MAC-address must be lowercase!
|
|
|
18971c |
|
|
|
18971c |
NBD
|
|
|
18971c |
~~~
|
|
|
18971c |
-**root=**??? **netroot=**nbd:_<server>_:_<port>_[:_<fstype>_[:_<mountopts>_[:_<nbdopts>_]]]::
|
|
|
18971c |
+**root=**??? **netroot=**nbd:__<server>__:__<port>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]::
|
|
|
18971c |
mount nbd share from <server>
|
|
|
18971c |
|
|
|
18971c |
-**root=dhcp** with **dhcp** **root-path=**nbd:_<server>_:_<port>_[:_<fstype>_[:_<mountopts>_[:_<nbdopts>_]]]::
|
|
|
18971c |
+**root=dhcp** with **dhcp** **root-path=**nbd:__<server>__:__<port>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]::
|
|
|
18971c |
root=dhcp alone directs initrd to look at the DHCP root-path where NBD
|
|
|
18971c |
options can be specified. This syntax is only usable in cases where you are
|
|
|
18971c |
directly mounting the volume as the rootfs.
|
|
|
18971c |
@@ -593,25 +641,29 @@ DASD
|
|
|
18971c |
|
|
|
18971c |
ZFCP
|
|
|
18971c |
~~~~
|
|
|
18971c |
-**rd.zfcp=**_<zfcp adaptor device bus ID>_,_<WWPN>_,_<FCPLUN>_::
|
|
|
18971c |
- rd.zfcp can be specified multiple times on the kernel command line. e.g.:
|
|
|
18971c |
+**rd.zfcp=**__<zfcp adaptor device bus ID>__,__<WWPN>__,__<FCPLUN>__::
|
|
|
18971c |
+ rd.zfcp can be specified multiple times on the kernel command line.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
**rd.zfcp.conf=0**::
|
|
|
18971c |
ignore zfcp.conf included in the initramfs
|
|
|
18971c |
|
|
|
18971c |
ZNET
|
|
|
18971c |
~~~~
|
|
|
18971c |
-**rd.znet=**_<nettype>_,_<subchannels>_,_<options>_::
|
|
|
18971c |
- rd.znet can be specified multiple times on the kernel command line. e.g.:
|
|
|
18971c |
+**rd.znet=**__<nettype>__,__<subchannels>__,__<options>__::
|
|
|
18971c |
+ rd.znet can be specified multiple times on the kernel command line.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portname=foo
|
|
|
18971c |
rd.znet=ctc,0.0.0600,0.0.0601,protocol=bar
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
Plymouth Boot Splash
|
|
|
18971c |
~~~~~~~~~~~~~~~~~~~~
|
|
|
18971c |
@@ -623,33 +675,41 @@ Plymouth Boot Splash
|
|
|
18971c |
|
|
|
18971c |
Kernel keys
|
|
|
18971c |
~~~~~~~~~~~
|
|
|
18971c |
-**masterkey=**_<kernel master key path name>_::
|
|
|
18971c |
- Set the path name of the kernel master key. e.g.:
|
|
|
18971c |
+**masterkey=**__<kernel master key path name>__::
|
|
|
18971c |
+ Set the path name of the kernel master key.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
masterkey=/etc/keys/kmk-trusted.blob
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**masterkeytype=**_<kernel master key type>_::
|
|
|
18971c |
- Set the type of the kernel master key. e.g.:
|
|
|
18971c |
+**masterkeytype=**__<kernel master key type>__::
|
|
|
18971c |
+ Set the type of the kernel master key.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
masterkeytype=trusted
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**evmkey=**_<EVM key path name>_::
|
|
|
18971c |
- Set the path name of the EVM key. e.g.:
|
|
|
18971c |
+**evmkey=**__<EVM key path name>__::
|
|
|
18971c |
+ Set the path name of the EVM key.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
evmkey=/etc/keys/evm-trusted.blob
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
-**ecryptfskey=**_<eCryptfs key path name>_::
|
|
|
18971c |
- Set the path name of the eCryptfs key. e.g.:
|
|
|
18971c |
+**ecryptfskey=**__<eCryptfs key path name>__::
|
|
|
18971c |
+ Set the path name of the eCryptfs key.
|
|
|
18971c |
+
|
|
|
18971c |
-----
|
|
|
18971c |
+[listing]
|
|
|
18971c |
+.Example
|
|
|
18971c |
+--
|
|
|
18971c |
ecryptfskey=/etc/keys/ecryptfs-trusted.blob
|
|
|
18971c |
-----
|
|
|
18971c |
+--
|
|
|
18971c |
|
|
|
18971c |
Deprecated, renamed Options
|
|
|
18971c |
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
18971c |
diff --git a/dracut.css b/dracut.css
|
|
|
18971c |
index e419a067..357ede1b 100644
|
|
|
18971c |
--- a/dracut.css
|
|
|
18971c |
+++ b/dracut.css
|
|
|
18971c |
@@ -14,45 +14,6 @@ body {
|
|
|
18971c |
color:black;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
-body.toc_embeded {
|
|
|
18971c |
- /*for web hosting system only*/
|
|
|
18971c |
- margin-left: 300px;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-object.toc, iframe.toc {
|
|
|
18971c |
- /*for web hosting system only*/
|
|
|
18971c |
- border-style:none;
|
|
|
18971c |
- position:fixed;
|
|
|
18971c |
- width:290px;
|
|
|
18971c |
- height:99.99%;
|
|
|
18971c |
- top:0;
|
|
|
18971c |
- left:0;
|
|
|
18971c |
- z-index: 100;
|
|
|
18971c |
- border-style:none;
|
|
|
18971c |
- border-right:1px solid #999;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-/* Hide web menu */
|
|
|
18971c |
-
|
|
|
18971c |
-body.notoc {
|
|
|
18971c |
- margin-left: 3em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-iframe.notoc {
|
|
|
18971c |
- border-style:none;
|
|
|
18971c |
- border: none;
|
|
|
18971c |
- padding: 0em;
|
|
|
18971c |
- position:fixed;
|
|
|
18971c |
- width: 21px;
|
|
|
18971c |
- height: 29px;
|
|
|
18971c |
- top: 0px;
|
|
|
18971c |
- left:0;
|
|
|
18971c |
- overflow: hidden;
|
|
|
18971c |
- margin: 0em;
|
|
|
18971c |
- margin-left: -3px;
|
|
|
18971c |
-}
|
|
|
18971c |
-/* End hide web menu */
|
|
|
18971c |
-
|
|
|
18971c |
/* desktop styles */
|
|
|
18971c |
body.desktop {
|
|
|
18971c |
margin-left: 26em;
|
|
|
18971c |
@@ -166,7 +127,6 @@ h1 {
|
|
|
18971c |
margin-bottom: 0em;
|
|
|
18971c |
font-size: 3.0em;
|
|
|
18971c |
font-weight: bold;
|
|
|
18971c |
- background: #003d6e url(../images/h1-bg.png) top left repeat-x;
|
|
|
18971c |
color: white;
|
|
|
18971c |
text-align: center;
|
|
|
18971c |
padding: 0.7em;
|
|
|
18971c |
@@ -480,106 +440,14 @@ h3.author {
|
|
|
18971c |
font-weight:bold;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
-/* inline syntax highlighting */
|
|
|
18971c |
-.perl_Alert {
|
|
|
18971c |
- color: #0000ff;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_BaseN {
|
|
|
18971c |
- color: #007f00;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_BString {
|
|
|
18971c |
- color: #5C3566;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Char {
|
|
|
18971c |
- color: #ff00ff;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Comment {
|
|
|
18971c |
- color: #FF00FF;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_DataType {
|
|
|
18971c |
- color: #0000ff;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_DecVal {
|
|
|
18971c |
- color: #00007f;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Error {
|
|
|
18971c |
- color: #ff0000;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Float {
|
|
|
18971c |
- color: #00007f;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Function {
|
|
|
18971c |
- color: #007f00;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_IString {
|
|
|
18971c |
- color: #5C3566;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Keyword {
|
|
|
18971c |
- color: #002F5D;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Operator {
|
|
|
18971c |
- color: #ffa500;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Others {
|
|
|
18971c |
- color: #b03060;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_RegionMarker {
|
|
|
18971c |
- color: #96b9ff;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Reserved {
|
|
|
18971c |
- color: #9b30ff;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_String {
|
|
|
18971c |
- color: #5C3566;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Variable {
|
|
|
18971c |
- color: #0000ff;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-.perl_Warning {
|
|
|
18971c |
- color: #0000ff;
|
|
|
18971c |
-}
|
|
|
18971c |
|
|
|
18971c |
/*Lists*/
|
|
|
18971c |
ul {
|
|
|
18971c |
padding-left:1.6em;
|
|
|
18971c |
- list-style-image:url(../images/dot.png);
|
|
|
18971c |
list-style-type: circle;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
ul ul {
|
|
|
18971c |
- list-style-image:url(../images/dot2.png);
|
|
|
18971c |
list-style-type: circle;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
@@ -769,21 +637,6 @@ code {
|
|
|
18971c |
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
-/*Notifications*/
|
|
|
18971c |
-div.warning:before {
|
|
|
18971c |
- content:url(../images/warning.png);
|
|
|
18971c |
- padding-left: 5px;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-div.note:before {
|
|
|
18971c |
- content:url(../images/note.png);
|
|
|
18971c |
- padding-left: 5px;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-div.important:before {
|
|
|
18971c |
- content:url(../images/important.png);
|
|
|
18971c |
- padding-left: 5px;
|
|
|
18971c |
-}
|
|
|
18971c |
|
|
|
18971c |
div.warning, div.note, div.important {
|
|
|
18971c |
color: black;
|
|
|
18971c |
@@ -792,7 +645,8 @@ div.warning, div.note, div.important {
|
|
|
18971c |
background: none;
|
|
|
18971c |
background-color: white;
|
|
|
18971c |
margin-bottom: 1em;
|
|
|
18971c |
- border-bottom: 1px solid #aaaaaa;
|
|
|
18971c |
+ padding-left: 1em;
|
|
|
18971c |
+ border-left: 2px solid #aaaaaa;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
div.warning h2, div.note h2,div.important h2 {
|
|
|
18971c |
@@ -817,20 +671,6 @@ div.admonition_header {
|
|
|
18971c |
font-size: 1.0em;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
-div.warning div.admonition_header {
|
|
|
18971c |
- background: url(../images/red.png) top left repeat-x;
|
|
|
18971c |
- background-color: #590000;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-div.note div.admonition_header {
|
|
|
18971c |
- background: url(../images/green.png) top right repeat-x;
|
|
|
18971c |
- background-color: #597800;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-div.important div.admonition_header {
|
|
|
18971c |
- background: url(../images/yellow.png) top right repeat-x;
|
|
|
18971c |
- background-color: #a6710f;
|
|
|
18971c |
-}
|
|
|
18971c |
|
|
|
18971c |
div.warning p, div.warning div.para,
|
|
|
18971c |
div.note p, div.note div.para,
|
|
|
18971c |
@@ -1131,266 +971,6 @@ ul li p:last-child, ul li div.para:last-child {
|
|
|
18971c |
padding-bottom:0em;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
-/*document navigation*/
|
|
|
18971c |
-.docnav a, .docnav strong {
|
|
|
18971c |
- border:none;
|
|
|
18971c |
- text-decoration:none;
|
|
|
18971c |
- font-weight:normal;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav {
|
|
|
18971c |
- list-style:none;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- position:relative;
|
|
|
18971c |
- width:100%;
|
|
|
18971c |
- padding-bottom:2em;
|
|
|
18971c |
- padding-top:1em;
|
|
|
18971c |
- border-top:1px dotted #ccc;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li {
|
|
|
18971c |
- list-style:none;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- font-size:.8em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li:before {
|
|
|
18971c |
- content:" ";
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.previous, .docnav li.next {
|
|
|
18971c |
- position:absolute;
|
|
|
18971c |
- top:1em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.up, .docnav li.home {
|
|
|
18971c |
- margin:0em 1.5em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.previous {
|
|
|
18971c |
- left:0px;
|
|
|
18971c |
- text-align:left;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.next {
|
|
|
18971c |
- right:0px;
|
|
|
18971c |
- text-align:right;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.previous strong, .docnav li.next strong {
|
|
|
18971c |
- height:22px;
|
|
|
18971c |
- display:block;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav {
|
|
|
18971c |
- margin:0 auto;
|
|
|
18971c |
- text-align:center;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.next a strong {
|
|
|
18971c |
- background: url(../images/stock-go-forward.png) top right no-repeat;
|
|
|
18971c |
- padding-top:3px;
|
|
|
18971c |
- padding-bottom:4px;
|
|
|
18971c |
- padding-right:28px;
|
|
|
18971c |
- font-size:1.2em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.previous a strong {
|
|
|
18971c |
- background: url(../images/stock-go-back.png) top left no-repeat;
|
|
|
18971c |
- padding-top:3px;
|
|
|
18971c |
- padding-bottom:4px;
|
|
|
18971c |
- padding-left:28px;
|
|
|
18971c |
- padding-right:0.5em;
|
|
|
18971c |
- font-size:1.2em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.home a strong {
|
|
|
18971c |
- background: url(../images/stock-home.png) top left no-repeat;
|
|
|
18971c |
- padding:5px;
|
|
|
18971c |
- padding-left:28px;
|
|
|
18971c |
- font-size:1.2em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav li.up a strong {
|
|
|
18971c |
- background: url(../images/stock-go-up.png) top left no-repeat;
|
|
|
18971c |
- padding:5px;
|
|
|
18971c |
- padding-left:28px;
|
|
|
18971c |
- font-size:1.2em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav a:link, .docnav a:visited {
|
|
|
18971c |
- color:#666;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav a:hover, .docnav a:focus, .docnav a:active {
|
|
|
18971c |
- color:black;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav a {
|
|
|
18971c |
- max-width: 10em;
|
|
|
18971c |
- overflow:hidden;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav a:link strong {
|
|
|
18971c |
- text-decoration:none;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.docnav {
|
|
|
18971c |
- margin:0 auto;
|
|
|
18971c |
- text-align:center;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-ul.docnav {
|
|
|
18971c |
- margin-bottom: 1em;
|
|
|
18971c |
-}
|
|
|
18971c |
-/* Reports */
|
|
|
18971c |
-.reports ul {
|
|
|
18971c |
- list-style:none;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.reports li{
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.reports li.odd {
|
|
|
18971c |
- background-color: #eeeeee;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.reports dl {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- float:right;
|
|
|
18971c |
- margin-right: 17em;
|
|
|
18971c |
- margin-top:-1.3em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.reports dt {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.reports dd {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- padding-right:.5em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.reports h2, .reports h3{
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- padding-right:.5em;
|
|
|
18971c |
- font-size:10pt;
|
|
|
18971c |
- font-weight:normal;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.reports div.progress {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- float:right;
|
|
|
18971c |
- width:16em;
|
|
|
18971c |
- background:#c00 url(../images/shine.png) top left repeat-x;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- margin-top:-1.3em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- border:none;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-/*uniform*/
|
|
|
18971c |
-body.results, body.reports {
|
|
|
18971c |
- max-width:57em ;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-/*Progress Bar*/
|
|
|
18971c |
-div.progress {
|
|
|
18971c |
- display:block;
|
|
|
18971c |
- float:left;
|
|
|
18971c |
- width:16em;
|
|
|
18971c |
- background:#c00 url(../images/shine.png) top left repeat-x;
|
|
|
18971c |
- height:1em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-div.progress span {
|
|
|
18971c |
- height:1em;
|
|
|
18971c |
- float:left;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-div.progress span.translated {
|
|
|
18971c |
- background:#6c3 url(../images/shine.png) top left repeat-x;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-div.progress span.fuzzy {
|
|
|
18971c |
- background:#ff9f00 url(../images/shine.png) top left repeat-x;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-
|
|
|
18971c |
-/*Results*/
|
|
|
18971c |
-
|
|
|
18971c |
-.results ul {
|
|
|
18971c |
- list-style:none;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.results li{
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.results li.odd {
|
|
|
18971c |
- background-color: #eeeeee;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.results dl {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- float:right;
|
|
|
18971c |
- margin-right: 17em;
|
|
|
18971c |
- margin-top:-1.3em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.results dt {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.results dd {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- padding-right:.5em;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.results h2, .results h3 {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- padding-right:.5em;
|
|
|
18971c |
- font-size:10pt;
|
|
|
18971c |
- font-weight:normal;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
-.results div.progress {
|
|
|
18971c |
- display:inline;
|
|
|
18971c |
- float:right;
|
|
|
18971c |
- width:16em;
|
|
|
18971c |
- background:#c00 url(../images/shine.png) top left repeat-x;
|
|
|
18971c |
- margin:0em;
|
|
|
18971c |
- margin-top:-1.3em;
|
|
|
18971c |
- padding:0em;
|
|
|
18971c |
- border:none;
|
|
|
18971c |
-}
|
|
|
18971c |
|
|
|
18971c |
/* Dirty EVIL Mozilla hack for round corners */
|
|
|
18971c |
pre {
|
|
|
18971c |
@@ -1423,12 +1003,6 @@ span.remark {
|
|
|
18971c |
background-color: #ff00ff;
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
-.draft {
|
|
|
18971c |
- background-image: url(../images/watermark-draft.png);
|
|
|
18971c |
- background-repeat: repeat-y;
|
|
|
18971c |
- background-position: center;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
.foreignphrase {
|
|
|
18971c |
font-style: inherit;
|
|
|
18971c |
}
|
|
|
18971c |
@@ -1513,10 +1087,6 @@ h1 {
|
|
|
18971c |
color:#3c6eb4
|
|
|
18971c |
}
|
|
|
18971c |
|
|
|
18971c |
-.producttitle {
|
|
|
18971c |
- background: #3c6eb4 url(../images/h1-bg.png) top left repeat;
|
|
|
18971c |
-}
|
|
|
18971c |
-
|
|
|
18971c |
.section h1.title {
|
|
|
18971c |
color:#3c6eb4;
|
|
|
18971c |
}
|
|
|
18971c |
diff --git a/dracut.modules.7.asc b/dracut.modules.7.asc
|
|
|
18971c |
new file mode 100644
|
|
|
18971c |
index 00000000..4cb2aa15
|
|
|
18971c |
--- /dev/null
|
|
|
18971c |
+++ b/dracut.modules.7.asc
|
|
|
18971c |
@@ -0,0 +1,293 @@
|
|
|
18971c |
+DRACUT.MODULES(7)
|
|
|
18971c |
+=================
|
|
|
18971c |
+:doctype: manpage
|
|
|
18971c |
+:man source: dracut
|
|
|
18971c |
+:man manual: dracut
|
|
|
18971c |
+
|
|
|
18971c |
+NAME
|
|
|
18971c |
+----
|
|
|
18971c |
+dracut.modules - dracut modules
|
|
|
18971c |
+
|
|
|
18971c |
+DESCRIPTION
|
|
|
18971c |
+-----------
|
|
|
18971c |
+== dracut Components
|
|
|
18971c |
+
|
|
|
18971c |
+dracut uses a modular system to build and extend the initramfs image. All
|
|
|
18971c |
+modules are located in _/usr/lib/dracut/modules.d_ or in _<git-src>/modules.d_.
|
|
|
18971c |
+The most basic dracut module is _99base_. In _99base_ the initial shell script
|
|
|
18971c |
+init is defined, which gets run by the kernel after initramfs loading. Although
|
|
|
18971c |
+you can replace init with your own version of _99base_, this is not encouraged.
|
|
|
18971c |
+Instead you should use, if possible, the hooks of dracut. All hooks, and the
|
|
|
18971c |
+point of time in which they are executed, are described in <<stages>>.
|
|
|
18971c |
+
|
|
|
18971c |
+The main script, which creates the initramfs is dracut itsself. It parses all
|
|
|
18971c |
+arguments and sets up the directory, in which everything is installed. It then
|
|
|
18971c |
+executes all check, install, installkernel scripts found in the modules, which
|
|
|
18971c |
+are to be processed. After everything is installed, the install directory is
|
|
|
18971c |
+archived and compressed to the final initramfs image. All helper functions used
|
|
|
18971c |
+by check, install and installkernel are found in in the file _dracut-functions_.
|
|
|
18971c |
+These shell functions are available to all module installer (install,
|
|
|
18971c |
+installkernel) scripts, without the need to source _dracut-functions_.
|
|
|
18971c |
+
|
|
|
18971c |
+A module can check the preconditions for install and installkernel with the
|
|
|
18971c |
+check script. Also dependencies can be expressed with check. If a module passed
|
|
|
18971c |
+check, install and installkernel will be called to install all of the necessary
|
|
|
18971c |
+files for the module. To split between kernel and non-kernel parts of the
|
|
|
18971c |
+installation, all kernel module related parts have to be in installkernel. All
|
|
|
18971c |
+other files found in a module directory are module specific and mostly are hook
|
|
|
18971c |
+scripts and udev rules.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+[[stages]]
|
|
|
18971c |
+== Boot Process Stages
|
|
|
18971c |
+
|
|
|
18971c |
+dracut modules can insert custom script at various points, to control the boot
|
|
|
18971c |
+process.
|
|
|
18971c |
+These hooks are plain directories containing shell scripts ending with ".sh",
|
|
|
18971c |
+which are sourced by init.
|
|
|
18971c |
+Common used functions are in _dracut-lib.sh_, which can be sourced by any script.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Hook: cmdline
|
|
|
18971c |
+
|
|
|
18971c |
+The _cmdline_ hook is a place to insert scripts to parse the kernel command line
|
|
|
18971c |
+and prepare the later actions, like setting up udev rules and configuration
|
|
|
18971c |
+files.
|
|
|
18971c |
+
|
|
|
18971c |
+In this hook the most important environment variable is defined: root. The
|
|
|
18971c |
+second one is rootok, which indicates, that a module claimed to be able to parse
|
|
|
18971c |
+the root defined. So for example, **root=**__iscsi:....__ will be claimed by the
|
|
|
18971c |
+iscsi dracut module, which then sets rootok.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Hook: pre-udev
|
|
|
18971c |
+
|
|
|
18971c |
+This hook is executed right after the cmdline hook and a check if root and
|
|
|
18971c |
+rootok were set. Here modules can take action with the final root, and before
|
|
|
18971c |
+udev has been run.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Start Udev
|
|
|
18971c |
+
|
|
|
18971c |
+Now udev is started and the logging for udev is setup.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Hook: pre-trigger
|
|
|
18971c |
+
|
|
|
18971c |
+In this hook, you can set udev environment variables with **udevadm control
|
|
|
18971c |
+--property=KEY=_value_** or control the further execution of udev with
|
|
|
18971c |
+udevadm.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Trigger Udev
|
|
|
18971c |
+
|
|
|
18971c |
+udev is triggered by calling udevadm trigger, which sends add events for all
|
|
|
18971c |
+devices and subsystems.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Main Loop
|
|
|
18971c |
+
|
|
|
18971c |
+In the main loop of dracut loops until udev has settled and
|
|
|
18971c |
+all scripts in _initqueue/finished_ returned true.
|
|
|
18971c |
+In this loop there are three hooks, where scripts can be inserted
|
|
|
18971c |
+by calling /sbin/initqueue.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Initqueue
|
|
|
18971c |
+
|
|
|
18971c |
+This hook gets executed every time a script is inserted here, regardless of the
|
|
|
18971c |
+udev state.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Initqueue settled
|
|
|
18971c |
+
|
|
|
18971c |
+This hooks (initqueue/settled) gets executed every time udev has settled.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Initqueue timeout
|
|
|
18971c |
+
|
|
|
18971c |
+This hooks (initqueue/timeout) gets executed, when the main loop counter becomes half of the
|
|
|
18971c |
+rd.retry counter.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Initqueue finished
|
|
|
18971c |
+
|
|
|
18971c |
+This hook (initqueue/finished) is called after udev has settled and
|
|
|
18971c |
+if all scripts herein return 0 the main loop will be ended.
|
|
|
18971c |
+Abritary scripts can be added here, to loop in the
|
|
|
18971c |
+initqueue until something happens, which a dracut module wants to wait for.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Hook: pre-mount
|
|
|
18971c |
+
|
|
|
18971c |
+Before the root device is mounted all scripts in the hook pre-mount are
|
|
|
18971c |
+executed. In some cases (e.g. NFS) the real root device is already mounted,
|
|
|
18971c |
+though.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Hook: mount
|
|
|
18971c |
+
|
|
|
18971c |
+This hook is mainly to mount the real root device.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Hook: pre-pivot
|
|
|
18971c |
+
|
|
|
18971c |
+This hook is called before cleanup hook, This is a good place for
|
|
|
18971c |
+actions other than cleanups which need to be called before pivot.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Hook: cleanup
|
|
|
18971c |
+
|
|
|
18971c |
+This hook is the last hook and is called before init finally switches root to
|
|
|
18971c |
+the real root device. This is a good place to clean up and kill processes not
|
|
|
18971c |
+needed anymore.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+=== Cleanup and switch_root
|
|
|
18971c |
+
|
|
|
18971c |
+Init (or systemd) kills all udev processes, cleans up the environment,
|
|
|
18971c |
+sets up the arguments for the real init process and finally calls switch_root.
|
|
|
18971c |
+switch_root removes the whole filesystem hierarchy of the initramfs,
|
|
|
18971c |
+chroot()s to the real root device and calls /sbin/init with the specified arguments.
|
|
|
18971c |
+
|
|
|
18971c |
+To ensure all files in the initramfs hierarchy can be removed, all processes
|
|
|
18971c |
+still running from the initramfs should not have any open file descriptors left.
|
|
|
18971c |
+
|
|
|
18971c |
+== Network Infrastructure
|
|
|
18971c |
+
|
|
|
18971c |
+FIXME
|
|
|
18971c |
+
|
|
|
18971c |
+== Writing a Module
|
|
|
18971c |
+
|
|
|
18971c |
+A simple example module is _96insmodpost_, which modprobes a kernel module after
|
|
|
18971c |
+udev has settled and the basic device drivers have been loaded.
|
|
|
18971c |
+
|
|
|
18971c |
+All module installation information is in the file module-setup.sh.
|
|
|
18971c |
+
|
|
|
18971c |
+First we create a check() function, which just exits with 0 indicating that this
|
|
|
18971c |
+module should be included by default.
|
|
|
18971c |
+
|
|
|
18971c |
+check():
|
|
|
18971c |
+----
|
|
|
18971c |
+return 0
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+The we create the install() function, which installs a cmdline hook with
|
|
|
18971c |
+priority number 20 called _parse-insmodpost.sh_. It also installs the
|
|
|
18971c |
+_insmodpost.sh_ script in _/sbin_.
|
|
|
18971c |
+
|
|
|
18971c |
+install():
|
|
|
18971c |
+----
|
|
|
18971c |
+inst_hook cmdline 20 "$moddir/parse-insmodpost.sh"
|
|
|
18971c |
+inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+The _pase-instmodpost.sh_ parses the kernel command line for a argument
|
|
|
18971c |
+rd.driver.post, blacklists the module from being autoloaded and installs the
|
|
|
18971c |
+hook _insmodpost.sh_ in the _initqueue/settled_.
|
|
|
18971c |
+
|
|
|
18971c |
+_parse-insmodpost.sh_:
|
|
|
18971c |
+----
|
|
|
18971c |
+for p in $(getargs rd.driver.post=); do
|
|
|
18971c |
+ echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
|
|
|
18971c |
+ _do_insmodpost=1
|
|
|
18971c |
+done
|
|
|
18971c |
+
|
|
|
18971c |
+[ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh
|
|
|
18971c |
+unset _do_insmodpost
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+_insmodpost.sh_, which is called in the _initqueue/settled_ hook will just
|
|
|
18971c |
+modprobe the kernel modules specified in all rd.driver.post kernel command line
|
|
|
18971c |
+parameters. It runs after udev has settled and is only called once (--onetime).
|
|
|
18971c |
+
|
|
|
18971c |
+_insmodpost.sh_:
|
|
|
18971c |
+----
|
|
|
18971c |
+. /lib/dracut-lib.sh
|
|
|
18971c |
+
|
|
|
18971c |
+for p in $(getargs rd.driver.post=); do
|
|
|
18971c |
+ modprobe $p
|
|
|
18971c |
+done
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+=== module-setup.sh: check()
|
|
|
18971c |
+
|
|
|
18971c |
+_check()_ is called by dracut to evaluate the inclusion of a dracut module in
|
|
|
18971c |
+the initramfs.
|
|
|
18971c |
+
|
|
|
18971c |
+$hostonly:: If the $hostonly variable is set, then the module check() function
|
|
|
18971c |
+should be in "hostonly" mode, which means, that the check() should only return
|
|
|
18971c |
+0, if the module is really needed to boot this specific host.
|
|
|
18971c |
+
|
|
|
18971c |
+check() should return with:
|
|
|
18971c |
+
|
|
|
18971c |
+0:: Include the dracut module in the initramfs.
|
|
|
18971c |
+
|
|
|
18971c |
+1:: Do not include the dracut module. The requirements are not fullfilled
|
|
|
18971c |
+(missing tools, etc.)
|
|
|
18971c |
+
|
|
|
18971c |
+255:: Only include the dracut module, if another module requires it or if
|
|
|
18971c |
+explicitly specified in the config file or on the argument list.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+=== module-setup.sh: depends()
|
|
|
18971c |
+
|
|
|
18971c |
+The function depends() should echo all other dracut module names the module
|
|
|
18971c |
+depends on.
|
|
|
18971c |
+
|
|
|
18971c |
+=== module-setup.sh: cmdline()
|
|
|
18971c |
+
|
|
|
18971c |
+This function should print the kernel command line options needed to boot the current
|
|
|
18971c |
+machine setup. It should start with a space and should not print a newline.
|
|
|
18971c |
+
|
|
|
18971c |
+=== module-setup.sh: install()
|
|
|
18971c |
+
|
|
|
18971c |
+The install() function is called to install everything non-kernel related. To install
|
|
|
18971c |
+binaries, scripts, and other files, you can use the functions mentioned in <<creation>>.
|
|
|
18971c |
+
|
|
|
18971c |
+To address a file in the current module directory, use the variable "$moddir".
|
|
|
18971c |
+
|
|
|
18971c |
+=== module-setup.sh: installkernel()
|
|
|
18971c |
+
|
|
|
18971c |
+In installkernel() all kernel related files should be installed. You can use all of the functions
|
|
|
18971c |
+mentioned in <<creation>> to install files.
|
|
|
18971c |
+
|
|
|
18971c |
+=== [[creation]]Creation Functions
|
|
|
18971c |
+
|
|
|
18971c |
+==== inst_multiple [-o] <file> [ <file> ...]
|
|
|
18971c |
+
|
|
|
18971c |
+installs multiple binaries and files. If executables are specified without a path, dracut
|
|
|
18971c |
+will search the path PATH=/usr/sbin:/sbin:/usr/bin:/bin for the binary. If the option "-o"
|
|
|
18971c |
+is given as the first parameter, a missing file does not lead to an error.
|
|
|
18971c |
+
|
|
|
18971c |
+==== inst <src> [<dst>]
|
|
|
18971c |
+
|
|
|
18971c |
+installs _one_ file <src> either to the same place in the initramfs or to an optional <dst>.
|
|
|
18971c |
+
|
|
|
18971c |
+==== inst_hook <hookdir> <prio> <src>
|
|
|
18971c |
+
|
|
|
18971c |
+installs an executable/script <src> in the dracut hook <hookdir> with priority <prio>.
|
|
|
18971c |
+
|
|
|
18971c |
+==== inst_rules <udevrule> [ <udevrule> ...]
|
|
|
18971c |
+
|
|
|
18971c |
+installs one ore more udev rules. Non-existant udev rules are reported, but do not let dracut fail.
|
|
|
18971c |
+
|
|
|
18971c |
+==== instmods <kernelmodule> [ <kernelmodule> ... ]
|
|
|
18971c |
+
|
|
|
18971c |
+instmods should be used only in the installkernel() function.
|
|
|
18971c |
+
|
|
|
18971c |
+instmods installs one or more kernel modules in the initramfs. <kernelmodule> can also be a whole
|
|
|
18971c |
+subsystem, if prefixed with a "=", like "=drivers/net/team".
|
|
|
18971c |
+
|
|
|
18971c |
+instmods will not install the kernel module, if $hostonly is set and the kernel module is not currently
|
|
|
18971c |
+needed by any /sys/*...*/uevent MODALIAS.
|
|
|
18971c |
+To install a kernel module regardless of the hostonly mode use the form:
|
|
|
18971c |
+----
|
|
|
18971c |
+hostonly='' instmods <kernelmodule>
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+=== Initramfs Functions
|
|
|
18971c |
+
|
|
|
18971c |
+FIXME
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+=== Network Modules
|
|
|
18971c |
+
|
|
|
18971c |
+FIXME
|
|
|
18971c |
+
|
|
|
18971c |
+AUTHOR
|
|
|
18971c |
+------
|
|
|
18971c |
+Harald Hoyer
|
|
|
18971c |
+
|
|
|
18971c |
+SEE ALSO
|
|
|
18971c |
+--------
|
|
|
18971c |
+*dracut*(8)
|
|
|
18971c |
diff --git a/dracut.spec b/dracut.spec
|
|
|
18971c |
index b1cf9fef..8dfc7535 100644
|
|
|
18971c |
--- a/dracut.spec
|
|
|
18971c |
+++ b/dracut.spec
|
|
|
18971c |
@@ -316,6 +316,7 @@ rm -rf -- $RPM_BUILD_ROOT
|
|
|
18971c |
%endif
|
|
|
18971c |
%{_mandir}/man7/dracut.kernel.7*
|
|
|
18971c |
%{_mandir}/man7/dracut.cmdline.7*
|
|
|
18971c |
+%{_mandir}/man7/dracut.modules.7*
|
|
|
18971c |
%{_mandir}/man7/dracut.bootup.7*
|
|
|
18971c |
%{_mandir}/man5/dracut.conf.5*
|
|
|
18971c |
%if %{defined _unitdir}
|
|
|
18971c |
diff --git a/dracut.usage.asc b/dracut.usage.asc
|
|
|
18971c |
new file mode 100644
|
|
|
18971c |
index 00000000..6d37920f
|
|
|
18971c |
--- /dev/null
|
|
|
18971c |
+++ b/dracut.usage.asc
|
|
|
18971c |
@@ -0,0 +1,526 @@
|
|
|
18971c |
+To create a initramfs image, the most simple command is:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+This will generate a general purpose initramfs image, with all possible
|
|
|
18971c |
+functionality resulting of the combination of the installed dracut modules and
|
|
|
18971c |
+system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
|
|
|
18971c |
+contains the kernel modules of the currently active kernel with version
|
|
|
18971c |
+_++<kernel version>++_.
|
|
|
18971c |
+
|
|
|
18971c |
+If the initramfs image already exists, dracut will display an error message, and
|
|
|
18971c |
+to overwrite the existing image, you have to use the --force option.
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --force
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+If you want to specify another filename for the resulting image you would issue
|
|
|
18971c |
+a command like:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut foobar.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+To generate an image for a specific kernel version, the command would be:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut foobar.img 2.6.40-1.rc5.f20
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+A shortcut to generate the image at the default location for a specific kernel
|
|
|
18971c |
+version is:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --kver 2.6.40-1.rc5.f20
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+If you want to create lighter, smaller initramfs images, you may want to specify
|
|
|
18971c |
+the --hostonly or -H option. Using this option, the resulting image will
|
|
|
18971c |
+contain only those dracut modules, kernel modules and filesystems, which are
|
|
|
18971c |
+needed to boot this specific machine. This has the drawback, that you can't put
|
|
|
18971c |
+the disk on another controller or machine, and that you can't switch to another
|
|
|
18971c |
+root filesystem, without recreating the initramfs image. The usage of the
|
|
|
18971c |
+--hostonly option is only for experts and you will have to keep the broken
|
|
|
18971c |
+pieces. At least keep a copy of a general purpose image (and corresponding
|
|
|
18971c |
+kernel) as a fallback to rescue your system.
|
|
|
18971c |
+
|
|
|
18971c |
+=== Inspecting the Contents
|
|
|
18971c |
+To see the contents of the image created by dracut, you can use the lsinitrd tool.
|
|
|
18971c |
+----
|
|
|
18971c |
+# lsinitrd | less
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+To display the contents of a file in the initramfs also use the lsinitrd tool:
|
|
|
18971c |
+----
|
|
|
18971c |
+# lsinitrd -f /etc/ld.so.conf
|
|
|
18971c |
+include ld.so.conf.d/*.conf
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+=== Adding dracut Modules
|
|
|
18971c |
+Some dracut modules are turned off by default and have to be activated manually.
|
|
|
18971c |
+You can do this by adding the dracut modules to the configuration file
|
|
|
18971c |
+_/etc/dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_. See *dracut.conf*(5).
|
|
|
18971c |
+You can also add dracut modules on the command line
|
|
|
18971c |
+by using the -a or --add option:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --add bootchart initramfs-bootchart.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+To see a list of available dracut modules, use the --list-modules option:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --list-modules
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+=== Omitting dracut Modules
|
|
|
18971c |
+Sometimes you don't want a dracut module to be included for reasons of speed,
|
|
|
18971c |
+size or functionality. To do this, either specify the omit_dracutmodules
|
|
|
18971c |
+variable in the _dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_ configuration
|
|
|
18971c |
+file (see *dracut.conf*(5)), or use the -o or --omit option
|
|
|
18971c |
+on the command line:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut -o "multipath lvm" no-multipath-lvm.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+=== Adding Kernel Modules
|
|
|
18971c |
+If you need a special kernel module in the initramfs, which is not
|
|
|
18971c |
+automatically picked up by dracut, you have the use the --add-drivers option
|
|
|
18971c |
+on the command line or the drivers vaiable in the _/etc/dracut.conf_
|
|
|
18971c |
+or _/etc/dracut.conf.d/myconf.conf_ configuration file (see *dracut.conf*(5)):
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --add-drivers mymod initramfs-with-mymod.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+=== Boot parameters
|
|
|
18971c |
+An initramfs generated without the "hostonly" mode, does not contain any system
|
|
|
18971c |
+configuration files (except for some special exceptions), so the configuration
|
|
|
18971c |
+has to be done on the kernel command line. With this flexibility, you can easily
|
|
|
18971c |
+boot from a changed root partition, without the need to recompile the initramfs
|
|
|
18971c |
+image. So, you could completly change your root partition (move it inside a md
|
|
|
18971c |
+raid with encryption and LVM on top), as long as you specify the correct
|
|
|
18971c |
+filesystem LABEL or UUID on the kernel command line for your root device, dracut
|
|
|
18971c |
+will find it and boot from it.
|
|
|
18971c |
+
|
|
|
18971c |
+The kernel command line usually can be configured in _/boot/grub/grub.conf_, if
|
|
|
18971c |
+grub is your bootloader and it also can be edited in the real boot process in
|
|
|
18971c |
+the grub menu.
|
|
|
18971c |
+
|
|
|
18971c |
+The kernel command line can also be provided by the dhcp server with the
|
|
|
18971c |
+root-path option. See <<NetworkBoot>>.
|
|
|
18971c |
+
|
|
|
18971c |
+For a full reference of all kernel command line parameters, see *dracut.cmdline*(5).
|
|
|
18971c |
+
|
|
|
18971c |
+To get a quick start for the suitable kernel command line on your system, use the
|
|
|
18971c |
+__--print-cmdline__ option:
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --print-cmdline
|
|
|
18971c |
+ root=UUID=8b8b6f91-95c7-4da2-831b-171e12179081 rootflags=rw,relatime,discard,data=ordered rootfstype=ext4
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+==== Specifying the root Device
|
|
|
18971c |
+This is the only option dracut really needs to boot from your root partition.
|
|
|
18971c |
+Because your root partition can live in various environments, there are a lot of
|
|
|
18971c |
+formats for the root= option. The most basic one is root=_++
|
|
|
18971c |
+node>++_:
|
|
|
18971c |
+----
|
|
|
18971c |
+root=/dev/sda2
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+Because device node names can change, dependent on the drive ordering, you are
|
|
|
18971c |
+encouraged to use the filesystem identifier (UUID) or filesystem label (LABEL)
|
|
|
18971c |
+to specify your root partition:
|
|
|
18971c |
+----
|
|
|
18971c |
+root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+or
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+root=LABEL=myrootpartitionlabel
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+To see all UUIDs or LABELs on your system, do:
|
|
|
18971c |
+----
|
|
|
18971c |
+# ls -l /dev/disk/by-uuid
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+or
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+# ls -l /dev/disk/by-label
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+If your root partition is on the network see <<NetworkBoot>>.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Keyboard Settings
|
|
|
18971c |
+If you have to input passwords for encrypted disk volumes, you might want to set
|
|
|
18971c |
+the keyboard layout and specify a display font.
|
|
|
18971c |
+
|
|
|
18971c |
+A typical german kernel command would contain:
|
|
|
18971c |
+----
|
|
|
18971c |
+rd.vconsole.font=latarcyrheb-sun16 rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+Setting these options can override the setting stored on your system, if you use
|
|
|
18971c |
+a modern init system, like systemd.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Blacklisting Kernel Modules
|
|
|
18971c |
+Sometimes it is required to prevent the automatic kernel module loading of a
|
|
|
18971c |
+specific kernel module. To do this, just add rd.blacklist=_++
|
|
|
18971c |
+name>++_, with _++<kernel module name>++_ not containing the _.ko_
|
|
|
18971c |
+suffix, to the kernel command line. For example:
|
|
|
18971c |
+----
|
|
|
18971c |
+rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+The option can be specified multiple times on the kernel command line.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Speeding up the Boot Process
|
|
|
18971c |
+If you want to speed up the boot process, you can specify as much information
|
|
|
18971c |
+for dracut on the kernel command as possible. For example, you can tell dracut,
|
|
|
18971c |
+that you root partition is not on a LVM volume or not on a raid partition, or
|
|
|
18971c |
+that it lives inside a specific crypto LUKS encrypted volume. By default, dracut
|
|
|
18971c |
+searches everywhere. A typical dracut kernel command line for a plain primary or
|
|
|
18971c |
+logical partition would contain:
|
|
|
18971c |
+----
|
|
|
18971c |
+rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+This turns off every automatic assembly of LVM, MD raids, DM raids and crypto LUKS.
|
|
|
18971c |
+
|
|
|
18971c |
+Of course, you could also omit the dracut modules in the initramfs creation
|
|
|
18971c |
+process, but then you would lose the posibility to turn it on on demand.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+[[Injecting]]
|
|
|
18971c |
+=== Injecting custom Files
|
|
|
18971c |
+To add your own files to the initramfs image, you have several possibilities.
|
|
|
18971c |
+
|
|
|
18971c |
+The --include option let you specify a source path and a target path. For example
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img
|
|
|
18971c |
+----
|
|
|
18971c |
+will create an initramfs image, where the file cmdline-preset will be copied
|
|
|
18971c |
+inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only be specified once.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+# mkdir -p rd.live.overlay/etc/cmdline.d
|
|
|
18971c |
+# mkdir -p rd.live.overlay/etc/conf.d
|
|
|
18971c |
+# echo "ip=auto" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf
|
|
|
18971c |
+# echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
|
|
|
18971c |
+# echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
|
|
|
18971c |
+# tree rd.live.overlay/
|
|
|
18971c |
+rd.live.overlay/
|
|
|
18971c |
+`-- etc
|
|
|
18971c |
+ |-- cmdline.d
|
|
|
18971c |
+ | `-- mycmdline.conf
|
|
|
18971c |
+ `-- conf.d
|
|
|
18971c |
+ `-- testvar.conf
|
|
|
18971c |
+
|
|
|
18971c |
+# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+This will put the contents of the rd.live.overlay directory into the root of the
|
|
|
18971c |
+initramfs image.
|
|
|
18971c |
+
|
|
|
18971c |
+The --install option let you specify several files, which will get installed in
|
|
|
18971c |
+the initramfs image at the same location, as they are present on initramfs
|
|
|
18971c |
+creation time.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+This will create an initramfs with the strace, fsck.ext3 and ssh executables,
|
|
|
18971c |
+together with the libraries needed to start those. The --install option can be
|
|
|
18971c |
+specified multiple times.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+[[NetworkBoot]]
|
|
|
18971c |
+=== Network Boot
|
|
|
18971c |
+
|
|
|
18971c |
+If your root partition is on a network drive, you have to have the network
|
|
|
18971c |
+dracut modules installed to create a network aware initramfs image.
|
|
|
18971c |
+
|
|
|
18971c |
+On a Red Hat Enterprise Linux or Fedora system, this means, you have to install
|
|
|
18971c |
+the _dracut-network_ rpm package:
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+# yum install dracut-network
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+The resulting initramfs image can be served by a boot manager residing on your
|
|
|
18971c |
+local hard drive or it can be served by a PXE/TFTP server.
|
|
|
18971c |
+
|
|
|
18971c |
+How to setup your PXE/TFTP server can be found in the
|
|
|
18971c |
+http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red
|
|
|
18971c |
+Hat Enterprise Linux Storage Administration Guide].
|
|
|
18971c |
+
|
|
|
18971c |
+If you specify ip=auto on the kernel command line, then dracut asks a dhcp
|
|
|
18971c |
+server about the ip adress for the machine. The dhcp server can also serve an
|
|
|
18971c |
+additional root-path, which will set the root device for dracut. With this
|
|
|
18971c |
+mechanism, you have static configuration on your client machine and a
|
|
|
18971c |
+centralized boot configuration on your TFTP/DHCP server. If you can't pass a
|
|
|
18971c |
+kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a method described
|
|
|
18971c |
+in <<Injecting>>.
|
|
|
18971c |
+
|
|
|
18971c |
+==== Reducing the Image Size
|
|
|
18971c |
+
|
|
|
18971c |
+To reduce the size of the initramfs, you should create it with by ommitting all
|
|
|
18971c |
+dracut modules, which you know, you don't need to boot the machine.
|
|
|
18971c |
+
|
|
|
18971c |
+You can also specify the exact dracut and kernel modules to produce a very tiny
|
|
|
18971c |
+initramfs image.
|
|
|
18971c |
+
|
|
|
18971c |
+For example for a NFS image, you would do:
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut -m "nfs network base" initramfs-nfs-only.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+Then you would boot from this image with your target machine and reduce the size
|
|
|
18971c |
+once more by creating it on the target machine with the --host-only option:
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+# dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+This will reduce the size of the initramfs image significantly.
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+== Troubleshooting
|
|
|
18971c |
+
|
|
|
18971c |
+If the boot process does not succeed, you have several options to debug the
|
|
|
18971c |
+situation. Some of the basic operations are covered here. For more information
|
|
|
18971c |
+you should also visit:
|
|
|
18971c |
+http://fedoraproject.org/wiki/How_to_debug_Dracut_problems
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+[[identifying-your-problem-area]]
|
|
|
18971c |
+=== Identifying your problem area
|
|
|
18971c |
+. Remove ''rhgb'' and ''quiet'' from the kernel command line
|
|
|
18971c |
+. Add ''rd.shell'' to the kernel command line. This will present a shell should
|
|
|
18971c |
+dracut be unable to locate your root device
|
|
|
18971c |
+. Add ''rd.shell rd.debug log_buf_len=1M'' to the kernel command line so that
|
|
|
18971c |
+dracut shell commands are printed as they are executed
|
|
|
18971c |
+. The file /run/initramfs/rdsosreport.txt is generated,
|
|
|
18971c |
+which contains all the logs and the output of all significant tools, which are mentioned later.
|
|
|
18971c |
+
|
|
|
18971c |
+If you want to save that output, simply mount /boot by hand or insert an USB stick and mount that.
|
|
|
18971c |
+Then you can store the output for later inspection.
|
|
|
18971c |
+
|
|
|
18971c |
+[[information-to-include-in-your-report]]
|
|
|
18971c |
+=== Information to include in your report
|
|
|
18971c |
+
|
|
|
18971c |
+[[all-bug-reports]]
|
|
|
18971c |
+==== All bug reports
|
|
|
18971c |
+In all cases, the following should be mentioned and attached to your bug report:
|
|
|
18971c |
+
|
|
|
18971c |
+* The exact kernel command-line used. Typically from the bootloader
|
|
|
18971c |
+configuration file (e.g. _/etc/grub.conf_) or from _/proc/cmdline_.
|
|
|
18971c |
+* A copy of your disk partition information from _/etc/fstab_, which might be
|
|
|
18971c |
+obtained booting an old working initramfs or a rescue medium.
|
|
|
18971c |
+* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach
|
|
|
18971c |
+the file /run/initramfs/rdsosreport.txt.
|
|
|
18971c |
+* If you use a dracut configuration file, please include _/etc/dracut.conf_ and
|
|
|
18971c |
+all files in _/etc/dracut.conf.d/*.conf_
|
|
|
18971c |
+
|
|
|
18971c |
+[[network-root-device-related-problems]]
|
|
|
18971c |
+==== Network root device related problems
|
|
|
18971c |
+This section details information to include when experiencing problems on a
|
|
|
18971c |
+system whose root device is located on a network attached volume (e.g. iSCSI,
|
|
|
18971c |
+NFS or NBD). As well as the information from <<all-bug-reports>>, include the
|
|
|
18971c |
+following information:
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+* Please include the output of
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+# /sbin/ifup <interfacename>
|
|
|
18971c |
+# ip addr show
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+[[debugging-dracut]]
|
|
|
18971c |
+=== Debugging dracut
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+[[configure-a-serial-console]]
|
|
|
18971c |
+==== Configure a serial console
|
|
|
18971c |
+
|
|
|
18971c |
+Successfully debugging dracut will require some form of console
|
|
|
18971c |
+logging during the system boot. This section documents configuring a
|
|
|
18971c |
+serial console connection to record boot messages.
|
|
|
18971c |
+
|
|
|
18971c |
+. First, enable serial console output for both the kernel and the bootloader.
|
|
|
18971c |
+. Open the file _/etc/grub.conf_ for editing. Below the line ''timeout=5'', add
|
|
|
18971c |
+the following:
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+serial --unit=0 --speed=9600
|
|
|
18971c |
+terminal --timeout=5 serial console
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. Also in _/etc/grub.conf_, add the following boot arguemnts to the ''kernel''
|
|
|
18971c |
+line:
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+console=tty0 console=ttyS0,9600
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. When finished, the _/etc/grub.conf_ file should look similar to the example
|
|
|
18971c |
+below.
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+default=0
|
|
|
18971c |
+timeout=5
|
|
|
18971c |
+serial --unit=0 --speed=9600
|
|
|
18971c |
+terminal --timeout=5 serial console
|
|
|
18971c |
+title Fedora (2.6.29.5-191.fc11.x86_64)
|
|
|
18971c |
+ root (hd0,0)
|
|
|
18971c |
+ kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
|
|
|
18971c |
+ initrd /dracut-2.6.29.5-191.fc11.x86_64.img
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. More detailed information on how to configure the kernel for console output
|
|
|
18971c |
+can be found at
|
|
|
18971c |
+http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL.
|
|
|
18971c |
+. Redirecting non-interactive output
|
|
|
18971c |
++
|
|
|
18971c |
+--
|
|
|
18971c |
+NOTE: You can redirect all non-interactive output to _/dev/kmsg_ and the kernel
|
|
|
18971c |
+will put it out on the console when it reaches the kernel buffer by doing
|
|
|
18971c |
+
|
|
|
18971c |
+----
|
|
|
18971c |
+# exec >/dev/kmsg 2>&1
|
|
|
18971c |
+----
|
|
|
18971c |
+--
|
|
|
18971c |
+
|
|
|
18971c |
+[[using-the-dracut-shell]]
|
|
|
18971c |
+==== Using the dracut shell
|
|
|
18971c |
+
|
|
|
18971c |
+dracut offers a shell for interactive debugging in the event dracut fails to
|
|
|
18971c |
+locate your root filesystem. To enable the shell:
|
|
|
18971c |
+
|
|
|
18971c |
+. Add the boot parameter ''rd.shell'' to your bootloader configuration file
|
|
|
18971c |
+(e.g. _/etc/grub.conf_)
|
|
|
18971c |
+. Remove the boot arguments ''rhgb'' and ''quiet''
|
|
|
18971c |
++
|
|
|
18971c |
+A sample _/etc/grub.conf_ bootloader configuration file is listed below.
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+default=0
|
|
|
18971c |
+timeout=5
|
|
|
18971c |
+serial --unit=0 --speed=9600
|
|
|
18971c |
+terminal --timeout=5 serial console
|
|
|
18971c |
+title Fedora (2.6.29.5-191.fc11.x86_64)
|
|
|
18971c |
+ root (hd0,0)
|
|
|
18971c |
+ kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
|
|
|
18971c |
+ initrd /dracut-2.6.29.5-191.fc11.x86_64.img
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. If system boot fails, you will be dropped into a shell as seen in the example below.
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+No root device found
|
|
|
18971c |
+Dropping to debug shell.
|
|
|
18971c |
+
|
|
|
18971c |
+#
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. Use this shell prompt to gather the information requested above (see <<all-bug-reports>>).
|
|
|
18971c |
+
|
|
|
18971c |
+[[accessing-the-root-volume-from-the-dracut-shell]]
|
|
|
18971c |
+==== Accessing the root volume from the dracut shell
|
|
|
18971c |
+From the dracut debug shell, you can manually perform the task of locating and
|
|
|
18971c |
+preparing your root volume for boot. The required steps will depend on how your
|
|
|
18971c |
+root volume is configured. Common scenarios include:
|
|
|
18971c |
+
|
|
|
18971c |
+* A block device (e.g. _/dev/sda7_)
|
|
|
18971c |
+* A LVM logical volume (e.g. _/dev/VolGroup00/LogVol00_)
|
|
|
18971c |
+* An encrypted device (e.g. _/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83_)
|
|
|
18971c |
+* A network attached device (e.g. netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.fedoraproject:for.all)
|
|
|
18971c |
+
|
|
|
18971c |
+The exact method for locating and preparing will vary. However, to continue with
|
|
|
18971c |
+a successful boot, the objective is to locate your root volume and create a
|
|
|
18971c |
+symlink _/dev/root_ which points to the file system. For example, the following
|
|
|
18971c |
+example demonstrates accessing and booting a root volume that is an encrypted
|
|
|
18971c |
+LVM Logical volume.
|
|
|
18971c |
+
|
|
|
18971c |
+. Inspect your partitions using parted
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+# parted /dev/sda -s p
|
|
|
18971c |
+Model: ATA HTS541060G9AT00 (scsi)
|
|
|
18971c |
+Disk /dev/sda: 60.0GB
|
|
|
18971c |
+Sector size (logical/physical): 512B/512B
|
|
|
18971c |
+Partition Table: msdos
|
|
|
18971c |
+Number Start End Size Type File system Flags
|
|
|
18971c |
+1 32.3kB 10.8GB 107MB primary ext4 boot
|
|
|
18971c |
+2 10.8GB 55.6GB 44.7GB logical lvm
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. You recall that your root volume was a LVM logical volume. Scan and activate
|
|
|
18971c |
+any logical volumes.
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+# lvm vgscan
|
|
|
18971c |
+# lvm vgchange -ay
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. You should see any logical volumes now using the command blkid:
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+# blkid
|
|
|
18971c |
+/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
|
|
|
18971c |
+/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
|
|
|
18971c |
+/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
|
|
|
18971c |
+/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
|
|
|
18971c |
+/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. From the output above, you recall that your root volume exists on an encrypted
|
|
|
18971c |
+block device. Following the guidance disk encryption guidance from the
|
|
|
18971c |
+Installation Guide, you unlock your encrypted root volume.
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+# UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
|
|
|
18971c |
+# cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
|
|
|
18971c |
+Enter passphrase for /dev/mapper/linux-root:
|
|
|
18971c |
+Key slot 0 unlocked.
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. Next, make a symbolic link to the unlocked root volume
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+# ln -s /dev/mapper/luks-$UUID /dev/root
|
|
|
18971c |
+----
|
|
|
18971c |
++
|
|
|
18971c |
+. With the root volume available, you may continue booting the system by exiting
|
|
|
18971c |
+the dracut shell
|
|
|
18971c |
++
|
|
|
18971c |
+----
|
|
|
18971c |
+# exit
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+[[additional-dracut-boot-parameters]]
|
|
|
18971c |
+==== Additional dracut boot parameters
|
|
|
18971c |
+For more debugging options, see *dracut.cmdline*(7).
|
|
|
18971c |
+
|
|
|
18971c |
+
|
|
|
18971c |
+[[debugging-dracut-on-shutdown]]
|
|
|
18971c |
+==== Debugging dracut on shutdown
|
|
|
18971c |
+
|
|
|
18971c |
+To debug the shutdown sequence on systemd systems, you can _rd.break_
|
|
|
18971c |
+on _pre-shutdown_ or _shutdown_.
|
|
|
18971c |
+
|
|
|
18971c |
+To do this from an already booted system:
|
|
|
18971c |
+----
|
|
|
18971c |
+# mkdir -p /run/initramfs/etc/cmdline.d
|
|
|
18971c |
+# echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
|
|
|
18971c |
+# touch /run/initramfs/.need_shutdown
|
|
|
18971c |
+----
|
|
|
18971c |
+
|
|
|
18971c |
+This will give you a dracut shell after the system pivot'ed back in the initramfs.
|
|
|
18971c |
+
|