Configuring Dracut initramfs on Ubuntu 26.04 is essential for anyone who needs to customize the initial RAM filesystem that loads during the early boot process. Ubuntu 26.04 Resolute Raccoon has fully transitioned from the legacy initramfs-tools framework to Dracut, making it the default initramfs generator. Whether you need to add custom kernel modules, include additional drivers for specialized hardware, or debug boot issues, understanding how to configure Dracut initramfs on Ubuntu 26.04 gives you full control over the boot environment.
In this tutorial you will learn:
- How Dracut works as the default initramfs generator on Ubuntu 26.04
- How to explore and understand the default Dracut configuration
- How to customize modules, drivers, and included files
- How to rebuild the initramfs after configuration changes
- How to inspect and debug the initramfs using lsinitrd and Dracut shell options
- How to migrate custom configurations from the legacy initramfs-tools framework
Software Requirements
| Category | Requirements, Conventions or Software Version Used |
|---|---|
| System | Ubuntu 26.04 Resolute Raccoon |
| Software | Dracut 110-7 (dracut-core, default, pre-installed) |
| Other | Privileged access to your Linux system as root or via the sudo command. |
| Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
/etc/dracut.conf.d/ and rebuild with dracut -f.
| Step | Command/Action |
|---|---|
| 1. List active modules | dracut --list-modules |
| 2. Create custom config | sudo nano /etc/dracut.conf.d/custom.conf |
| 3. Rebuild initramfs | sudo dracut -f |
| 4. Verify contents | sudo lsinitrd |
Understanding Dracut and the Initramfs on Ubuntu 26.04
The initramfs (initial RAM filesystem) is a temporary root filesystem loaded into memory during the early stages of the Linux boot process. Its primary role is to prepare the real root filesystem by loading necessary kernel modules, activating storage devices, and performing tasks such as decrypting LUKS volumes or assembling RAID arrays. Once the real root is ready, the system pivots to it and continues the normal boot sequence.
Ubuntu 26.04 uses Dracut as its default initramfs generator, completing the transition away from the legacy initramfs-tools framework. Dracut takes a fundamentally different approach compared to initramfs-tools. Rather than relying on shell-script hooks that run in a fixed sequence, Dracut uses a modular architecture where each module is a self-contained unit responsible for a specific function such as LVM activation, disk encryption, or Plymouth splash screen support.
Additionally, Dracut builds a host-only initramfs by default. This means it includes only the modules and drivers required by the current system, resulting in a smaller and faster initramfs. You can alternatively build a generic initramfs that includes a broad set of drivers, which is useful for portable or rescue images. This distinction is controlled through configuration, which we will explore in the following sections.
The switch to Dracut also aligns Ubuntu 26.04 with the broader systemd ecosystem, since Dracut integrates natively with systemd units inside the initramfs. If you are familiar with managing kernels on Ubuntu 26.04, understanding Dracut is the natural next step, as every kernel installation or update triggers a Dracut rebuild of the initramfs.
Exploring the Default Dracut Configuration on Ubuntu 26.04
Before making any changes, it is important to understand the default Dracut configuration that ships with Ubuntu 26.04. Dracut reads its configuration from multiple locations in a specific order: the main configuration file, distribution-provided defaults, and user overrides.
- View the main configuration file: The primary configuration file is
/etc/dracut.conf. On a fresh Ubuntu 26.04 installation, this file contains only comments directing you to use drop-in files instead.$ cat /etc/dracut.conf
- Check the user drop-in directory: The
/etc/dracut.conf.d/directory is where you place your own custom configuration files. On a fresh installation, this directory is empty.$ ls -la /etc/dracut.conf.d/
- Explore the distribution defaults: Ubuntu 26.04 stores its distribution-provided Dracut defaults in
/usr/lib/dracut/dracut.conf.d/. This is separate from the user configuration directory and should not be modified directly.$ ls -la /usr/lib/dracut/dracut.conf.d/
This directory contains the base configuration file
01-debian.confalong with several profile subdirectories:Ubuntu 26.04 Dracut Configuration Profiles in /usr/lib/dracut/dracut.conf.d/ File/Directory Purpose 01-debian.confBase Debian/Ubuntu settings: i18n variables, console-setup integration, initrd naming convention hostonly/Sets hostonly="yes"for a minimal, host-specific initramfs (default behavior)generic/Sets hostonly="no"for a portable initramfs with broad hardware supportfips/Adds the FIPS cryptographic compliance module ima/Adds Linux Integrity Measurement Architecture (IMA) modules no-network/Omits all networking modules from the initramfs rescue/Builds a generic rescue image with the rescue module enabled 

The main dracut.conf contains only comments, /etc/dracut.conf.d/ is empty on a fresh install, and distribution defaults reside in /usr/lib/dracut/dracut.conf.d/ - Review the base distribution configuration: The
01-debian.conffile sets Ubuntu-specific defaults for internationalization and the initramfs naming scheme:$ cat /usr/lib/dracut/dracut.conf.d/01-debian.conf
- List all available Dracut modules: To see every module Dracut can include in the initramfs, run:
$ dracut --list-modules
This output shows all modules available on your system. Not all of them are included in the generated initramfs; only those relevant to your hardware and configuration are pulled in by default.
- Check the currently running initramfs: To see which modules are actually present in the current initramfs, use
lsinitrd. This command requires root privileges to read the initramfs image:$ sudo lsinitrd | head -40
The output begins with an Early CPIO image section containing CPU microcode updates, followed by the main initramfs header listing the Dracut version, build arguments, and included modules.


The lsinitrd command reveals the Early CPIO microcode image, Dracut version, and all included modules in the current initramfs
Customizing Dracut Modules and Drivers
The recommended way to customize Dracut on Ubuntu 26.04 is through drop-in configuration files in /etc/dracut.conf.d/. Files here override the distribution defaults in /usr/lib/dracut/dracut.conf.d/. This approach keeps your changes separate from distribution defaults and survives package updates. The following subsections cover the most common customization scenarios.
Adding and Removing Modules
Dracut modules provide specific functionality during early boot. You can explicitly add or exclude modules through configuration directives.
- Create a custom drop-in configuration file: Use a descriptive filename with a numeric prefix to control the load order. Higher numbers override lower ones.
$ sudo nano /etc/dracut.conf.d/90-custom.conf
- Add extra modules: Use the
add_dracutmodulesdirective to include additional modules. For example, to ensure rescue, debug, and bash shell support are always available in the initramfs:add_dracutmodules+=" rescue debug bash "
The spaces inside the quotes are intentional and required for proper parsing.
MODULE DEPENDENCIES
Some Dracut modules require their corresponding userspace packages to be installed. For example, thelvmmodule requireslvm2,mdraidrequiresmdadm, andcryptrequirescryptsetup. If a module cannot be installed, Dracut will report an error during the rebuild. Install the required package first, then rebuild. - Remove unwanted modules: Use
omit_dracutmodulesto exclude modules you do not need. For example, if you do not use Plymouth for the boot splash screen:omit_dracutmodules+=" plymouth "
Omitting unnecessary modules reduces the initramfs size and can slightly speed up boot times.
Adding Extra Kernel Drivers
If your system requires specific kernel drivers to be available during early boot, you can force their inclusion.
- Add drivers to the initramfs: The
add_driversdirective includes extra kernel modules. For example, to add support for specific network or storage drivers:add_drivers+=" e1000e ixgbe nvme "
- Force-load drivers at boot: If a driver must be loaded regardless of hardware detection, use
force_driversinstead:force_drivers+=" vfio vfio_pci "
This is particularly useful for GPU passthrough or VFIO setups where devices must be claimed early in the boot process.
Including Additional Files
You can include arbitrary files or executables in the initramfs using the install_items directive. This is useful for custom scripts or configuration files needed during early boot.
install_items+=" /usr/local/bin/linuxconfig_backup.sh /etc/linuxconfig.conf "
IMPORTANT
Always use the += append operator rather than = when setting Dracut configuration values. The plain = operator overwrites any previously set values from other configuration files, which can break expected behavior.
Switching Between Host-only and Generic Initramfs
By default, Dracut on Ubuntu 26.04 builds a host-only initramfs that includes only what the current system needs. To build a generic initramfs that works on a wider range of hardware, add the following to your custom configuration:
hostonly="no"
A generic initramfs is larger but more portable. This is useful when creating images for deployment across multiple machines or when building rescue media.
Rebuilding the Initramfs with Dracut on Ubuntu 26.04
After making configuration changes, you must rebuild the initramfs for them to take effect. Dracut provides several options for this process.
- Rebuild for the currently running kernel: The
-fflag forces a rebuild, overwriting the existing initramfs:$ sudo dracut -f
This regenerates
/boot/initrd.img-$(uname -r)using the current configuration. - Rebuild for a specific kernel version: If you need to rebuild the initramfs for a kernel other than the currently running one, specify both the output file and kernel version:
$ sudo dracut -f /boot/initrd.img-7.0.0-xx-generic 7.0.0-xx-generic
Replace
7.0.0-xx-genericwith the actual kernel version found in/lib/modules/. - Rebuild with verbose output: To see exactly what Dracut includes and how it processes modules, add the
-vflag:$ sudo dracut -fv
The verbose output is invaluable for troubleshooting when a module or driver is not being included as expected.
- Rebuild all installed kernels: To regenerate the initramfs for every kernel version installed on the system:
$ sudo dracut -f --regenerate-all
This is useful after making a global configuration change that should apply to all kernel versions.
IMPORTANT
Always verify your system boots correctly after rebuilding the initramfs. Keep a previous working kernel entry in your GRUB bootloader as a fallback in case the new initramfs causes boot issues.


Inspecting and Debugging the Initramfs
Dracut provides several tools and boot parameters for inspecting the contents of the initramfs and debugging boot problems.
Inspecting Initramfs Contents with lsinitrd
The lsinitrd command lets you examine the contents of any initramfs image without extracting it manually.
- List the full contents of the current initramfs:
$ sudo lsinitrd
- Search for a specific file or module: Pipe the output through
grepto check whether a particular driver or file is included:$ sudo lsinitrd | grep nvme


Using lsinitrd to confirm NVMe drivers were successfully added to the initramfs after configuring add_drivers - Inspect a specific initramfs image: To examine an initramfs file other than the current one:
$ sudo lsinitrd /boot/initrd.img-7.0.0-xx-generic
- Display only the included Dracut modules: To quickly see which Dracut modules are active in the image:
$ sudo lsinitrd -m
Using the Dracut Emergency Shell
When the initramfs cannot mount the root filesystem, Dracut drops you into an emergency shell. You can also deliberately trigger this shell for debugging by adding kernel parameters through your GRUB bootloader configuration.
- Break into the shell before mounting root: Add the following parameter to the kernel command line in GRUB:
rd.break
This pauses boot just before the root filesystem is mounted, giving you a shell inside the initramfs environment. This is useful for inspecting the state of devices, checking module loading, or manually mounting filesystems.
- Break at a specific Dracut hook point: You can target a more specific point in the boot process:
rd.break=pre-mount
Available hook points include
cmdline,pre-udev,pre-trigger,initqueue,pre-mount,mount,pre-pivot, andcleanup. - Enable full debug logging: For comprehensive boot diagnostics, add:
rd.debug
This produces detailed log output that is stored in the journal once the system fully boots. Note that under normal boot conditions,
journalctl -b -t dracutproduces no output. The entries only appear whenrd.debugis active or when Dracut encounters errors. Review the debug log with:$ journalctl -b -t dracut
TIP
To add kernel parameters temporarily, press e at the GRUB menu to edit the boot entry, append the parameter to the line starting with linux, and press Ctrl+X to boot. The change is not persistent and applies only to the current boot.
If you are upgrading from an earlier Ubuntu release that used initramfs-tools, you may need to translate custom configurations to Dracut equivalents. Note that a fresh Ubuntu 26.04 installation does not include initramfs-tools at all. This section is therefore only relevant if you performed an in-place upgrade from Ubuntu 24.04 or earlier and had custom initramfs-tools hooks or module configurations.
Identifying Legacy Configurations
- Check for existing initramfs-tools customizations: Review the legacy configuration directories for any custom hooks or modules:
$ ls /etc/initramfs-tools/hooks/ 2>/dev/null $ ls /etc/initramfs-tools/scripts/ 2>/dev/null $ cat /etc/initramfs-tools/modules 2>/dev/null
If these directories are empty or do not exist, no migration is needed.
- Check for custom module inclusions: The
/etc/initramfs-tools/modulesfile listed kernel modules to force-include. Translate each entry to a Dracutforce_driversdirective:# Old: /etc/initramfs-tools/modules # e1000e # nvme # New: /etc/dracut.conf.d/90-custom.conf force_drivers+=" e1000e nvme "
Translating Common Hook Types
The following table maps initramfs-tools hook types to their Dracut equivalents:
| initramfs-tools Hook | Dracut Equivalent | Description |
|---|---|---|
hooks/ (build-time) |
module-setup.sh install() |
Runs during initramfs build to include files |
scripts/init-premount/ |
pre-mount hook |
Runs before root filesystem is mounted |
scripts/init-top/ |
cmdline or pre-udev hook |
Runs early in boot before device detection |
scripts/init-bottom/ |
cleanup hook |
Runs after root mount, before pivot |
scripts/local-top/ |
pre-mount hook |
Runs before local disk mount |
conf.d/ (module list) |
/etc/dracut.conf.d/ |
Configuration drop-in directory |
For complex custom hooks, you will need to create a custom Dracut module. A basic Dracut module consists of a directory under /usr/lib/dracut/modules.d/ containing a module-setup.sh script that defines check(), depends(), and install() functions. Consult the Dracut developer documentation for the full module API reference.
Verifying the Migration
- Rebuild and inspect: After translating your configurations, rebuild the initramfs and verify the expected modules and files are included:
$ sudo dracut -fv 2>&1 | tee /tmp/dracut-build.log $ sudo lsinitrd -m
- Test boot: Reboot the system and verify that all expected functionality works. Monitor the journal for any Dracut-related warnings:
$ journalctl -b -t dracut
- Clean up legacy packages: Once you have confirmed the migration is successful and the system boots correctly, remove the legacy initramfs-tools package if it is still present from the upgrade:
$ dpkg -l initramfs-tools 2>/dev/null && sudo apt remove initramfs-tools
Only do this after thorough testing across at least one full reboot cycle.
Conclusion
You now have a thorough understanding of how to configure Dracut initramfs on Ubuntu 26.04. From exploring the default configuration and customizing modules and drivers, to rebuilding and inspecting the initramfs, Dracut provides a powerful and modular framework for managing the early boot environment. The drop-in configuration model in /etc/dracut.conf.d/ makes it straightforward to maintain custom settings that persist across package updates. If you are migrating from initramfs-tools, the mapping between hook types and Dracut equivalents provides a clear path forward. Whenever you make changes, remember to rebuild with dracut -f and always keep a working kernel and initramfs as a fallback through your GRUB bootloader.
Frequently Asked Questions
- How do I check which Dracut modules are included in my current initramfs on Ubuntu 26.04? Run
sudo lsinitrd -mto display a list of all Dracut modules present in the currently active initramfs image. For a full file listing, runsudo lsinitrdwithout any flags. Root privileges are required because the initramfs image in/bootis readable only by root. - What is the difference between host-only and generic initramfs in Dracut? A host-only initramfs includes only the modules and drivers needed by the current system, resulting in a smaller and faster image. A generic initramfs includes a broad set of drivers and modules, making it suitable for portable images or rescue scenarios. Set
hostonly="no"in your Dracut configuration to build a generic image. - Can I still use initramfs-tools on Ubuntu 26.04? The initramfs-tools package is not installed on a fresh Ubuntu 26.04 system and is no longer the default. While it may still be installable from the repositories, it is not actively maintained for Ubuntu 26.04. The recommended approach is to use Dracut for all initramfs management and migrate any legacy custom hooks to Dracut modules.
- How do I troubleshoot a system that does not boot after rebuilding the initramfs? Boot into a previous kernel from the GRUB menu to access a working system. Then use
dracut -fvto rebuild with verbose output and review the log for errors. You can also addrd.debugto the kernel command line to capture detailed boot diagnostics in the journal. - Does Ubuntu 26.04 automatically rebuild the initramfs when installing a new kernel? Yes. Kernel package installation triggers Dracut hooks that automatically generate a new initramfs for the newly installed kernel version. Your custom configurations in
/etc/dracut.conf.d/are applied during this automatic rebuild.
PakarPBN
A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.
In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.
The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.
