DRACUT.CONF(5)

πŸ¦‹ DRACUT.CONF(5) β€” the dracut config file glow-up πŸ¦‹

okay bestie, this is the dracut.conf manual page β€” like, the config file(s) for dracut, section 5 of the manual. it's giving "the lore before the build" and honestly? iconic. let's get into it πŸ’…


✨ NAME ✨

dracut.conf β€” the configuration file(s) for dracut. that's it, that's the whole vibe πŸŽ€


⭐ SYNOPSIS ⭐

/etc/dracut.conf /etc/dracut.conf.d/*.conf
/usr/lib/dracut/dracut.conf.d/*.conf /run/initramfs/dracut.conf.d/*.conf

look at all those paths living their best life 🫢


πŸ’– DESCRIPTION πŸ’–

dracut.conf gets loaded during the initialization phase of dracut. yes, before the party starts. main character energy fr fr.

*.conf files are read from /run/initramfs/dracut.conf.d, /usr/lib/dracut/dracut.conf.d and /etc/dracut.conf.d. and here's the tea: files with the same name in /etc/dracut.conf.d will replace files in /usr/lib/dracut/dracut.conf.d. so your /etc versions get the final say, periodt πŸ‘‘

then the files are read in alphanumerical order and will override parameters set in /etc/dracut.conf. so order matters, bestie β€” don't come crying to me when your 10-foo.conf gets eaten by 20-foo.conf.

each line specifies an attribute and a value. a # indicates the beginning of a comment β€” the following characters, up to the end of the line, are not interpreted. so go ahead and yap in the comments, the config literally does not care 😌

dracut command line options will override any values set here. yes, command line beats config. it's called hierarchy, look it up πŸ’…

⚠️ configuration files must have the extension .conf. other extensions are straight up ignored. not "sort of considered", not "grandfathered in" β€” ignored. don't do it πŸ™ˆ

🌈 CONFIGURATION OPTIONS 🌈

okay this is the big one, the main event, the moment we've all been waiting for. every single option, no skips, no cap πŸ“

  • add_dracutmodules+=" <dracut modules> " β€” add a space-separated list of dracut modules to call when building the initramfs. the modules live in /usr/lib/dracut/modules.d. this is the one you actually want in most cases, just saying πŸ’œ
  • force_add_dracutmodules+=" <dracut modules> " β€” force-add a space-separated list of dracut modules to the default set of modules, specifically when host-only mode is specified. and oh β€” this parameter can be specified multiple times. stack 'em up 🧚
  • omit_dracutmodules+=" <dracut modules> " β€” omit a space-separated list of dracut modules to call when building the initramfs. modules are located in /usr/lib/dracut/modules.d.
πŸ’€ Warning please, please avoid manually omitting dracut modules β€” you may inadvertently remove essential ones that dracut can't detect or even warn you about. using this option is not recommended and is at your own risk. i'm not mad, i'm just disappointed 😭
  • dracutmodules+=" <dracut modules> " β€” specify a space-separated list of dracut modules to call when building the initramfs. modules are located in /usr/lib/dracut/modules.d. this option forces dracut to only include the specified dracut modules β€” like, ONLY those. in most cases the "add_dracutmodules" option is what you actually want to use. this one is not recommended (use at your own risk). consider yourself warned, bestie 🫢
  • add_drivers+=" <kernel modules> " β€” specify a space-separated list of kernel modules to add to the initramfs. the kernel modules have to be specified without the .ko suffix. no .ko, i'm serious πŸ”₯
  • force_drivers+=" <list of kernel modules> " β€” see add_drivers above. but in this case it is ensured that the drivers are tried to be loaded early via modprobe. early bird gets the module ⭐
  • omit_drivers+=" <kernel modules> " β€” specify a space-separated list of kernel modules not to add to the initramfs. the kernel modules have to be specified without the .ko suffix. same rule, different direction πŸ™ˆ
  • drivers+=" <kernel modules> " β€” specify a space-separated list of kernel modules to exclusively include in the initramfs. kernel modules have to be specified without the .ko suffix. this option forces dracut to only include the specified kernel modules. in most cases the --add-drivers option is what you want to use. this option is not recommended to use (use at your own risk). it's giving "exclusive invite list" and it's risky πŸ’€
  • add_dlopen_features+=" <pattern>:<feature>[,<feature>...] ... " β€” specify a space-separated list of binaries matching pattern against a comma-separated list of features to install dependencies for. for example, "libsystemd-shared-*.so:idn,ip4tc" will install the dependencies for systemd's international domain name and iptables support. pattern should match the soname for libraries or the filename for executables. ✨
  • omit_dlopen_features+=" <pattern>:<feature>[,<feature>...] ... " β€” specify a space-separated list of binaries matching pattern against a comma-separated list of features to omit dependencies for. some dracut modules add certain features by default. this takes precedence over add_dlopen_features above. so the omit wins the argument, lowkey πŸŽ€
  • filesystems+=" <filesystem names> " β€” specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. πŸ‘‘
  • drivers_dir="<kernel modules directory>" β€” specify the directory where to look for kernel modules. that's the whole thing. short, sweet, slay 🌸
  • fw_dir+=" :<dir>[:<dir> ...] " β€” specify additional colon-separated list of directories where to look for firmware files. colon-separated, not space-separated, don't mix it up bestie πŸ¦‹
  • libdirs+=" <dir>[ <dir> ...] " β€” specify a space-separated list of directories where to look for libraries. πŸ“š
  • install_items+=" <file>[ <file> ...] " β€” specify additional files to include in the initramfs, separated by spaces. πŸŽ€
  • remove_items+=" <file/dir>[ <file/dir> ...] " β€” specify additional files or directories to remove from the generated initramfs, separated by spaces. these file/dir are shell wildcard patterns (see glob(7)).
πŸ’€ Warning: avoid manually removing files or directories, as you may inadvertently remove essential ones that dracut won't detect or warn you about. using this option is not recommended and is at your own risk. don't be brave, be careful 😭
  • install_optional_items+=" <file>[ <file> ...] " β€” specify additional files to include in the initramfs, separated by spaces, if they exist. no drama if they don't, it's fine, it's chill πŸ’…
  • compress="{cat|bzip2|lzma|xz|gzip|lzop|lz4|zstd|<compressor [args ...]>}" β€” compress the generated initramfs using the passed compression program.

if you pass it just the name of a compression program, it will call that program with known-working arguments. πŸ‘

if you pass arguments, it will be called with exactly those arguments. like, precisely. no notes, no extras. 🎯

⚠️ depending on what you pass, this may result in an initramfs that the kernel cannot decompress. so like, maybe don't get creative here 😭

to disable compression, use "cat". yes, cat. iconic. 🐱

  • compress_level_bzip2="{1-9}" β€” compression level when using bzip2 compression (default=9). πŸ“
  • compress_level_gzip="{1-9}" β€” compression level when using gzip compression (default=9). πŸ’–
  • compress_level_lz4="{1-12}" β€” compression level when using lz4 compression (default=9). ✨
  • compress_level_lzma="{0-9}" β€” compression level when using lzma compression (default=9). πŸ’œ
  • compress_level_lzop="{1-9}" β€” compression level when using lzop compression (default=9). 🌸
  • compress_level_xz="{0-9}" β€” compression level when using xz compression (default=unset, i.e. use xz default). unset is a whole mood πŸ¦‹
  • compress_level_zstd="{1-19}" β€” compression level when using zstd compression (default=15). look at that range, she's flexible πŸ‘‘
  • squash_compress="{<compressor [args ...]>}" β€” compress the squashfs image using the passed compressor and compressor specific options for mksquashfs. you can refer to the mksquashfs manual for supported compressors and compressor specific options. πŸ“–

if the squash module is not called when building the initramfs, this option will not take effect. so it's giving "only if you're invited" 🫢

  • do_strip="{yes|no}" β€” strip binaries in the initramfs (default=yes). βœ‚οΈ
  • aggressive_strip="{yes|no}" β€” strip more than just debug symbol and sections, for a smaller initramfs build. the "do_strip=yes" option must also be specified (default=no). read that again: do_strip=yes must also be there, or this does nothing πŸ”₯
  • do_hardlink="{yes|no}" β€” hardlink files in the initramfs (default=yes). πŸ”—
  • prefix=" <directory> " β€” prefix initramfs files with <directory>. πŸŽ€
  • hostonly="{yes|no}" β€” host-only mode: install only what is needed for booting the local host instead of a generic host, and generate host-specific configuration (default=yes). 🏠
  • hostonly_mode="{sloppy|strict}" β€” specify the host-only mode to use (default=sloppy).

in "sloppy" host-only mode, extra drivers and modules will be installed, so a minor hardware change won't make the image unbootable (e.g. changed keyboard), and the image is still portable among similar hosts. forgiving queen πŸ’…

with "strict" mode enabled, anything not necessary for booting the local host in its current state will not be included, and modules may make additional efforts to save more space. but fair warning: minor changes in hardware or environment can make the image unbootable. strict is strict 😬

  • hostonly_cmdline="{yes|no}" β€” if set to "yes", store the kernel command line arguments needed in the initramfs. if hostonly="yes" and this option is not configured, it's automatically set to "yes". (default=no) β€” yes this is a little confusing, no i didn't write it 🌈
  • hostonly_nics+=" [<nic>[ <nic> ...]] " β€” only enable listed NICs in the initramfs. the list can be empty, so other modules can install only the necessary network drivers. empty list, big brain 🧠
  • 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"), or "mapper" to use /dev/mapper device names (default=mapper). 🌟
  • tmpdir="<temporary directory>" β€” specify temporary directory to use. πŸ—‚οΈ
πŸ’€ Warning: if chrooted to another root other than the real root device, use --fstab and provide a valid /etc/fstab. do not skip this step, i'm begging πŸ™
  • use_fstab="{yes|no}" β€” use /etc/fstab instead of /proc/self/mountinfo (default=no). pick your source of truth 🫢
  • add_fstab+=" <filename> " β€” add entries of <filename> to the initramfs /etc/fstab. πŸ“
  • add_device+=" <device> " β€” bring up <device> in initramfs, <device> should be the device name. this can be useful in host-only mode for resume support when your swap is on LVM an encrypted partition. (yes, the original says "LVM an encrypted partition" β€” i'm preserving the quote, don't @ me πŸ’€)
  • mdadmconf="{yes|no}" β€” include local /etc/mdadm.conf (default=no). πŸ’Ύ
  • lvmconf="{yes|no}" β€” include local /etc/lvm/lvm.conf (default=no). πŸ’½
  • fscks=" <fsck tools> " β€” add a space-separated list of fsck tools.

if nothing is specified, the default is umount mount /sbin/fsck* xfs_db xfs_check xfs_repair e2fsck jfs_fsck btrfsck. that's the whole squad πŸ«‚

the installation is opportunistic (non-existing tools are ignored). so if a tool's not there, no crash, no drama, we just move on 😌

  • nofscks="{yes|no}" β€” if specified, inhibit installation of any fsck tools (default=no). 🚫
  • ro_mnt="{yes|no}" β€” mount / and /usr read-only by default (default=no). πŸ”’
  • kernel_cmdline="parameters" β€” specify default kernel command line parameters. despite its name, this command only sets initrd parameters. the name is a little bit of a lie, i know, we've all been there πŸ™ˆ
  • kernel_only="{yes|no}" β€” only install kernel drivers and firmware files (default=no). 🧚
  • no_kernel="{yes|no}" β€” do not install kernel drivers and firmware files (default=no). opposite vibes, same energy ⭐
  • acpi_override="{yes|no}" β€”
πŸ”₯ Caution only use this if you know what you are doing! like, actually know. not "i read a blog post once" know πŸ’€

override BIOS provided ACPI tables. for further documentation read Documentation/acpi/initrd_table_override.txt <https://www.kernel.org/doc/Documentation/acpi/initrd_table_override.txt> in the kernel sources. search for ACPI table files (must have .aml suffix) in acpi_table_dir= directory (see below) and add them to a separate uncompressed cpio archive. πŸ‘‘

Okay so this cpio archive gets glued (concatenated, and the uncompressed one must be the first one) to the compressed cpio archive. The first, uncompressed cpio archive is for data which the kernel must be able to access very early (and cannot make use of uncompress algorithms yet) like microcode or ACPI tables (default=no).

  • acpi_table_dir="<dir>" β€” tells dracut which directory to search for ACPI tables if acpi_override= is set to yes. Directory scavenger hunt vibes πŸ—‚οΈ
  • early_microcode="{yes|no}" β€” combine early microcode with the ramdisk (default=yes). Microcode bestie, let’s go ✨
  • stdloglvl="{0-6}" β€” sets the logging level for standard error (default=3).

Table 1. Logging Levels β€” the whole vibe check, no cap:

  • 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)
  • sysloglvl="{0-6}" β€” sets the logging level for syslog (default=0). Quiet queen energy 🀫
  • fileloglvl="{0-6}" β€” sets the logging level for the logfile (default=4). Now we’re logging-logging πŸ“
  • logfile="<file>" β€” path to the logfile. Put it somewhere cute, bestie.
  • sshkey="<file>" β€” SSH key file used with the ssh-client module. Secure lil key πŸ”
  • show_modules="{yes|no}" β€” print the name of the included modules to standard output during build (default=no). Main character module list, if you ask nicely πŸ‘‘
  • i18n_vars="<variable mapping>" β€” distribution specific variable mapping. See dracut/modules.d/10i18n/README for a detailed description. The lore is in the README fr fr πŸ“–
  • i18n_default_font="<fontname>" β€” the font <fontname> to install, if not specified otherwise. Default is "eurlatgr". Font slay πŸ’…
  • i18n_install_all="{yes|no}" β€” install everything regardless of generic or host-only mode (default=no). Go big or go home 🌈
  • reproducible="{yes|no}" β€” create reproducible images (default=no). Same energy every time ✨
  • noimageifnotneeded="{yes|no}" β€” do not create an image in host-only mode, if no kernel driver is needed and no /etc/cmdline/*.conf will be generated into the initramfs (default=no). Skip the extra work when it’s giving unnecessary 🫢
  • loginstall="<directory>" β€” log all files installed from the host to <directory>. Receipts, but make them files 🧾
  • uefi="{yes|no}" β€” instead of creating an initramfs image, dracut will create an UEFI executable, which can be executed by an UEFI BIOS (default=no). The default output filename is <EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi. <EFI> might be /efi, /boot or /boot/efi depending on where the ESP partition is mounted. The <BUILD_ID> is taken from BUILD_ID in /usr/lib/os-release or if it exists /etc/os-release and is left out, if BUILD_ID is non-existent or empty. UEFI era unlocked πŸ”₯
  • machine_id="{yes|no}" β€” affects the default output filename of the UEFI executable, including the <MACHINE_ID> part (default=yes). ID check, but make it machine πŸͺͺ
  • uefi_stub="<file>" β€” specifies the UEFI stub loader, which will load the attached kernel, initramfs and kernel command line and boots the kernel. The default is /lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub. Stub loader doing the absolute most 🧚
  • uefi_splash_image="<file>" β€” specifies the UEFI stub loader’s splash image. Requires bitmap (.bmp) image format. Splash pic or it didn’t happen πŸŽ€
  • uefi_secureboot_cert="<file>", uefi_secureboot_key="<file>" β€” specifies a certificate and corresponding key, which are used to sign the created UEFI executable. Both certificate and key need to be specified, and sbsign needs to be installed. Secure boot besties, hold hands 🫱🫲
  • uefi_secureboot_engine="parameter" β€” specifies an engine to use when signing the created UEFI executable. E.g. "pkcs11". Engine room energy βš™οΈ
  • kernel_image="<file>" β€” specifies the kernel image, which to include in the UEFI executable. The default is /lib/modules/<KERNEL-VERSION>/vmlinuz or /boot/vmlinuz-<KERNEL-VERSION>. Kernel pic secured πŸ“Έ
  • sbat="parameters" β€” specifies the SBAT parameters, which to include in the UEFI executable. By default the default SBAT string added is sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md. SBAT lore drop 🧾
  • enhanced_cpio="{yes|no}" β€” attempt to use the dracut-cpio binary, which optimizes archive creation for copy-on-write filesystems (default=no). When specified, initramfs archives are also padded to ensure optimal data alignment for extent sharing. To retain reflink data deduplication benefits, this should be used alongside the compress="cat" and do_strip="no" parameters, with initramfs source files, tmpdir staging area and destination all on the same copy-on-write capable file-system. Cow filesystem girlies rise πŸ„βœ¨
  • parallel="{yes|no}" β€” if set to yes, try to execute tasks in parallel (currently only supported for --regenerate-all). Multitasking icon πŸ’…
  • initrdname="<filepattern>" β€” specifies the file name for the generated initramfs if it is not set otherwise. The initrdname configuration option is required to match the initr*${kernel}* file pattern and only one file with this pattern should exist in the directory where initramfs is loaded from. Defaults to initramfs-${kernel}.img. Name it and claim it 🏷️
  • dracut_rescue_image="{yes|no}" β€” let kernel-install create a rescue image (default=no). This configuration option applies only to kernel-install. Rescue baddie on standby πŸš‘

🌸 FILES 🌸

  • /etc/dracut.conf β€” the old configuration file. It is recommended to use individual files in /etc/dracut.conf.d/. Vintage, but not the moment πŸ•°οΈ
  • /etc/dracut.conf.d/ β€” any /etc/dracut.conf.d/*.conf file can override the values in /etc/dracut.conf. The configuration files are read in alphanumerical order. The recommended ordering for distribution or user provided configuration is in the range of 50-59. Confetti of config files 🎊

πŸ‘‘ AUTHOR πŸ‘‘

Harald Hoyer β€” the icon behind it all 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

  • man:dracut[8]
  • man:dracut.cmdline[7]

Okay bye bestie! This page comes from the dracut source, dated 2026-06-01, and it lives in section DRACUT.CONF(5). Mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from