(→NBD) |
Bishopolis (talk | contribs) m (→Debug: i18n) |
||
(93 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
<!--{{header|dracut}}--> | |||
{{admon/warning|This wiki can be incomplete. Please use the dracut.cmdline.7 (alias dracut.kernel.7) man page or point your browser at /usr/share/doc/dracut-*/dracut.html}} | |||
=Dracut= | |||
Creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem. | |||
'''SYNOPSIS''' | |||
<pre>dracut [OPTION]... <image> <kernel-version></pre> | |||
==-f, --force== | |||
<pre>-f, --force</pre> | |||
{{admon/note|Overwrite existing initramfs file.}} | |||
==-m, --modules== | |||
<pre>-m, --modules LIST</pre> | |||
{{admon/note|Specify a space-separated list of dracut modules to call when building the initramfs. Modules are located in /usr/share/dracut/modules.d.}} | |||
==-o, --omit== | |||
<pre>-o, --omit LIST</pre> | |||
{{admon/note|Omit a space-separated list of dracut modules.}} | |||
==-a, --add== | |||
<pre>-a, --add LIST</pre> | |||
{{admon/note|Add a space-separated list of dracut modules.}} | |||
==-d, --drivers== | |||
<pre>-d, --drivers LIST</pre> | |||
{{admon/note|Specify a space-separated list of kernel modules to include in the initramfs.}} | |||
== -k, --kmoddir == | |||
<pre>-k, --kmoddir {DIR}</pre> | |||
{{admon/note|Specify the directory, where to look for kernel modules.}} | |||
==--fwdir == | |||
<pre>--fwdir {DIR}</pre> | |||
{{admon/note|Specify additional directory, where to look for firmwares.}} | |||
==--kernel-only== | |||
<pre>--kernel-only</pre> | |||
{{admon/note|Only install kernel drivers and firmware files.}} | |||
==--no-kernel== | |||
<pre>--no-kernel</pre> | |||
{{admon/note|Do not install kernel drivers and firmware files.}} | |||
==--strip== | |||
<pre>--strip</pre> | |||
{{admon/note|Strip binaries in the initramfs (default).}} | |||
==--nostrip== | |||
<pre>--nostrip</pre> | |||
{{admon/note|No not strip binaries in the initramfs.}} | |||
==-h, --help== | |||
<pre>-h, --help</pre> | |||
{{admon/note|Display help text and exit.}} | |||
==--debug== | |||
<pre>--debug</pre> | |||
{{admon/note|Output debug information of the build process}} | |||
==-v, --verbose== | |||
<pre>v, --verbose</pre> | |||
{{admon/note|Verbose output during the build process}} | |||
==-c, --conf== | |||
<pre>-c, --conf FILE</pre> | |||
{{admon/note|Specify configuration file to use. Default: /etc/dracut.conf}} | |||
==-l, --local== | |||
<pre>-l, --local</pre> | |||
{{admon/note|Local mode. Use modules from the current working directory instead of the system-wide installed in /usr/share/dracut/modules.d. Useful when running dracut from a git checkout.}} | |||
==-H, --hostonly== | |||
<pre>-H, --hostonly</pre> | |||
{{admon/note|Host-Only mode: Install only what is needed for booting the local host instead of a generic host.}} | |||
==-i, --include== | |||
<pre>-i, --include SOURCE TARGET</pre> | |||
{{admon/note|Include the files in the SOURCE directory into the target directory in the final initramfs.}} | |||
== -I, --install == | |||
<pre>-I, --install LIST</pre> | |||
{{admon/note|Install the space separated list of files into the initramfs.}} | |||
= Dracut kernel command line parameters = | = Dracut kernel command line parameters = | ||
The root filesystem used by the kernel is specified in the boot configuration file, as always. The traditional '''root=/dev/hda1''' style device specification is allowed. If a label is used, as in '''root=LABEL=rootPart''' the initrd will search all available devices for an ext2 or ext3 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. | |||
== Limitations == | == Limitations == | ||
* Command line length: 2048 | * Command line length: 2048 | ||
* dhcp root-path: 255 | * dhcp root-path: 255 | ||
== | == Standard == | ||
<pre>init=<path to real init></pre> | |||
<pre>root=<path to blockdevice></pre> | |||
{{admon/note| Specify e.g. /dev/sda1 or /dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1}} | |||
==I18N== | |||
<pre>KEYBOARDTYPE=sun|pc</pre> | |||
{{admon/note|Will be written to /etc/sysconfig/keyboard in the initramfs}} | |||
<pre>KEYTABLE=<keytable filename></pre> | |||
{{admon/note|Will be written to /etc/sysconfig/keyboard in the initramfs}} | |||
<pre>SYSFONT= Console font</pre> | |||
{{admon/note|Will be written to /etc/sysconfig/i18n in the initramfs}} | |||
<pre>SYSFONTACM= Unicode font map</pre> | |||
{{admon/note|Will be written to /etc/sysconfig/i18n in the initramfs}} | |||
<pre>UNIMAP= Unicode font map</pre> | |||
{{admon/note|Will be written to /etc/sysconfig/i18n in the initramfs}} | |||
<pre>LANG=<locale></pre> | |||
{{admon/note|Will be written to /etc/sysconfig/i18n in the initramfs}} | |||
==Bootsplash - plymouth== | |||
<pre>rd_plytheme=<theme name></pre> | |||
{{admon/note|Specify the plymouth bootsplash theme (fallback is text)}} | |||
==LVM== | |||
{{admon/note| | <pre>rd_NO_LVM</pre> | ||
{{admon/note|Disable LVM detection}} | |||
<pre>rd_LVM_VG=<volume group name></pre> | |||
{{admon/note|Only activate the volume groups with the given name}} | |||
== | ==crypto LUKS== | ||
<pre>rd_NO_LUKS</pre> | |||
{{admon/note|Disable crypto LUKS detection}} | |||
<pre>rd_LUKS_UUID=<luks uuid></pre> | |||
{{admon/note|Only activate the LUKS partitions with the given UUID}} | |||
==MD== | |||
<pre>rd_NO_MD</pre> | |||
{{admon/note|Disable MD RAID detection}} | |||
<pre>rd_NO_MDIMSM</pre> | |||
{{admon/note|No MD RAID for imsm/isw raids, use dmraid instead.}} | |||
<pre>rd_MD_UUID=<md uuid></pre> | |||
{{admon/note|Only activate the raid sets with the given UUID}} | |||
==DMRAID== | |||
<pre>rd_NO_DM</pre> | |||
{{admon/note| | {{admon/note|Disable DM RAID detection}} | ||
<pre>rd_DM_UUID=<dmraid uuid></pre> | |||
{{admon/note|Only activate the raid sets with the given UUID}} | |||
==DASD== | |||
<pre>dasd=....</pre> | |||
{{admon/note|Same syntax as the kernel module parameter (s390 only).}} | |||
== DHCP == | == DHCP == | ||
{{admon/warning| You need to install dracut-network for this module.}} | |||
<pre>root=dhcp</pre> | |||
{{admon/note|Get IP from dhcp server, root-path option from dhcp specifies root location.}} | {{admon/note|Get IP from dhcp server, root-path option from dhcp specifies root location.}} | ||
== | == NFS == | ||
{{admon/warning| You need to install "dracut-network" for this module.}} | |||
<pre>root=[<server-ip>:]<root-dir>[:<nfs-options>]</pre> | |||
<pre>root=nfs:[<server-ip>:]<root-dir>[:<nfs-options>]</pre> | |||
<pre>root=nfs4:[<server-ip>:]<root-dir>[:<nfs-options>]</pre> | |||
{{admon/note|Mount nfs share from <server-ip>:/<root-dir> If no server-ip is given use dhcp next_server. nfs-options can be appended with the prefix ":" or ","}} | {{admon/note|Mount nfs share from <server-ip>:/<root-dir> If no server-ip is given use dhcp next_server. nfs-options can be appended with the prefix ":" or ","}} | ||
== | <pre>root=dhcp root-path=<server-ip>:<root-dir>[,<nfs-options>]</pre> | ||
<pre>root=dhcp root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>]</pre> | |||
<pre>root=dhcp root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>]</pre> | |||
{{admon/note|2='''root=dhcp alone directs initrd to look at the DHCP root-path where NFS options can be specified.'''}} | |||
<pre>root=/dev/nfs nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]</pre> | |||
{{admon/warning| Deprecated! Kernel Documentation/filesystems/nfsroot.txt defines this method. This is supported by dracut but not recommended.}} | |||
{{admon/note|/etc/idmapd.conf is copied to the initramfs.}} | |||
{{admon/note| | |||
== iSCSI == | == iSCSI == | ||
{{admon/warning| You need to install dracut-network for this module.}} | |||
<pre>root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname>::</pre> | |||
{{admon/note|Protocol defaults to "6", LUN defaults to "0". If the "servername" field is provided by BOOTP or DHCP, then that field is used in conjunction with other associated fields to contact the boot server in the Boot stage (Section 7). However, if the "servername" field is not provided, then the "targetname" field is then used in the Discovery Service stage in conjunction with other associated fields. | {{admon/note|Protocol defaults to "6", LUN defaults to "0". If the "servername" field is provided by BOOTP or DHCP, then that field is used in conjunction with other associated fields to contact the boot server in the Boot stage (Section 7). However, if the "servername" field is not provided, then the "targetname" field is then used in the Discovery Service stage in conjunction with other associated fields.[http://tools.ietf.org/html/rfc4173 RFC4173]}} | ||
<pre>root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname></pre> | |||
{{admon/note|'''E.g. root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0'''}} | |||
<pre>root=??? netroot=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname> ...</pre> | |||
{{admon/note|Multiple netroot options allow setting up multiple iscsi disks e.g. '''root=UUID=12424547 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1 not yet implemented.'''}} | |||
<pre>root=??? iscsi_initiator= iscsi_target_name= iscsi_target_ip= iscsi_target_port= iscsi_target_group= iscsi_username= iscsi_password= iscsi_in_username= iscsi_in_password=::</pre> | |||
<pre>root=??? iscsi_firmware::</pre> | |||
== NBD == | == NBD == | ||
{{admon/warning| You need to install dracut-network for this module.}} | |||
<pre>root=nbd:<server>:<port>[:<fstype>][:<mountopts>]</pre> | |||
{{admon/note|Mount nbd share from <server>.}} | |||
<pre>root=dhcp</pre> | |||
{{admon/note|2='''root-path=nbd:<server>:<port>[:<fstype>][:<mountopts>]. root=dhcp alone directs initrd to look at the DHCP root-path where NBD options can be specified. This syntax is only usable in cases where you are directly mounting the volume as the rootfs.'''}} | |||
{{admon/note| | |||
== Network == | == Network == | ||
{{admon/warning| You need to install dracut-network for this module.}} | |||
<pre>ip=[dhcp|on|any]</pre> | |||
{{admon/note|2='''Get ip from dhcp server from all interfaces.If root=dhcp, loop sequentially through all interfaces '(eth0, eth1, ...)' and use the first with a valid DHCP root-path.'''}} | |||
<pre>ip=<interface>:[dhcp|on|any|none|off]</pre> | |||
{{admon/note|Get ip from dhcp server on a specific interface.}} | {{admon/note|Get ip from dhcp server on a specific interface.}} | ||
{{admon/note|Explicit | <pre>ip=<client-IP-number>:[<server-id>]:<gateway-IP-number>:<netmask>:<client-hostname>:<interface>:{dhcp|dhcp6|auto6|on|any|none|off}</pre> | ||
{{admon/note|Explicit network configuration.}} | |||
* none,off mean static network configuration | |||
* dhcp,on,any mean DHCP IPv4 configuration | |||
* dhpc6 - DHCP IPv6 configuration | |||
* auto6 - automatic IPv6 configuration | |||
<pre>nameserver=srv1 [nameserver=srv2 [nameserver=srv3 [...]]]</pre> | |||
{{admon/note|2='''Explicit nameserver configuration'''}} | |||
== Misc == | == Misc == | ||
<pre>rdblacklist=<modulename></pre> | |||
{{admon/note|TBD: do not load modulename.}} | {{admon/note|TBD: do not load modulename.}} | ||
Debug | == Debug == | ||
<pre>rd.shell</pre> | |||
{{admon/note|Drop to a shell if the initramfs fails.}} | |||
<pre>rd.debug</pre> | |||
{{admon/note|set -x for the dracut shell.}} | |||
<pre>rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup]</pre> | |||
{{admon/note|Drop the shell on defined breakpoint.}} | |||
<pre>rd.udev.info</pre> | |||
{{admon/note|Set udev to loglevel info.}} | |||
<pre>rd.udev.debug</pre> | |||
{{admon/note|Set udev to loglevel debug.}} | |||
== Configuration in initrd == | |||
<pre>/etc/conf.d/* </pre> | |||
{{admon/note|Command line options can override values set here}} | |||
=Dracut-catimages= | |||
Creates initial ramdisk image by concatenating several images from the command line and /boot/dracut/ | |||
'''SYNOPSIS''' | |||
<pre>dracut-catimages [OPTION]... <initramfs> <base image> [<image>...]</pre> | |||
==-f, --force== | |||
<pre>-f, --force</pre> | |||
{{admon/note|Overwrite existing initramfs file.}} | |||
==-i, --imagedir== | |||
<pre>-i, --imagedir</pre> | |||
{{admon/note|Directory with additional images to add (default: /boot/dracut/).}} | |||
==-o, --overlaydir== | |||
<pre>-o, --overlaydir</pre> | |||
{{admon/note|Overlay directory, which contains files that will be used to create an additional image.}} | |||
==--nooverlay== | |||
<pre>--nooverlay</pre> | |||
{{admon/note|Do not use the overlay directory.}} | |||
==--noimagedir== | |||
<pre>--noimagedir</pre> | |||
{{admon/note|Do not use the additional image directory.}} | |||
==-h, --help== | |||
<pre>-h, --help</pre> | |||
{{admon/note|Print help text and exit.}} | |||
==--debug== | |||
<pre>--debug</pre> | |||
{{admon/note|Output debug information of the build process.}} | |||
==-v, --verbose== | |||
<pre>-v, --verbose</pre> | |||
{{admon/note|Verbose output during the build process.}} | |||
=Dracut-gencmdline= | |||
Generate the kernel command line for the local host. | |||
'''SYNOPSIS''' | |||
<pre>dracut-gencmdline</pre> | |||
Latest revision as of 21:50, 23 April 2015
Dracut
Creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem.
SYNOPSIS
dracut [OPTION]... <image> <kernel-version>
-f, --force
-f, --force
-m, --modules
-m, --modules LIST
-o, --omit
-o, --omit LIST
-a, --add
-a, --add LIST
-d, --drivers
-d, --drivers LIST
-k, --kmoddir
-k, --kmoddir {DIR}
--fwdir
--fwdir {DIR}
--kernel-only
--kernel-only
--no-kernel
--no-kernel
--strip
--strip
--nostrip
--nostrip
-h, --help
-h, --help
--debug
--debug
-v, --verbose
v, --verbose
-c, --conf
-c, --conf FILE
-l, --local
-l, --local
-H, --hostonly
-H, --hostonly
-i, --include
-i, --include SOURCE TARGET
-I, --install
-I, --install LIST
Dracut kernel command line parameters
The root filesystem used by the kernel is specified in the boot configuration file, as always. The traditional root=/dev/hda1 style device specification is allowed. If a label is used, as in root=LABEL=rootPart the initrd will search all available devices for an ext2 or ext3 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.
Limitations
- Command line length: 2048
- dhcp root-path: 255
Standard
init=<path to real init>
root=<path to blockdevice>
I18N
KEYBOARDTYPE=sun|pc
KEYTABLE=<keytable filename>
SYSFONT= Console font
SYSFONTACM= Unicode font map
UNIMAP= Unicode font map
LANG=<locale>
Bootsplash - plymouth
rd_plytheme=<theme name>
LVM
rd_NO_LVM
rd_LVM_VG=<volume group name>
crypto LUKS
rd_NO_LUKS
rd_LUKS_UUID=<luks uuid>
MD
rd_NO_MD
rd_NO_MDIMSM
rd_MD_UUID=<md uuid>
DMRAID
rd_NO_DM
rd_DM_UUID=<dmraid uuid>
DASD
dasd=....
DHCP
root=dhcp
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 root-path=<server-ip>:<root-dir>[,<nfs-options>]
root=dhcp root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>]
root=dhcp root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>]
root=/dev/nfs nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
iSCSI
root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname>::
root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname>
root=??? netroot=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname> ...
root=??? iscsi_initiator= iscsi_target_name= iscsi_target_ip= iscsi_target_port= iscsi_target_group= iscsi_username= iscsi_password= iscsi_in_username= iscsi_in_password=::
root=??? iscsi_firmware::
NBD
root=nbd:<server>:<port>[:<fstype>][:<mountopts>]
root=dhcp
Network
ip=[dhcp|on|any]
ip=<interface>:[dhcp|on|any|none|off]
ip=<client-IP-number>:[<server-id>]:<gateway-IP-number>:<netmask>:<client-hostname>:<interface>:{dhcp|dhcp6|auto6|on|any|none|off}
- none,off mean static network configuration
- dhcp,on,any mean DHCP IPv4 configuration
- dhpc6 - DHCP IPv6 configuration
- auto6 - automatic IPv6 configuration
nameserver=srv1 [nameserver=srv2 [nameserver=srv3 [...]]]
Misc
rdblacklist=<modulename>
Debug
rd.shell
rd.debug
rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup]
rd.udev.info
rd.udev.debug
Configuration in initrd
/etc/conf.d/*
Dracut-catimages
Creates initial ramdisk image by concatenating several images from the command line and /boot/dracut/
SYNOPSIS
dracut-catimages [OPTION]... <initramfs> <base image> [<image>...]
-f, --force
-f, --force
-i, --imagedir
-i, --imagedir
-o, --overlaydir
-o, --overlaydir
--nooverlay
--nooverlay
--noimagedir
--noimagedir
-h, --help
-h, --help
--debug
--debug
-v, --verbose
-v, --verbose
Dracut-gencmdline
Generate the kernel command line for the local host.
SYNOPSIS
dracut-gencmdline