'\" t .\" Title: dracut.cmdline .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2023-08-21 .\" Manual: dracut .\" Source: dracut 060+5-1 .\" Language: English .\" .TH "DRACUT\&.CMDLINE" "7" "2023\-08\-21" "dracut 060+5\-1" "dracut" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" dracut.cmdline \- dracut kernel command line options .SH "DESCRIPTION" .sp The root device used by the kernel is specified in the boot configuration file on the kernel command line, as always\&. .sp The traditional \fIroot=/dev/sda1\fR style device specification is allowed, but not encouraged\&. The root device should better be identified by LABEL or UUID\&. If a label is used, as in \fIroot=LABEL=\fR the initramfs will search all available devices for a filesystem with the appropriate label, and mount that device as the root filesystem\&. \fIroot=UUID=\fR will mount the partition with that UUID as the root filesystem\&. .sp In the following all kernel command line parameters, which are processed by dracut, are described\&. .sp "rd\&.*" parameters mentioned without "=" are boolean parameters\&. They can be turned on/off by setting them to {0|1}\&. If the assignment with "=" is missing "=1" is implied\&. For example \fIrd\&.info\fR can be turned off with \fIrd\&.info=0\fR or turned on with \fIrd\&.info=1\fR or \fIrd\&.info\fR\&. The last value in the kernel command line is the value, which is honored\&. .SS "Standard" .PP \fBinit=\fR\fI\fR .RS 4 specify the path to the init program to be started after the initramfs has finished .RE .PP \fBroot=\fR\fI\fR .RS 4 specify the block device to use as the root filesystem\&. .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf root=/dev/sda1 root=/dev/disk/by\-path/pci\-0000:00:1f\&.1\-scsi\-0:0:1:0\-part1 root=/dev/disk/by\-label/Root root=LABEL=Root root=/dev/disk/by\-uuid/3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 root=UUID=3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 root=PARTUUID=3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 .fi .if n \{\ .RE .\} .sp .RE .PP \fBrootfstype=\fR\fI\fR .RS 4 "auto" if not specified\&. .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf rootfstype=ext4 .fi .if n \{\ .RE .\} .sp .RE .PP \fBrootflags=\fR\fI\fR .RS 4 specify additional mount options for the root filesystem\&. If not set, \fI/etc/fstab\fR of the real root will be parsed for special mount options and mounted accordingly\&. .RE .PP \fBro\fR .RS 4 force mounting \fI/\fR and \fI/usr\fR (if it is a separate device) read\-only\&. If none of ro and rw is present, both are mounted according to \fI/etc/fstab\fR\&. .RE .PP \fBrw\fR .RS 4 force mounting \fI/\fR and \fI/usr\fR (if it is a separate device) read\-write\&. See also ro option\&. .RE .PP \fBrootfallback=\fR\fI\fR .RS 4 specify the block device to use as the root filesystem, if the normal root cannot be found\&. This can only be a simple block device with a simple file system, for which the filesystem driver is either compiled in, or added manually to the initramfs\&. This parameter can be specified multiple times\&. .RE .PP \fBrd\&.auto\fR \fBrd\&.auto=1\fR .RS 4 enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or lvm\&. Default is off as of dracut version >= 024\&. .RE .PP \fBrd\&.hostonly=0\fR .RS 4 removes all compiled in configuration of the host system the initramfs image was built on\&. This helps booting, if any disk layout changed, especially in combination with rd\&.auto or other parameters specifying the layout\&. .RE .PP \fBrd\&.cmdline=ask\fR .RS 4 prompts the user for additional kernel command line parameters .RE .PP \fBrd\&.fstab=0\fR .RS 4 do not honor special mount options for the root filesystem found in \fI/etc/fstab\fR of the real root\&. .RE .PP \fBresume=\fR\fI\fR .RS 4 resume from a swap partition .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf resume=/dev/disk/by\-path/pci\-0000:00:1f\&.1\-scsi\-0:0:1:0\-part1 resume=/dev/disk/by\-uuid/3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 resume=UUID=3f5ad593\-4546\-4a94\-a374\-bcfb68aa11f7 .fi .if n \{\ .RE .\} .sp .RE .PP \fBrd\&.skipfsck\fR .RS 4 skip fsck for rootfs and \fI/usr\fR\&. If you\(cqre mounting \fI/usr\fR read\-only and the init system performs fsck before remount, you might want to use this option to avoid duplication\&. .RE .SS "iso\-scan/filename" .sp Mount all mountable devices and search for ISO pointed by the argument\&. When the ISO is found set it up as a loop device\&. Device containing this ISO image will stay mounted at /run/initramfs/isoscandev\&. Using iso\-scan/filename with a Fedora/Red Hat/CentOS Live iso should just work by copying the original kernel cmdline parameters\&. .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf menuentry \*(AqLive Fedora 20\*(Aq \-\-class fedora \-\-class gnu\-linux \-\-class gnu \-\-class os { set isolabel=Fedora\-Live\-LXDE\-x86_64\-20\-1 set isofile="/boot/iso/Fedora\-Live\-LXDE\-x86_64\-20\-1\&.iso" loopback loop $isofile linux (loop)/isolinux/vmlinuz0 boot=isolinux iso\-scan/filename=$isofile root=live:LABEL=$isolabel ro rd\&.live\&.image quiet rhgb initrd (loop)/isolinux/initrd0\&.img } .fi .if n \{\ .RE .\} .sp .SS "Misc" .PP \fBrd\&.emergency=\fR\fI[reboot|poweroff|halt]\fR .RS 4 specify, what action to execute in case of a critical failure\&. rd\&.shell=0 must also be specified\&. .RE .PP \fBrd\&.driver\&.blacklist=\fR\fI\fR[,\fI\fR,\&...] .RS 4 do not load kernel module \&. This parameter can be specified multiple times\&. .RE .PP \fBrd\&.driver\&.pre=\fR\fI\fR[,\fI\fR,\&...] .RS 4 force loading kernel module \&. This parameter can be specified multiple times\&. .RE .PP \fBrd\&.driver\&.post=\fR\fI\fR[,\fI\fR,\&...] .RS 4 force loading kernel module after all automatic loading modules have been loaded\&. This parameter can be specified multiple times\&. .RE .PP \fBrd\&.retry=\fR\fI\fR .RS 4 specify how long dracut should retry the initqueue to configure devices\&. The default is 180 seconds\&. After 2/3 of the time, degraded raids are force started\&. If you have hardware, which takes a very long time to announce its drives, you might want to extend this value\&. .RE .PP \fBrd\&.timeout=\fR\fI\fR .RS 4 specify how long dracut should wait for devices to appear\&. The default is \fI0\fR, which means \fIforever\fR\&. Note that this timeout should be longer than rd\&.retry to allow for proper configuration\&. .RE .PP \fBrd\&.noverifyssl\fR .RS 4 accept self\-signed certificates for ssl downloads\&. .RE .PP \fBrd\&.ctty=\fR\fI\fR .RS 4 specify the controlling terminal for the console\&. This is useful, if you have multiple "console=" arguments\&. .RE .PP \fBrd\&.shutdown\&.timeout\&.umount=\fR\fI\fR .RS 4 specify how long dracut should wait for an individual umount to finish during shutdown\&. This avoids the system from blocking when unmounting a file system cannot complete and waits indefinitely\&. Value \fI0\fR means to wait \fIforever\fR\&. The default is 90 seconds\&. .RE .SS "Debug" .sp If you are dropped to an emergency shell, the file \fI/run/initramfs/rdsosreport\&.txt\fR is created, which can be saved to a (to be mounted by hand) partition (usually /boot) or a USB stick\&. Additional debugging info can be produced by adding \fBrd\&.debug\fR to the kernel command line\&. \fI/run/initramfs/rdsosreport\&.txt\fR contains all logs and the output of some tools\&. It should be attached to any report about dracut problems\&. .PP \fBrd\&.info\fR .RS 4 print informational output though "quiet" is set .RE .PP \fBrd\&.shell\fR .RS 4 allow dropping to a shell, if root mounting fails .RE .PP \fBrd\&.debug\fR .RS 4 set \-x for the dracut shell\&. If systemd is active in the initramfs, all output is logged to the systemd journal, which you can inspect with "journalctl \-ab"\&. If systemd is not active, the logs are written to dmesg and \fI/run/initramfs/init\&.log\fR\&. If "quiet" is set, it also logs to the console\&. .RE .PP \fBrd\&.memdebug=[0\-5]\fR .RS 4 Print memory usage info at various points, set the verbose level from 0 to 5\&. .sp .if n \{\ .RS 4 .\} .nf Higher level means more debugging output: .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf 0 \- no output 1 \- partial /proc/meminfo 2 \- /proc/meminfo 3 \- /proc/meminfo + /proc/slabinfo 4 \- /proc/meminfo + /proc/slabinfo + memstrack summary NOTE: memstrack is a memory tracing tool that tracks the total memory consumption, and peak memory consumption of each kernel modules and userspace progress during the whole initramfs runtime, report is generated and the end of initramsfs run\&. 5 \- /proc/meminfo + /proc/slabinfo + memstrack (with top memory stacktrace) NOTE: memstrack (with top memory stacktrace) will print top memory allocation stack traces during the whole initramfs runtime\&. .fi .if n \{\ .RE .\} .RE .PP \fBrd\&.break\fR .RS 4 drop to a shell at the end .RE .PP \fBrd\&.break=\fR\fI{cmdline|pre\-udev|pre\-trigger|initqueue|pre\-mount|mount|pre\-pivot|cleanup}\fR .RS 4 drop to a shell before the defined breakpoint starts .RE .PP \fBrd\&.udev\&.info\fR .RS 4 set udev to loglevel info .RE .PP \fBrd\&.udev\&.debug\fR .RS 4 set udev to loglevel debug .RE .SS "I18N" .PP \fBrd\&.vconsole\&.keymap=\fR\fI\fR .RS 4 keyboard translation table loaded by loadkeys; taken from keymaps directory; will be written as KEYMAP to \fI/etc/vconsole\&.conf\fR in the initramfs\&. .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf rd\&.vconsole\&.keymap=de\-latin1\-nodeadkeys .fi .if n \{\ .RE .\} .sp .RE .PP \fBrd\&.vconsole\&.keymap\&.ext=\fR\fI\fR .RS 4 list of extra keymaps to bo loaded (sep\&. by space); will be written as EXT_KEYMAP to \fI/etc/vconsole\&.conf\fR in the initramfs .RE .PP \fBrd\&.vconsole\&.unicode\fR .RS 4 boolean, indicating UTF\-8 mode; will be written as UNICODE to \fI/etc/vconsole\&.conf\fR in the initramfs .RE .PP \fBrd\&.vconsole\&.font=\fR\fI\fR .RS 4 console font; taken from consolefonts directory; will be written as FONT to \fI/etc/vconsole\&.conf\fR in the initramfs\&. .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf rd\&.vconsole\&.font=eurlatgr .fi .if n \{\ .RE .\} .sp .RE .PP \fBrd\&.vconsole\&.font\&.map=\fR\fI\fR .RS 4 see description of \fI\-m\fR parameter in setfont manual; taken from consoletrans directory; will be written as FONT_MAP to \fI/etc/vconsole\&.conf\fR in the initramfs .RE .PP \fBrd\&.vconsole\&.font\&.unimap=\fR\fI\fR .RS 4 see description of \fI\-u\fR parameter in setfont manual; taken from unimaps directory; will be written as FONT_UNIMAP to \fI/etc/vconsole\&.conf\fR in the initramfs .RE .PP \fBrd\&.locale\&.LANG=\fR\fI\fR .RS 4 taken from the environment; if no UNICODE is defined we set its value in basis of LANG value (whether it ends with "\&.utf8" (or similar) or not); will be written as LANG to \fI/etc/locale\&.conf\fR in the initramfs\&. .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf rd\&.locale\&.LANG=pl_PL\&.utf8 .fi .if n \{\ .RE .\} .sp .RE .PP \fBrd\&.locale\&.LC_ALL=\fR\fI\fR .RS 4 taken from the environment; will be written as LC_ALL to \fI/etc/locale\&.conf\fR in the initramfs .RE .SS "LVM" .PP \fBrd\&.lvm=0\fR .RS 4 disable LVM detection .RE .PP \fBrd\&.lvm\&.vg=\fR\fI\fR .RS 4 only activate all logical volumes in the the volume groups with the given name\&. rd\&.lvm\&.vg can be specified multiple times on the kernel command line\&. .RE .PP \fBrd\&.lvm\&.lv=\fR\fI/\fR .RS 4 only activate the logical volumes with the given name\&. rd\&.lvm\&.lv can be specified multiple times on the kernel command line\&. .RE .PP \fBrd\&.lvm\&.conf=0\fR .RS 4 remove any \fI/etc/lvm/lvm\&.conf\fR, which may exist in the initramfs .RE .SS "crypto LUKS" .PP \fBrd\&.luks=0\fR .RS 4 disable crypto LUKS detection .RE .PP \fBrd\&.luks\&.uuid=\fR\fI\fR .RS 4 only activate the LUKS partitions with the given UUID\&. Any "luks\-" of the LUKS UUID is removed before comparing to \fI\fR\&. The comparisons also matches, if \fI\fR is only the beginning of the LUKS UUID, so you don\(cqt have to specify the full UUID\&. This parameter can be specified multiple times\&. \fI\fR may be prefixed by the keyword keysource:, see \fIrd\&.luks\&.key\fR below\&. .RE .PP \fBrd\&.luks\&.allow\-discards=\fR\fI\fR .RS 4 Allow using of discards (TRIM) requests for LUKS partitions with the given UUID\&. Any "luks\-" of the LUKS UUID is removed before comparing to \fI\fR\&. The comparisons also matches, if \fI\fR is only the beginning of the LUKS UUID, so you don\(cqt have to specify the full UUID\&. This parameter can be specified multiple times\&. .RE .PP \fBrd\&.luks\&.allow\-discards\fR .RS 4 Allow using of discards (TRIM) requests on all LUKS partitions\&. .RE .PP \fBrd\&.luks\&.crypttab=0\fR .RS 4 do not check, if LUKS partition is in \fI/etc/crypttab\fR .RE .PP \fBrd\&.luks\&.timeout=\fR\fI\fR .RS 4 specify how long dracut should wait when waiting for the user to enter the password\&. This avoid blocking the boot if no password is entered\&. It does not apply to luks key\&. The default is \fI0\fR, which means \fIforever\fR\&. .RE .SS "crypto LUKS \- key on removable device support" .sp NB: If systemd is included in the dracut initrd, dracut\(cqs built in removable device keying support won\(cqt work\&. systemd will prompt for a password from the console even if you\(cqve supplied \fBrd\&.luks\&.key\fR\&. You may be able to use standard systemd \fBfstab\fR(5) syntax to get the same effect\&. If you do need \fBrd\&.luks\&.key\fR to work, you will have to exclude the "systemd" dracut module and any modules that depend on it\&. See \fBdracut\&.conf\fR(5) and \m[blue]\fBhttps://bugzilla\&.redhat\&.com/show_bug\&.cgi?id=905683\fR\m[] for more information\&. .PP \fBrd\&.luks\&.key=\fR\fI[:[:]]\fR .RS 4 \fI\fR is the pathname of a key file, relative to the root of the filesystem on some device\&. It\(cqs REQUIRED\&. When \fI\fR ends with \fI\&.gpg\fR it\(cqs considered to be key encrypted symmetrically with GPG\&. You will be prompted for the GPG password on boot\&. GPG support comes with the \fIcrypt\-gpg\fR module, which needs to be added explicitly\&. .sp \fI\fR identifies the device on which the key file resides\&. It may be the kernel name of the device (should start with "/dev/"), a UUID (prefixed with "UUID=") or a label (prefix with "LABEL=")\&. You don\(cqt have to specify a 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 it\(cqs not present, all block devices will be probed, which may significantly increase boot time\&. .sp If \fI\fR is given, the specified key will only be used for the specified LUKS device\&. Possible values are the same as for \fI\fR\&. Unless you have several LUKS devices, you don\(cqt have to specify this parameter\&. The simplest usage is: .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf rd\&.luks\&.key=/foo/bar\&.key .fi .if n \{\ .RE .\} .sp As you see, you can skip colons in such a case\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Your LUKS partition must match your key file\&. .sp dracut provides keys to cryptsetup with \fI\-d\fR (an older alias for \fI\-\-key\-file\fR)\&. This uses the entire binary content of the key file as part of the secret\&. If you pipe a password into cryptsetup \fBwithout\fR \fI\-d\fR or \fI\-\-key\-file\fR, it will be treated as text user input, and only characters before the first newline will be used\&. Therefore, when you\(cqre creating an encrypted partition for dracut to mount, and you pipe a key into \fIcryptsetup luksFormat\fR,you must use \fI\-d \-\fR\&. .sp Here is an example for a key encrypted with GPG (warning: \fI\-\-batch\-mode\fR will overwrite the device without asking for confirmation): .sp .if n \{\ .RS 4 .\} .nf gpg \-\-quiet \-\-decrypt rootkey\&.gpg | \e cryptsetup \-\-batch\-mode \-\-key\-file \- \e luksFormat /dev/sda47 .fi .if n \{\ .RE .\} .sp If you use unencrypted key files, just use the key file pathname instead of the standard input\&. For a random key with 256 bits of entropy, you might use: .sp .if n \{\ .RS 4 .\} .nf head \-32c /dev/urandom > rootkey\&.key cryptsetup \-\-batch\-mode \-\-key\-file rootkey\&.key \e luksFormat /dev/sda47 .fi .if n \{\ .RE .\} .sp You can also use regular key files on an encrypted \fIkeydev\fR\&. .sp Compared to using GPG encrypted keyfiles on an unencrypted device this provides the following advantages: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} you can unlock your disk(s) using multiple passphrases .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} better security by not losing the key stretching mechanism .RE .sp To use an encrypted \fIkeydev\fR you \fBmust\fR ensure that it becomes available by using the keyword keysource, e\&.g\&. rd\&.luks\&.uuid=keysource:aaaa \fIaaaa\fR being the uuid of the encrypted \fIkeydev\fR\&. .sp Example: .sp Lets assume you have three disks \fIA\fR, \fIB\fR and \fIC\fR with the uuids \fIaaaa\fR, \fIbbbb\fR and \fIcccc\fR\&. You want to unlock \fIA\fR and \fIB\fR using keyfile \fIkeyfile\fR\&. The unlocked volumes be \fIA\*(Aq\fR, \fIB\*(Aq\fR and \fIC\*(Aq\fR with the uuids \fIAAAA\fR, \fIBBBB\fR and \fICCCC\fR\&. \fIkeyfile\fR is saved on \fIC\*(Aq\fR as \fI/keyfile\fR\&. .sp One luks keyslot of each \fIA\fR, \fIB\fR and \fIC\fR is setup with a passphrase\&. Another luks keyslot of each \fIA\fR and \fIB\fR is setup with \fIkeyfile\fR\&. .sp To boot this configuration you could use: .sp .if n \{\ .RS 4 .\} .nf rd\&.luks\&.uuid=aaaa rd\&.luks\&.uuid=bbbb rd\&.luks\&.uuid=keysource:cccc rd\&.luks\&.key=/keyfile:UUID=CCCC .fi .if n \{\ .RE .\} .sp Dracut asks for the passphrase for \fIC\fR and uses the keyfile to unlock \fIA\fR and \fIB\fR\&. If getting the passphrase for \fIC\fR fails it falls back to asking for the passphrases for \fIA\fR and \fIB\fR\&. .sp If you want \fIC\*(Aq\fR to stay unlocked, specify a luks name for it, e\&.g\&. rd\&.luks\&.name=cccc=mykeys, otherwise it gets closed when not needed anymore\&. .sp .5v .RE .PP \fBrd\&.luks\&.key\&.tout=0\fR .RS 4 specify how many times dracut will try to read the keys specified in in rd\&.luk\&.key\&. This gives a chance to the removable device containing the key to initialise\&. .RE .SS "MD RAID" .PP \fBrd\&.md=0\fR .RS 4 disable MD RAID detection .RE .PP \fBrd\&.md\&.imsm=0\fR .RS 4 disable MD RAID for imsm/isw raids, use DM RAID instead .RE .PP \fBrd\&.md\&.ddf=0\fR .RS 4 disable MD RAID for SNIA ddf raids, use DM RAID instead .RE .PP \fBrd\&.md\&.conf=0\fR .RS 4 ignore mdadm\&.conf included in initramfs .RE .PP \fBrd\&.md\&.waitclean=1\fR .RS 4 wait for any resync, recovery, or reshape activity to finish before continuing .RE .PP \fBrd\&.md\&.uuid=\fR\fI\fR .RS 4 only activate the raid sets with the given UUID\&. This parameter can be specified multiple times\&. .RE .SS "DM RAID" .PP \fBrd\&.dm=0\fR .RS 4 disable DM RAID detection .RE .PP \fBrd\&.dm\&.uuid=\fR\fI\fR .RS 4 only activate the raid sets with the given UUID\&. This parameter can be specified multiple times\&. .RE .SS "MULTIPATH" .PP \fBrd\&.multipath=0\fR .RS 4 disable multipath detection .RE .PP \fBrd\&.multipath=default\fR .RS 4 use default multipath settings .RE .SS "FIPS" .PP \fBrd\&.fips\fR .RS 4 enable FIPS .RE .PP \fBboot=\fR\fI\fR .RS 4 specify the device, where /boot is located\&. .PP \fBExample\fR. .sp .if n \{\ .RS 4 .\} .nf boot=/dev/sda1 boot=/dev/disk/by\-path/pci\-0000:00:1f\&.1\-scsi\-0:0:1:0\-part1 boot=UUID= boot=LABEL=