$linuxjunkies
>

dracut

also: initramfs generator, dracut-initramfs

Dracut is a modular initramfs generation tool that creates the initial RAM filesystem needed to boot a Linux system. It assembles kernel modules, drivers, and utilities required before the root filesystem can be mounted.

Dracut replaces older initramfs generators like mkinitrd. It dynamically detects what drivers and modules your system needs—based on your hardware and configuration—rather than including everything. This makes initramfs images smaller and more portable.

Dracut works by copying necessary files (kernel modules, firmware, system utilities) into a compressed cpio archive, which the bootloader loads into RAM. When the kernel starts, it runs the init script from this archive to load hardware drivers, find the root filesystem, and hand off to the real init system.

Example: After a kernel upgrade, you might regenerate your initramfs with dracut -f to ensure new drivers are included. Dracut will automatically detect that your root filesystem is LVM-based and include LVM modules, whereas an older tool might require manual configuration.

Related terms