]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - dracut.8.asc
Generate reproducible initramfs images
[thirdparty/dracut.git] / dracut.8.asc
index 1f7100b11d3d5ba390f36ddd2b023ed26db691bd..44530bd372fb8df9e109023b5f15e5719e564de3 100644 (file)
@@ -10,7 +10,7 @@ dracut - low-level tool for generating an initramfs image
 
 SYNOPSIS
 --------
-*dracut* ['OPTION...'] [<image> [_<kernel version>_]]
+*dracut* [__OPTION...__] [__<image>__ [__<kernel version>__]]
 
 DESCRIPTION
 -----------
@@ -30,53 +30,17 @@ early userspace.
 
 For a complete list of kernel command line options see *dracut.cmdline*(7).
 
-EXAMPLE
--------
-
-To create a initramfs image, the most simple command is:
-----
-# dracut
-----
-
-This will generate a general purpose initramfs image, with all possible
-functionality resulting of the combination of the installed dracut modules and
-system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
-contains the kernel modules of the currently active kernel with version
-_++<kernel version>++_.
-
-If the initramfs image already exists, dracut will display an error message, and
-to overwrite the existing image, you have to use the --force option.
-----
-# dracut --force
-----
-
-If you want to specify another filename for the resulting image you would issue
-a command like:
-----
-# dracut foobar.img
-----
-
-To generate an image for a specific kernel version, the command would be:
-----
-# dracut foobar.img 2.6.40-1.rc5.f20
-----
-
-A shortcut to generate the image at the default location for a specific kernel
-version is:
-----
-# dracut --kver 2.6.40-1.rc5.f20
-----
+If you are dropped to an emergency shell, while booting your initramfs,
+the file _/run/initramfs/rdsosreport.txt_ is created, which can be safed to a
+(to be mounted by hand) partition (usually /boot) or a USB stick.
+Additional debugging info can be produced by adding **rd.debug** to the kernel
+command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output
+of some tools. It should be attached to any report about dracut problems.
 
-If you want to create lighter, smaller initramfs images, you may want to specify
-the --host-only or -H option. Using this option, the resulting image will
-contain only those dracut modules, kernel modules and filesystems, which are
-needed to boot this specific machine. This has the drawback, that you can't put
-the disk on another controller or machine, and that you can't switch to another
-root filesystem, without recreating the initramfs image. The usage of the
---host-only option is only for experts and you will have to keep the broken
-pieces. At least keep a copy of a general purpose image (and corresponding
-kernel) as a fallback to rescue your system.
+USAGE
+-----
 
+include::dracut.usage.asc[]
 
 OPTIONS
 -------
@@ -218,6 +182,15 @@ example:
 **--no-kernel**::
     do not install kernel drivers and firmware files
 
+**--early-microcode**::
+    Combine early microcode with ramdisk
+
+**--no-early-microcode**::
+    Do not combine early microcode with ramdisk
+
+**--print-cmdline**::
+    print the kernel command line for the current disk layout
+
 **--mdadmconf**::
     include local _/etc/mdadm.conf_
 
@@ -248,10 +221,16 @@ example:
     inhibit installation of any fsck tools
 
 **--strip**::
-    strip binaries in the initramfs
+    strip binaries in the initramfs (default)
 
 **--nostrip**::
-    do not strip binaries in the initramfs (default)
+    do not strip binaries in the initramfs
+
+**--prelink**::
+    prelink binaries in the initramfs (default)
+
+**--noprelink**::
+    do not prelink binaries in the initramfs
 
 **--hardlink**::
     hardlink files in the initramfs (default)
@@ -296,6 +275,12 @@ Default:
 
 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
 
+**--logfile** _<logfile>_:: logfile to use; overrides any setting from
+    the configuration files.
++
+Default:
+    _/var/log/dracut.log_
+
 **-l, --local**::
     activates the local mode. dracut will use modules from the current working
     directory instead of the system-wide installed modules in
@@ -315,26 +300,44 @@ provide a valid _/etc/fstab_.
 **-N, --no-hostonly**::
     Disable Host-Only mode
 
+**--hostonly-cmdline**:
+    Store kernel command line arguments needed in the initramfs
+
+**--no-hostonly-cmdline**:
+    Do not store kernel command line arguments needed in the initramfs
+
+**--persistent-policy** _<policy>_::
+    Use _<policy>_ to address disks and partitions.
+    _<policy>_ can be any directory name found in /dev/disk.
+    E.g. "by-uuid", "by-label"
+
 **--fstab**::
     Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
 
-**--add-fstab** _<filename>_ ::
+**--add-fstab** _<filename>_::
     Add entries of _<filename>_ to the initramfs /etc/fstab.
 
-**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ _<filesystem options>_"::
-    Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ and _<filesystem
-    options>_ in the initramfs
-
-**--device** _<device>_ ::
-    Bring up _<device>_ in initramfs, _<device>_ should be the device name
-
-**-i, --include** _<SOURCE>_ _<TARGET>_::
+**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ [_<filesystem options>_ [_<dump frequency>_ [_<fsck order>_]]]"::
+    Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ in the
+    initramfs. _<filesystem options>_, _<dump options>_ and _<fsck order>_ can
+    be specified, see fstab manpage for the details.
+    The default _<filesystem options>_ is "defaults".
+    The default _<dump frequency>_ is "0".
+    the default _<fsck order>_ is "2".
+
+**--add-device** _<device>_ ::
+    Bring up _<device>_ in initramfs, _<device>_ should be the device name.
+    This can be useful in hostonly mode for resume support when your swap is on
+    LVM or an encrypted partition.
+    [NB --device can be used for compatibility with earlier releases]
+
+**-i, --include** _<SOURCE>_ _<TARGET>_::
     include the files in the SOURCE directory into the
     TARGET directory in the final initramfs. If SOURCE is a file, it will be
     installed to TARGET in the final initramfs. This parameter can be specified
     multiple times.
 
-**-I, --install** _<file list>_::
+**-I, --install** _<file list>_::
     install the space separated list of files into the initramfs.
 +
 [NOTE]
@@ -346,6 +349,9 @@ example:
 ----
 ===============================
 
+**--install-optional** _<file list>_::
+    install the space separated list of files into the initramfs, if they exist.
+
 **--gzip**::
     Compress the generated initramfs using gzip. This will be done by default,
     unless another compression option or --no-compress is passed. Equivalent to
@@ -366,7 +372,7 @@ will not be able to boot. Equivalent to "--compress=bzip2"
 [WARNING]
 ====
 Make sure your kernel has lzma decompression support compiled in, otherwise you
-will not be able to boot. Equivalent to "--compress=lzma -9"
+will not be able to boot. Equivalent to "lzma --compress=lzma -9"
 ====
 
 **--xz**::
@@ -375,8 +381,24 @@ will not be able to boot. Equivalent to "--compress=lzma -9"
 [WARNING]
 ====
 Make sure your kernel has xz decompression support compiled in, otherwise you
-will not be able to boot. Equivalent to "--compress=xz --check=crc32
---lzma2=dict=1MiB"
+will not be able to boot. Equivalent to
+"lzma --compress=xz --check=crc32 --lzma2=dict=1MiB"
+====
+
+**--lzo**::
+    Compress the generated initramfs using lzop.
+[WARNING]
+====
+Make sure your kernel has lzo decompression support compiled in, otherwise you
+will not be able to boot.
+====
+
+**--lz4**::
+    Compress the generated initramfs using lz4.
+[WARNING]
+====
+Make sure your kernel has lz4 decompression support compiled in, otherwise you
+will not be able to boot.
 ====
 
 **--compress** _<compressor>_::
@@ -390,6 +412,9 @@ will not be able to boot. Equivalent to "--compress=xz --check=crc32
     Do not compress the generated initramfs. This will override any other
     compression options.
 
+**--reproducible**::
+    Create reproducible images.
+
 **--list-modules**::
     List all available dracut modules.
 
@@ -399,6 +424,31 @@ will not be able to boot. Equivalent to "--compress=xz --check=crc32
 **--keep**::
     Keep the initramfs temporary directory for debugging purposes.
 
+**--printsize**::
+    Print out the module install size
+
+**--profile**:
+    Output profile information of the build process
+
+**--ro-mnt**:
+    Mount / and /usr read-only by default.
+
+**-L, --stdlog** _<level>_::
+    [0-6] Specify logging level (to standard error)
+----
+          0 - suppress any messages
+          1 - only fatal errors
+          2 - all errors
+          3 - warnings
+          4 - info
+          5 - debug info (here starts lots of output)
+          6 - trace info (and even more)
+----
+
+**--regenerate-all**::
+    Regenerate all initramfs images at the default location with the kernel
+    versions found on the system. Additional parameters are passed through.
+
 FILES
 -----
 _/var/log/dracut.log_::
@@ -414,6 +464,9 @@ _/etc/dracut.conf_::
 _/etc/dracut.conf.d/*.conf_::
     see dracut.conf5
 
+_/usr/lib/dracut/dracut.conf.d/*.conf_::
+    see dracut.conf5
+
 Configuration in the initramfs
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 _/etc/conf.d/_::
@@ -422,6 +475,10 @@ _/etc/conf.d/_::
     set in the configuration files.
 
 _/etc/cmdline_::
+    Can contain additional command line options. Deprecated, better use
+    /etc/cmdline.d/*.conf.
+
+_/etc/cmdline.d/*.conf_::
     Can contain additional command line options.
 
 AVAILABILITY