Please try out dracut

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.

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

  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. 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.

  1. 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.

  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.

  1. 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

5 Likes

While this is a step in the right direction it is still a step behind everyone else which are currently testing mkosi-initrd. What is the reason for not directly going in that direction?

All the dracut and initramfs-tools scripts are just duplicating effort that have already been solved by package managers and systemd/udev and which mkosi is utilizing. Having deployed Debian based machines with initrds generated using mkosi I can say that is was a breath of fresh air to work with it.

2 Likes

Works here: Ubuntu 24.10

System:
ASRock - Zen 5 Ryzen 9900X
Default string
B650M Pro RS WiFi
Root mount:
/dev/nvme0n1p1 on / type ext4 (rw,relatime,errors=remount-ro)

It works with me. For some reason, cache maybe, I still see the Dell boot screen with Ubuntu 20 years below. I have multiple kernels but I tested using the latest one from Ubuntu 24.10.
System:
Dell Inc.
GSeries
Dell G15 5511
Root mount:
/dev/nvme1n1p2 on / type ext4 (rw,relatime,errors=remount-ro)

Works well for me too.

System:
QEMU

Standard PC (Q35 + ICH9, 2009)
Root mount:
/dev/mapper/vgxubuntu-root on / type ext4 (rw,relatime,errors=remount-ro)

For some reason, the image generated by dracut is much smaller.

root@agw:~# ls -lh /boot/initrd.img-6.11.0-061100-generic*
-rw-r–r-- 1 root root 22M Oct 19 11:07 /boot/initrd.img-6.11.0-061100-generic
-rw-r–r-- 1 root root 69M Oct 19 11:06 /boot/initrd.img-6.11.0-061100-generic.orig

root@agw:~# file /boot/initrd.img-6.11.0-061100-generic
/boot/initrd.img-6.11.0-061100-generic: ASCII cpio archive (SVR4 with no CRC)
root@agw:~# file /boot/initrd.img-6.11.0-061100-generic.orig
/boot/initrd.img-6.11.0-061100-generic.orig: ASCII cpio archive (SVR4 with no CRC)

Succesfully.

System:
Kubuntu 24.10
Gigabyte Technology Co., Ltd.
To be filled by O.E.M.
Root mount:
/dev/sdb1 on / type btrfs (rw,noatime,compress=lzo,ssd,discard,space_cache=v2,autodefrag,subvolid=256,subvol=/@)

ls -lh /boot/initrd.img*
lrwxrwxrwx 1 root root 27 ƙíj 7 14:37 /boot/initrd.img → initrd.img-6.11.0-8-generic
lrwxrwxrwx 1 root root 27 ƙíj 7 14:37 /boot/initrd.img.old → initrd.img-6.11.0-8-generic
-rw------- 1 root root 20M ƙíj 19 11:50 /boot/initrd.img-6.11.0-8-generic
-rw------- 1 root root 71M ƙíj 19 11:49 /boot/initrd.img-6.11.0-8-generic.orig

System:
Dell Inc.
XPS
XPS 8930
Root mount:
/dev/nvme0n1p2 on / type ext4 (rw,relatime,discard)

Worked well on my DesktopPC with Ubuntu 2410.

System:
Gigabyte Technology Co., Ltd.
Default string
AB350N-Gaming WIFI
Root mount:
/dev/sda2 on / type ext4 (rw,relatime)

For the use case we are talking about here, locally-generated initrds, mkosi-initrd is not intended in the first place. Dracut will remain around for that for the foreseeable future in all distros.

mkosi-initrd’s use case is pre-built initrds, and we already have a solution for that: core-initrd and snapped kernels, as used on FDE desktop images.

Hello!
It works for me.

Distributor ID: Ubuntu
Description: Ubuntu Plucky Puffin (development branch)
Release: 25.04
Codename: plucky

System:
LENOVO
Legion 7 16ARHA7
82UH
Root mount:
/dev/nvme0n1p2 on / type btrfs (rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/)

Did another test on my newly purchased Zotac ZBox CI343.

Worked too.

System:
ZOTAC
NA
ZBOX-
Root mount:
/dev/nvme0n1p2 on / type ext4 (rw,relatime)

Lubuntu is on board with this; I’ll switch Calamares over to dracut as primary in the following days, let’s see what happens.

1 Like

ok for my on Oracular

System:
Gigabyte Technology Co., Ltd.
H510 MB
H510M H
Root mount:
/dev/nvme0n1p3 on / type ext4 (rw,relatime)

corrado@corrado-n3-noble:~$ inxi -SCMc
System:
  Host: corrado-n3-noble Kernel: 6.11.0-9-generic arch: x86_64 bits: 64
  Desktop: GNOME v: 47.0 Distro: Ubuntu 24.10 (Oracular Oriole)
Machine:
  Type: Desktop System: Gigabyte product: H510M H v: -CF
    serial: <superuser required>
  Mobo: Gigabyte model: H510M H v: x.x serial: <superuser required>
    UEFI: American Megatrends LLC. v: F14 date: 03/25/2022
CPU:
  Info: 6-core model: 11th Gen Intel Core i5-11400 bits: 64 type: MT MCP
    cache: L2: 3 MiB
  Speed (MHz): avg: 800 min/max: 800/4400 cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800
corrado@corrado-n3-noble:~$

The image generated by dracut is much smaller

corrado@corrado-n2-plucky:~$ ls -alh /boot/initrd.img-*
-rw-r--r-- 1 root root 65M Oct  9 15:21 /boot/initrd.img-6.11.0-8-generic
-rw-r--r-- 1 root root 19M Nov  3 10:27 /boot/initrd.img-6.11.0-9-generic
corrado@corrado-n2-plucky:~$

Ok also on my nascent Plucky
System:
Gigabyte Technology Co., Ltd.
H510 MB
H510M H
Root mount:
/dev/nvme0n1p2 on / type ext4 (rw,relatime)

Success on Ubuntu 24.10.

System:
Micro-Star International Co., Ltd.
To be filled by O.E.M.
MS-7D77
Root mount:
/dev/nvme0n1p2 on / type ext4 (rw,relatime)

Ok on Plucky

System:
Dell Inc.
Inspiron
Inspiron 3793
Root mount:
/dev/nvme0n1p5 on / type ext4 (rw,relatime)
corrado@corrado-n5-plucky:~$

I’ve been rolling Ubuntu with dracut for several releases now, but confirming that things work great for me on my Kubuntu 24.10 setups.

Systems:

  • GNOME Boxes on Fedora KDE 41
  • Fujitsu Lifebook

Root mount: /dev/vda2 on / type btrfs (rw,noatime,discard=async,space_cache=v2,autodefrag,subvolid=256,subvol=/@)

1 Like

The bootup seems okay but the graphic performance degraded when I play Youtube in Firefox (but no problem on mpv) . After the original initrd is restored I no longer see this problem.

I am using AMD 6800U with AMD 680M Graphics. In addition I use Zabbly kernel for Ubuntu 24.04 on Ubuntu 24.10.

System:
ASUSTeK COMPUTER INC.
Zenbook
Zenbook UM5302TA_UM5302TA
Root mount:
/dev/nvme0n1p6 on / type ext4 (rw,relatime)

Right
 Finally, I also see some similar issues. Not with firefox, but in the system itself. The gnome shell felt very laggy. I am now permanently on KDE, so, I’ll test once again here.

@soumyadghosh Actually I updated the Zabbly kernel from 6.11.6 to 6.11.7 and then I ran dracut. Now the sluggish video problem is gone.

It was so strange

1 Like