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.kosuffix. no.ko, i'm serious π₯force_drivers+=" <list of kernel modules> "β seeadd_driversabove. but in this case it is ensured that the drivers are tried to be loaded early viamodprobe. 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.kosuffix. 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.kosuffix. this option forces dracut to only include the specified kernel modules. in most cases the--add-driversoption 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 overadd_dlopen_featuresabove. 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 (seeglob(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 formksquashfs. you can refer to themksquashfsmanual 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=yesmust 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. ifhostonly="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/mapperdevice names (default=mapper). πtmpdir="<temporary directory>"β specify temporary directory to use. ποΈ
π Warning: if chrooted to another root other than the real root device, use--fstaband provide a valid/etc/fstab. do not skip this step, i'm begging π
use_fstab="{yes|no}"β use/etc/fstabinstead 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/usrread-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 ifacpi_override=is set toyes. 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 messages1β only fatal errors2β all errors3β warnings4β info5β 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 thessh-clientmodule. 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. Seedracut/modules.d/10i18n/READMEfor 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/*.confwill 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,/bootor/boot/efidepending on where the ESP partition is mounted. The<BUILD_ID>is taken fromBUILD_IDin/usr/lib/os-releaseor if it exists/etc/os-releaseand is left out, ifBUILD_IDis 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, andsbsignneeds 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>/vmlinuzor/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 issbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md. SBAT lore drop π§Ύenhanced_cpio="{yes|no}"β attempt to use thedracut-cpiobinary, 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 thecompress="cat"anddo_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 toyes, 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. Theinitrdnameconfiguration option is required to match theinitr*${kernel}*file pattern and only one file with this pattern should exist in the directory where initramfs is loaded from. Defaults toinitramfs-${kernel}.img. Name it and claim it π·οΈdracut_rescue_image="{yes|no}"β letkernel-installcreate a rescue image (default=no). This configuration option applies only tokernel-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/*.conffile 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 of50-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
- alpine 3.24: dracut-doc 111-r1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms