Dracut will be supported in Ubuntu 25.04

Following Please try out dracut and the specification [Spec] Switch to Dracut we are going to support Dracut as alternative to initramfs-tools as initrd generation tool in Ubuntu 25.04 (plucky). We want to make Dracut the default in the following Ubuntu 25.10.

How to switch to Dracut

If you are running Ubuntu 25.04 (plucky) you can decide to switch from initramfs-tools to Dracut. The following steps are designed to be easy and safe to revert back.

  1. Check the ‘Known Issues’ section if your setup is known not to work. In this case, you can stop here and wait for them to be fixed.

  2. Ensure that you have a backup initrd available to boot. Unless it is a fresh installation, there should be two kernels and corresponding initrds. The ls command shows all the initrds on your system:

ls -alh /boot/initrd.img-*

If there is only one initrd, create a backup of your current initrd:

sudo cp /boot/initrd.img-$(uname -r) /boot/initrd.img-$(uname -r).orig

Note: Having a fallback is important in case booting with Dracut fails or in case generating the initrd with initramfs-tools fails when booted with a Dracut initrd (see bug #2084809 for such an example).

  1. Check if you have custom initramfs-tools hooks/scripts installed:
dpkg-query -W | grep -Ew '(clevis-initramfs|zfs-initramfs)'

You will need to install the equivalent dracut module packages:

initramfs hook package Dracut module package
clevis-initramfs clevis-dracut
zfs-initramfs zfs-dracut
  1. Install dracut:
clevis_dracut=$(dpkg -s clevis-initramfs >/dev/null 2>&1 && echo clevis-dracut)
zfs_dracut=$(dpkg -s zfs-initramfs >/dev/null 2>&1 && echo zfs-dracut)
sudo apt install dracut $clevis_dracut $zfs_dracut

Important: The initramfs-tools package will be removed. If more packages are removed and you are unsure, please let me know or file a bug against dracut.

Note: You can also remove the initramfs-tools-bin and initramfs-tools-core packages.

  1. Reboot

Reboot your machine. In case your system fails to boot, use the fallback boot entry. In case you only had one initrd in step 2, use the backed up initrd: If you use GRUB, edit the GRUB boot entry and change the initrd line to the backup by adding .orig to the initrd name.

Reporting failures

Please check if your problem is already reported. See the known issues listed below and https://bugs.launchpad.net/ubuntu/+source/dracut for all reported bug. If your problem is not reported there yet, please report it using ubuntu-bug dracut.

Known issues

2 Likes

I’ve been running dracut --force {initramfs…} manually.

These two updates don’t seem to be crucial unless one is running LUKS and/or zfs?

Is this correct?

I don’t have zfs, did i need zfs-dracut?
can i install just dracut?

sudo apt install dracut

dracut? or dracut-core?i

Running dracut --force {initramfs…} is not needed since the dracut package comes with update-initramfs. The dracut postinst calls update-initramfs -u which calls dracut --force.

If you do neither have zfs nor clevis, the code snippet from point 4 will be evaluated to just:

sudo apt install dracut

The dracut package will come with update-initramfs to generate the initrd on dracut/kernel updates.

When I run manually with the --force option, a list of diagnostics is output about the updates to other parts of the system (not just initramfs). But, I don’t see this same sort of diagnostic when I don’t run dracut manually.

e.g. I typically run dracut after I update the kernel from mainline. Do you mean that this is not necessary? When will dracut kick in automatically? On the next boot or is it applied in the background when a kernel is installed or what?

Well, I guess I should rtfm. Anyway, seems to work fine. I’ve had no major issues with dracut on Plucky. I’m considering whether I should switch to it on Oracular as well.

1 Like

update-initramfs calls dracut with -q to be quiet. That’s why you will see less output.

When you have the dracut package installed, you do not need to call dracut manually any more. On kernel upgrades, /etc/kernel/postinst.d/dracut will take care of updating the initrd. The kernel postinst script will call that. You should see an output line from update-initramfs in the APT log when upgrading the kernel.

On my Ubuntu Plucky - before:

corrado@corrado-n8-pp-0119:~$ systemd-analyze
Startup finished in 7.498s (firmware) + 14.546s (loader) + 5.316s (kernel) + 11.296s (userspace) = 38.657s 
graphical.target reached after 11.296s in userspace.

With dracut:

corrado@corrado-n8-pp-0119:~$ systemd-analyze
Startup finished in 7.600s (firmware) + 9.323s (loader) + 3.713s (kernel) + 1.612s (initrd) + 11.227s (userspace) = 33.476s 
graphical.target reached after 11.227s in userspace.