We are considering replacing initramfs-tools by Dracut as initrd generation tool in future Ubuntu releases.
Ubuntu 24.10 (oracular) ships a dracut version that should work on all machines and in most cases.
If you have machines running with Ubuntu 24.10 (oracular) and are comftable with the instructions below, we like to ask you to test Dracut on your machines. If you run into issue, please report them against dracut. If it works for you, you can report the success on this post.
How to test dracut
These steps are designed to be easy and safe to revert back.
-
Check the âKnown Issuesâ section if your setup is known not to work. In this case, you can stop here.
-
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).
- Install dracut-core:
sudo apt install dracut-core
The dracut-core
package will provide the dracut
program, but will not replace the default initrd tool (so kernel updates will continue using initramfs-tools for initrd generation). If your system boots over the network, please also install dracut-network
.
Important: Do not install the dracut
binary package, because this would remove initramfs-tools
.
- Generate an initrd with dracut
sudo dracut -H --hostonly-mode=sloppy --force
This command will create an initrd for the running kernel. Please report a bug in case this command fails or in case there are warnings or errors in the output.
Note: The dracut call should just be sudo dracut --force
, but you have to add -H --hostonly-mode=sloppy
as workaround for bug #2084809.
- 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.
- Restore the system.
6a. Restore the backup initrd:
sudo mv /boot/initrd.img-$(uname -r).orig /boot/initrd.img-$(uname -r)
ls -alh /boot/initrd.img-*
6b. Reboot
6c. Remove dracut-core:
sudo apt remove dracut-core
Reporting success
In case your system boots successfully with Dracut, please comment here with the information about your system and setup:
echo "System:"
cat /sys/devices/virtual/dmi/id/sys_vendor
cat /sys/devices/virtual/dmi/id/product_family
cat /sys/devices/virtual/dmi/id/product_name
echo "Root mount:"
mount | grep " / "
Please state if you use an uncommon setup.
Reporting failures
Please check if your problem is already reported. See the known issues listed below and Bugs : dracut package : Ubuntu for all reported bug. If your problem is not reported there yet, please report it using ubuntu-bug dracut-core
.
Known issues
-
encrypted ZFS: dracut does not support booting from an encrypted ZFS volume
-
plymouth: Plymouth is not working. The boot will be in text mode until the plymouth integration is fixed.
-
iSCSI: dracut generated initramfs doesnât contain necessary files for iscsi boot
-
kdump-tools: kdump tools X dracut doesnât work