table of contents
DRACUT.CMDLINE(7) | dracut | DRACUT.CMDLINE(7) |
NAME¶
dracut.cmdline - dracut kernel command line options
DESCRIPTION¶
The root device used by the kernel is specified in the boot configuration file on the kernel command line, as always.
The traditional root=/dev/sda1 style device specification is allowed, but not encouraged. The root device should better be identified by LABEL or UUID. If a label is used, as in root=LABEL=<label_of_root> the initramfs will search all available devices for a filesystem with the appropriate label, and mount that device as the root filesystem. root=UUID=<uuidnumber> will mount the partition with that UUID as the root filesystem.
In the following all kernel command line parameters, which are processed by dracut, are described.
"rd.*" parameters mentioned without "=" are boolean parameters. They can be turned on/off by setting them to {0|1}. If the assignment with "=" is missing "=1" is implied. For example rd.info can be turned off with rd.info=0 or turned on with rd.info=1 or rd.info. The last value in the kernel command line is the value, which is honored.
Standard¶
init=<path to real init>
root=<path to blockdevice>
Example.
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
rootfstype=<filesystem type>
Example.
rootfstype=ext3
rootflags=<mount options>
ro
rw
rootfallback=<path to blockdevice>
rd.auto rd.auto=1
rd.cmdline=ask
rd.fstab=0
resume=<path to resume partition>
Example.
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
rd.skipfsck
Misc¶
rd.emergency=[reboot|poweroff|halt]
rd.driver.blacklist=<drivername>[,<drivername>,...]
rd.driver.pre=<drivername>[,<drivername>,...]
rd.driver.post=<drivername>[,<drivername>,...]
rd.retry=<seconds>
rd.noverifyssl
rd.ctty=<terminal device>
Debug¶
If you are dropped to an emergency shell, 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.
rd.info
rd.shell
rd.debug
rd.memdebug=[0-4]
Higher level means more debugging output:
0 - no output
1 - partial /proc/meminfo
2 - /proc/meminfo
3 - /proc/meminfo + /proc/slabinfo
4 - /proc/meminfo + /proc/slabinfo + tracekomem
NOTE: tracekomem is a shell script utilizing kernel trace to track
the rough total memory consumption of kernel modules during
loading. It may override other trace configurations.
rd.break
rd.break={cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}
rd.udev.info
rd.udev.debug
I18N¶
rd.vconsole.keymap=<keymap base file name>
Example.
rd.vconsole.keymap=de-latin1-nodeadkeys
rd.vconsole.keymap.ext=<list of keymap base file names>
rd.vconsole.unicode
rd.vconsole.font=<font base file name>
Example.
rd.vconsole.font=LatArCyrHeb-16
rd.vconsole.font.map=<console map base file name>
rd.vconsole.font.unimap=<unicode table base file name>
rd.locale.LANG=<locale>
Example.
rd.locale.LANG=pl_PL.utf8
rd.locale.LC_ALL=<locale>
LVM¶
rd.lvm=0
rd.lvm.vg=<volume group name>
rd.lvm.lv=<logical volume name>
rd.lvm.conf=0
crypto LUKS¶
rd.luks=0
rd.luks.uuid=<luks uuid>
rd.luks.allow-discards=<luks uuid>
rd.luks.allow-discards
rd.luks.crypttab=0
crypto LUKS - key on removable device support¶
rd.luks.key=<keypath>:<keydev>:<luksdev>
keydev is a device on which key file resides. It might be kernel name of devices (should start with "/dev/"), UUID (prefixed with "UUID=") or label (prefix with "LABEL="). You don’t have to specify full UUID. Just its beginning will suffice, even if its ambiguous. All matching devices will be probed. This parameter is recommended, but not required. If not present, all block devices will be probed, which may significantly increase boot time.
If luksdev is given, the specified key will only be applied for that LUKS device. Possible values are the same as for keydev. Unless you have several LUKS devices, you don’t have to specify this parameter. The simplest usage is:
Example.
rd.luks.key=/foo/bar.key
As you see, you can skip colons in such a case.
Note
dracut pipes key to cryptsetup with -d - argument, therefore you need to pipe to crypsetup luksFormat with -d -, too!
Here follows example for key encrypted with GPG:
gpg --quiet --decrypt rootkey.gpg | \ cryptsetup -d - -v --cipher serpent-cbc-essiv:sha256 \ --key-size 256 luksFormat /dev/sda3
If you use plain keys, just add path to -d option:
cryptsetup -d rootkey.key -v --cipher serpent-cbc-essiv:sha256 \
--key-size 256 luksFormat /dev/sda3
MD RAID¶
rd.md=0
rd.md.imsm=0
rd.md.ddf=0
rd.md.conf=0
rd.md.waitclean=1
rd.md.uuid=<md raid uuid>
DM RAID¶
rd.dm=0
rd.dm.uuid=<dm raid uuid>
FIPS¶
rd.fips
boot=<boot device>
Example.
boot=/dev/sda1 boot=/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1 boot=UUID=<uuid> boot=LABEL=<label>
rd.fips.skipkernel
Network¶
Important
It is recommended to either bind an interface to a MAC with the ifname argument, or to use the systemd-udevd predictable network interface names.
Predictable network interface device names based on:
See: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames
Two character prefixes based on the type of interface:
en
wl
ww
Type of names:
o<index>
s<slot>[f<function>][d<dev_id>]
x<MAC>
[P<domain>]p<bus>s<slot>[f<function>][d<dev_id>]
[P<domain>]p<bus>s<slot>[f<function>][u<port>][..][c<config>][i<interface>]
All multi-function PCI devices will carry the [f<function>] number in the device name, including the function 0 device.
When using PCI geography, The PCI domain is only prepended when it is not 0.
For USB devices the full chain of port numbers of hubs is composed. If the name gets longer than the maximum number of 15 characters, the name is not exported. The usual USB configuration == 1 and interface == 0 values are suppressed.
PCI ethernet card with firmware index "1"
PCI ethernet card in hotplug slot with firmware index number
PCI ethernet multi-function card with 2 ports
PCI wlan card
USB built-in 3G modem
USB Android phone
ip={dhcp|on|any|dhcp6|auto6|either6}
dhcp|on|any
auto6
dhcp6
either6
ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]]
dhcp|on|any|dhcp6
auto6
<macaddr>
ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[<mtu>][:<macaddr>]]
<macaddr>
ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[<dns1>][:<dns2>]]
ifname=<interface>:<MAC>
Warning
Do not use the default kernel naming scheme for the interface name, as it can conflict with the kernel names. So, don’t use "eth[0-9]+" for the interface name. Better name it "bootnet" or "bluesocket".
rd.route=<net>/<netmask>:<gateway>[:<interface>]
Example.
rd.route=192.168.200.0/24:192.168.100.222:ens10
rd.route=192.168.200.0/24:192.168.100.222
rd.route=192.168.200.0/24::ens10
rd.route=[2001:DB8:3::/8]:[2001:DB8:2::1]:ens10
bootdev=<interface>
BOOTIF=<MAC>
rd.bootif=0
nameserver=<IP> [nameserver=<IP> ...]
biosdevname=0
rd.neednet=1
vlan=<vlanname>:<phydevice>
bond=<bondname>[:<bondslaves>:[:<options>]]
team=<teammaster>:<teamslaves>
bridge=<bridgename>:<ethnames>
NFS¶
root=[<server-ip>:]<root-dir>[:<nfs-options>]
root=nfs:[<server-ip>:]<root-dir>[:<nfs-options>], root=nfs4:[<server-ip>:]<root-dir>[:<nfs-options>], root={dhcp|dhcp6}
Example.
root-path=<server-ip>:<root-dir>[,<nfs-options>]
root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>]
root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>]
root=/dev/nfs nfsroot=[<server-ip>:]<root-dir>[:<nfs-options>]
rd.nfs.domain=<NFSv4 domain name>
rd.net.dhcp.retry=<cnt>
rd.net.timeout.dhcp=<arg>
rd.net.timeout.iflink=<seconds>
rd.net.timeout.ifup=<seconds>
rd.net.timeout.route=<seconds>
rd.net.timeout.ipv6dad=<seconds>
rd.net.timeout.ipv6auto=<seconds>
rd.net.timeout.carrier=<seconds>
CIFS¶
root=cifs://[<username>[:<password>]@]<server-ip>:<root-dir>
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.
cifsuser=<username>
cifspass=<password>
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.
iSCSI¶
root=iscsi:[<username>:<password>[:<reverse>:<password>]@][<servername>]:[<protocol>]:[<port>][:[<iscsi_iface_name>]:[<netdev_name>]]:[<LUN>]:<targetname>
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.
Example.
root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
If servername is an IPv6 address, it has to be put in brackets:
Example.
root=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
root=??? netroot=iscsi:[<username>:<password>[:<reverse>:<password>]@][<servername>]:[<protocol>]:[<port>][:[<iscsi_iface_name>]:[<netdev_name>]]:[<LUN>]:<targetname> ...
Example.
root=UUID=12424547 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1
If servername is an IPv6 address, it has to be put in brackets:
Example.
netroot=iscsi:[2001:DB8::1]::::iqn.2009-06.dracut:target0
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.
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>
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.
root=??? netroot=iscsi rd.iscsi.firmware=1
rd.iscsi.param=<param>
Example.
"netroot=iscsi rd.iscsi.firmware=1 rd.iscsi.param=node.session.timeo.replacement_timeout=30"
will result in
iscsistart -b --param node.session.timeo.replacement_timeout=30
rd.iscsi.ibft rd.iscsi.ibft=1: Turn on iBFT autoconfiguration for the interfaces
rd.iscsi.waitnet=0: Turn off waiting for all interfaces to be up before trying to login to the iSCSI targets.
rd.iscsi.testroute=0: Turn off checking, if the route to the iSCSI target IP is possible before trying to login.
FCoE¶
fcoe=<edd|interface|MAC>:{dcb|nodcb}
Note
letters in the MAC-address must be lowercase!
NBD¶
root=??? netroot=nbd:<server>:<port>[:<fstype>[:<mountopts>[:<nbdopts>]]]
root=dhcp with dhcp root-path=nbd:<server>:<port>[:<fstype>[:<mountopts>[:<nbdopts>]]]
DASD¶
rd.dasd=....
ZFCP¶
rd.zfcp=<zfcp adaptor device bus ID>,<WWPN>,<FCPLUN>
Example.
rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000
rd.zfcp.conf=0
ZNET¶
rd.znet=<nettype>,<subchannels>,<options>
rd.znet_ifname=<ifname>:<subchannels>
Example.
rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portname=foo rd.znet=ctc,0.0.0600,0.0.0601,protocol=bar
Booting live images¶
Dracut offers multiple options for live booted images:
squashfs with read-only filesystem image
The filesystem structure is expected to be:
squashfs.img | Squashfs downloaded via network
!(mount)
/LiveOS
|- ext3fs.img | Filesystem image to mount read-only
!(mount)
/bin | Live filesystem
/boot |
/dev |
... |
Dracut uses this method of live booting by default. No additional command line options are required other than root=live:<URL> to specify the location of your squashed filesystem.
writable filesystem image
The filesystem structure is expected to be:
rootfs.tgz | Compressed tarball containing fileystem image
!(unpack)
/rootfs.img | Filesystem image
!(mount)
/bin | Live filesystem
/boot |
/dev |
... |
To use this boot option, ensure that rd.writable_fsimg=1 is in your kernel command line and add the root=live:<URL> to specify the location of your compressed filesystem image tarball.
root=live:<url>
Example.
rd.live.debug=1
rd.live.dir=<path>
rd.live.ram=1
rd.live.overlay=<devspec>:_(<pathspec>|auto) Allow the usage of a permanent overlay. <devspec> specifies the path to a device with a mountable filesystem. <pathspec> is the path to a file within that filesystem, which shall be used to persist the changes made to the device specified by root=live:<url>__ option.
+
Example.
rd.live.overlay=/dev/sdb1:persistent-overlay.img
rd.live.overlay.thin=1
rd.writable.fsimg=1
Note
There must be enough free RAM available to hold the complete image.
Plymouth Boot Splash¶
plymouth.enable=0
rd.plymouth=0
Kernel keys¶
masterkey=<kernel master key path name>
Example.
masterkey=/etc/keys/kmk-trusted.blob
masterkeytype=<kernel master key type>
Example.
masterkeytype=trusted
evmkey=<EVM key path name>
Example.
evmkey=/etc/keys/evm-trusted.blob
ecryptfskey=<eCryptfs key path name>
Example.
ecryptfskey=/etc/keys/ecryptfs-trusted.blob
Deprecated, renamed Options¶
Here is a list of options, which were used in dracut prior to version 008, and their new replacement.
rdbreak
rd_CCW
rd_DASD_MOD
rd_DASD
rdinitdebug rdnetdebug
rd_NO_DM
rd_DM_UUID
rdblacklist
rdinsmodpost
rdloaddriver
rd_NO_FSTAB
rdinfo
check
rdlivedebug
live_dir
liveimg
overlay
readonly_overlay
reset_overlay
live_ram
rd_NO_CRYPTTAB
rd_LUKS_KEYDEV_UUID
rd_LUKS_KEYPATH
rd_NO_LUKS
rd_LUKS_UUID
rd_NO_LVMCONF
rd_LVM_LV
rd_NO_LVM
rd_LVM_SNAPSHOT
rd_LVM_SNAPSIZE
rd_LVM_VG
rd_NO_MDADMCONF
rd_NO_MDIMSM
rd_NO_MD
rd_MD_UUID
rd_NFS_DOMAIN
iscsi_initiator
iscsi_target_name
iscsi_target_ip
iscsi_target_port
iscsi_target_group
iscsi_username
iscsi_password
iscsi_in_username
iscsi_in_password
iscsi_firmware
rd_NO_PLYMOUTH
rd_retry
rdshell
rd_NO_SPLASH
rdudevdebug
rdudevinfo
rd_NO_ZFCPCONF
rd_ZFCP
rd_ZNET
KEYMAP
KEYTABLE
SYSFONT
CONTRANS
UNIMAP
UNICODE
EXT_KEYMAP
Configuration in the Initramfs¶
/etc/conf.d/
/etc/cmdline
/etc/cmdline.d/*.conf
AUTHOR¶
Harald Hoyer
SEE ALSO¶
NOTES¶
- 1.
- rfc4173
09/29/2020 | dracut |