Dracut images much larger than mkinitcpio

Just finished up switching over to dracut; everything is working great! The only issue I’m seeing is the image files are much larger than the previous ones:

# with dracut
-rwxr-xr-x 1 root root 133M Dec 28 13:56 /boot/initramfs-linux-fallback.img*
-rwxr-xr-x 1 root root 129M Dec 28 13:57 /boot/initramfs-linux-lts-fallback.img*
-rwxr-xr-x 1 root root  99M Dec 28 13:56 /boot/initramfs-linux-lts.img*
-rwxr-xr-x 1 root root 101M Dec 28 13:56 /boot/initramfs-linux.img

# mkinitcpio
-rwxr-xr-x 1 root root  34M Dec 11 16:21 /mnt/initramfs-linux-fallback.img*
-rwxr-xr-x 1 root root  32M Dec 16 10:40 /mnt/initramfs-linux-lts-fallback.img*
-rwxr-xr-x 1 root root 9.0M Dec 16 10:39 /mnt/initramfs-linux-lts.img*
-rwxr-xr-x 1 root root 9.0M Dec 11 16:21 /mnt/initramfs-linux.img

I’m using (3) config files for settings that I need:

# eos-defaults.conf
omit_dracutmodules+=" network "

# omissions.conf 
omit_dracutmodules+=" brltty "

# vfio.conf
force_drivers+=" vfio_pci vfio_virqfd vfio_iommu_type1 vfio crc32c "

The command line for dracut when running sudo dracut-rebuild has entries like this:

Running dracut for linux-6.1.1-arch1-1
dracut: Executing: /usr/bin/dracut --force --hostonly --no-hostonly-cmdline /boot/initramfs-linux.img 6.1.1-arch1-1

Should the compression option be seen here? What am I missing? When manually adding --compress zstd to this command, I’m still seeing the larger images.

Have you tried this?

Making the initramfs smaller

For example, if you wanted to limit the size of your initrd, you could add a file named smaller.conf with the contents of:



Dracut images are usually larger. Are you an Nvidia user?


Only made about a 1-3% difference.

1 Like

nvidia adds a huge amount to all of them.

I don’t have an nvidia card to test with to see if there are any issues with excluding the nvidia drivers.

1 Like

Do you think I need the nvidia modules if I’m using VFIO? If not, what do I add to disable loading them?

You can remove drivers using omit-drivers+=" driver_name " in a conf file in /etc/dracut.conf.d but I have no idea if that will work or not. I would test it with only one of your kernels and see what happens. If it doesn’t work, boot off the other one.

I tried that on both of my kernels and no space was saved. I think I’ll leave things alone for now.

Thanks for the help @dalto and @pebcak!


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.