Full /boot partition

Since all three of my systems are Intel-based, I’ve removed the AMD and NVIDIA firmware packages.

desktop Fedora 42 ws
mauro@fedora:~$ ls -lh /boot/init*
-rw-------. 1 root root 127M  2 set 18.53 /boot/initramfs-0-rescue-59819e6a9e97483ebd3a54391db6ae43.img
-rw-------. 1 root root  66M  2 set 18.53 /boot/initramfs-6.16.3-200.fc42.x86_64.img
-rw-------. 1 root root  64M  5 set 06.33 /boot/initramfs-6.16.4-200.fc42.x86_64.img
-rw-------. 1 root root  64M  9 set 09.23 /boot/initramfs-6.16.5-200.fc42.x86_64.img
mauro@fedora:~$ dracut --version
dracut 107-2.fc42
mauro@fedora:~$ 

laptop Fedora 43 ws 
mauro@fedora:~$ dracut --version
dracut 107-6.fc43
mauro@fedora:~$ ls -lah /boot/init*
-rw-------. 1 root root 252M  8 set 09.35 /boot/initramfs-0-rescue-6028ae3869284420a2abb3b55361aa48.img
-rw-------. 1 root root  63M  8 set 09.38 /boot/initramfs-6.17.0-0.rc3.31.fc43.x86_64.img
-rw-------. 1 root root  62M 10 set 09.22 /boot/initramfs-6.17.0-0.rc5.42.fc43.x86_64.img
mauro@fedora:~$ 

laptop Fedora 42 ws
mauro@fedora:~$ dracut --version
dracut 107-2.fc42
mauro@fedora:~$ ls -lh /boot/init*
-rw-------. 1 root root 127M 29 ago 19.16 /boot/initramfs-0-rescue-e41efb25f1864bef9f9db3624c17b033.img
-rw-------. 1 root root  59M 21 ago 08.02 /boot/initramfs-6.15.10-200.fc42.x86_64.img
-rw-------. 1 root root  59M  5 set 14.56 /boot/initramfs-6.16.4-200.fc42.x86_64.img
-rw-------. 1 root root  59M  9 set 08.16 /boot/initramfs-6.16.5-200.fc42.x86_64.img
mauro@fedora:~$ 
2 Likes

you can configure strict hostonly_mode.

$  cat /etc/dracut.conf.d/hostonly_mode.conf 
hostonly_mode="strict"

For systems with a NVIDIA GPU, you could probably remove/move unneeded FW files. It depends on what GPU is installed.
e.g. system has a Turing GPU (RTX 20* generation) or older.
It does not need the huge FW files for the RTX30* or newer generations.

so I moved these directories and links from /usr/lib/firmware/nvidia/ to a new subdirectory.

$ du -sh .
76M	.
$ ls -l
total 36
drwxr-xr-x. 1 root root  6 Aug 10 02:00 ad102
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 ad103 -> ad102
drwxr-xr-x. 1 root root  6 May 13 02:56 ad103.rpmmoved
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 ad104 -> ad102
drwxr-xr-x. 1 root root  6 May 13 02:56 ad104.rpmmoved
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 ad106 -> ad102
drwxr-xr-x. 1 root root  6 May 13 02:56 ad106.rpmmoved
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 ad107 -> ad102
drwxr-xr-x. 1 root root  6 May 13 02:56 ad107.rpmmoved
drwxr-xr-x. 1 root root 34 Aug 10 02:00 ga102
drwxr-xr-x. 1 root root 34 Aug 15 15:45 ga103
drwxr-xr-x. 1 root root 34 Aug 15 15:45 ga104
drwxr-xr-x. 1 root root 34 Aug 15 15:45 ga106
drwxr-xr-x. 1 root root 34 Aug 15 15:45 ga107
drwxr-xr-x. 1 root root  6 Aug 10 02:00 gb100
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 gb102 -> gb100
drwxr-xr-x. 1 root root  6 Aug 10 02:00 gb202
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 gb203 -> gb202
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 gb205 -> gb202
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 gb206 -> gb202
lrwxrwxrwx. 1 root root  5 Aug 10 02:00 gb207 -> gb202
drwxr-xr-x. 1 root root  6 Aug 10 02:00 gh100

the FW files are in ga102/gsp.

ls -lh ga102/gsp/
total 74M
-rw-r--r--. 1 root root 33K Aug 10 02:00 booter_load-535.113.01.bin.xz
-rw-r--r--. 1 root root 35K Aug 10 02:00 booter_load-570.144.bin.xz
-rw-r--r--. 1 root root 19K Aug 10 02:00 booter_unload-535.113.01.bin.xz
-rw-r--r--. 1 root root 21K Aug 10 02:00 booter_unload-570.144.bin.xz
-rw-r--r--. 1 root root 17K Aug 10 02:00 bootloader-535.113.01.bin.xz
-rw-r--r--. 1 root root 18K Aug 10 02:00 bootloader-570.144.bin.xz
-rw-r--r--. 1 root root 25M Aug 10 02:00 gsp-535.113.01.bin.xz
-rw-r--r--. 1 root root 49M Aug 10 02:00 gsp-570.144.bin.xz

for comparison, here are the initramfs images with default settings and all NVIDIA firmware files included

ls -lh initramfs-6.16.*
-rw-------. 1 root root 262M Aug 21 08:01 initramfs-6.16.2-200.fc42.x86_64.img_hostonly_OFF
-rw-------. 1 root root 173M Aug 21 07:53 initramfs-6.16.2-200.fc42.x86_64.img_hostonly_sloppy
-rw-------. 1 root root 146M Aug 21 05:34 initramfs-6.16.2-200.fc42.x86_64.img_hostonly_strict
-rw-------. 1 root root 146M Aug 24 18:35 initramfs-6.16.3-200.fc42.x86_64.img
-rw-------. 1 root root 146M Aug 29 03:53 initramfs-6.16.4-200.fc42.x86_64.img

with the changes

ls -lh /boot/initramfs-*
-rw-------. 1 root root 201M Aug 21 05:31 /boot/initramfs-0-rescue-567c7e0e03b242e4b5d672cc22fffe54.img
-rw-------. 1 root root  83M Aug 21 05:30 /boot/initramfs-6.15.10-200.fc42.x86_64.img
-rw-------. 1 root root  71M Sep  4 20:00 /boot/initramfs-6.16.5-200.fc42.x86_64.img
-rw-------. 1 root root  71M Sep 10 11:16 /boot/initramfs-6.16.6-200.fc42.x86_64.img
1 Like

The default is hostonly="yes" according to /usr/lib/dracut/dracut.conf.d/01-dist.conf. If you install the dracut-config-generic package the hostonly is changed to “no” which` among other things, causes all firmware modules to be included in the ramfs.

The advantage of disabling hostonly is that your initramfs will work on any system, basically works everywhere the rescue images works, and up-to-date too.

Where did I change hostonly to no? :slight_smile:
I’ve configured installonly_limit = 5 , and /boot of 1GB is too small with current default settings.

The default hostonly_mode is sloppy and it pulls many more modules compared to previous dracut-105 version.
Dracut’s v107 sloppy mode pulls in these modules compared to the previous version. I don’t need them. I plan to reinstall with LUKS , though.

$ diff -u  lsinitrd_modules__dracut_105 lsinitrd_modules__dracut_107 |grep -E '^[-+]'
-Version: dracut-105-3.fc42
+Version: dracut-107-2.fc42
-shell-interpreter
+systemd-cryptsetup
+systemd-pcrphase
+dbus-broker
+dbus
+network-manager
+network
+net-lib
+crypt
+dm
+kernel-network-modules
+lvm
+mdraid
+multipath
+qemu
+qemu-net
+tpm2-tss
+cifs
+fcoe
+fcoe-uefi
+hwdb
+iscsi
+lunmask
+nfs
+nvmf
+virtiofs
+shell-interpreter
+uefi-lib

I am not 100% certain that is correct.
My dracut version is 107-2.fc42 for all the current images.
I don’t have an intramfs image created by the older dracut version, but I do see this

# diff -u 6.15 6.16 | grep -E '^[+-]'
--- 6.15	2025-09-10 08:54:30.524932264 -0500
+++ 6.16	2025-09-10 08:56:10.974386255 -0500
-Image: /boot/initramfs-6.15.10-200.fc42.x86_64.img: 96M
+Image: /boot/initramfs-6.16.5-200.fc42.x86_64.img: 159M

The difference does not appear to be in the modules included for the 2 kernel versions but instead is elsewhere. There is a noticeable difference in size for the images.

I then ran dracut -f --hostonly --hostonly-mode strict and it made no difference in size of the initramfs image for the 6.16.5 kernel.

Strange. Mine are almost identical in size, see there

Check if someone or something has set it

 grep hostonly /etc/dracut.conf /etc/dracut.conf.d/*.conf /usr/lib/dracut/dracut.conf.d/*.conf

I thought it was the default.

AFAICT the default is this

$ grep hostonly /etc/dracut.conf /etc/dracut.conf.d/*.conf /usr/lib/dracut/dracut.conf.d/*.conf
grep: /etc/dracut.conf.d/*.conf: No such file or directory
/usr/lib/dracut/dracut.conf.d/01-dist.conf:hostonly="yes"
/usr/lib/dracut/dracut.conf.d/01-dist.conf:hostonly_cmdline="no"

This is by now a known bug, and at least the third thread about it - see also

https://discussion.fedoraproject.org/t/initramfs-images-are-huge/163996

https://discussion.fedoraproject.org/t/boot-disk-full/163992

and the mailing list discussion at

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/77F6N5HNCODHACIQ2LQSFQRFWJEQEOYH/

and the bug report here: 2394213 – new host-only sloppy results in significant increase in initramfs size, and made default mode

2 Likes

this makes no sense, with hostonly=no the initramfs images would be bigger, similar to the size of the rescue image. Where did you even get the impression that the system would use hostonly=no?

$ grep hostonly /etc/dracut.conf /etc/dracut.conf.d/*.conf /usr/lib/dracut/dracut.conf.d/*.conf
/etc/dracut.conf.d/hostonly_mode.conf:hostonly_mode="strict"
/usr/lib/dracut/dracut.conf.d/01-dist.conf:hostonly="yes"
/usr/lib/dracut/dracut.conf.d/01-dist.conf:hostonly_cmdline="no"

hostonly mode seems to have no effect on which FW files are included in the initramfs for a driver. It looks like this information is burried somewhere in /lib/modules/<kver>/, probably in the driver/module, because building an initramfs image on a system with a NVIDIA gpu for kernel 6.15.x or older with --hostonly=yes would include only the older FW versions gsp-535.113.01. Images for kernel 6.16.x include gsp-535.113.01 and gsp-570.144 because the nouveau driver in kernel 6.16.x introduced support for the latest GPUs which require the newer FW version.

compare lsinitrd <image> |grep nvidia

# ll *sloppy
-rw-------. 1 root root 115619013 Aug 21 08:08 initramfs-6.15.10-200.fc42.x86_64.img_hostonly_sloppy
-rw-------. 1 root root 181321153 Aug 21 07:53 initramfs-6.16.2-200.fc42.x86_64.img_hostonly_sloppy

# lsinitrd ./initramfs-6.15.10-200.fc42.x86_64.img_hostonly_sloppy |grep -E  '^-.*/gsp/gsp-' 
-rw-r--r--   1 root     root     25639648 Jul 24 02:00 usr/lib/firmware/nvidia/ga102/gsp/gsp-535.113.01.bin.xz
-rw-r--r--   1 root     root     12589816 Jul 24 02:00 usr/lib/firmware/nvidia/tu102/gsp/gsp-535.113.01.bin.xz
# lsinitrd ./initramfs-6.16.2-200.fc42.x86_64.img_hostonly_sloppy |grep -E  '^-.*/gsp/gsp-' 
-rw-r--r--   1 root     root     25639648 Jul 24 02:00 usr/lib/firmware/nvidia/ga102/gsp/gsp-535.113.01.bin.xz
-rw-r--r--   1 root     root     51324396 Jul 24 02:00 usr/lib/firmware/nvidia/ga102/gsp/gsp-570.144.bin.xz
-rw-r--r--   1 root     root     12589816 Jul 24 02:00 usr/lib/firmware/nvidia/tu102/gsp/gsp-535.113.01.bin.xz
-rw-r--r--   1 root     root     13371848 Jul 24 02:00 usr/lib/firmware/nvidia/tu102/gsp/gsp-570.144.bin.xz

I would agree

$ dirt /usr/lib/firmware/amdgpu/ /usr/lib/firmware/radeon
25M	/usr/lib/firmware/amdgpu/
1,8M	/usr/lib/firmware/radeon
26M	total

~$ dirt /usr/lib/firmware/nvidia/
103M	/usr/lib/firmware/nvidia/
103M	total

could there be a connection?

I’ve been following the F43 Change Proposal thread on zstd compression, and I noticed the final comment mentioning that “the initramfs on Fedora Workstation 42 and Fedora CoreOS 42 is compressed using Zstandard.” I’ve seen relatively small initramfs sizes (around 60–70MB), except for the rescue images.
As someone with limited experience, I’d like to ask — could the inclusion of zstd as the default compression method have contributed to this optimization?
Thanks in advance and apologies if this has already been covered elsewhere!
Best regards,
Mauro (wkmaurom)

The way it works is as follows.

For each kernel module included in the initrd, the module may require a corresponding firmware file to also be included. For example, if you ask dracut to include the nouveau module, it will require the modules listed by this command

modinfo -F firmware /usr/lib/modules/$(uname -r)/kernel/drivers/gpu/drm/nouveau/nouveau.ko.xz

Equivalent for the nvidia modules in extra/nvidia if you chose to include those in the initrd. It may be included by default; I don’t know.

1 Like

If by optimization you mean file size, no. Zstd is much faster, which significantly improves boot times, but the file sizes are almost the same.

1 Like

right, forgot that modinfo also lists firmware files.

reg. the extra drivers, the rpmfusion nvidia rpms set the extra drivers on the dracut omit_drivers list.

Sorry for the belated reply, I used the terminal, likely the command you named.
If by “manually” you mean through the file manager GUI, I have not used that.
I’m glad the issue of the size of the initramfs files is being discussed

This means exactly what it says. Selecting and removing specific files manually either through the file manager or on the command line versus using the tools such as dnf or the gui software manager which perform complete removal of all the package files and not just the files chosen by the user..

1 Like

Thank you for taking the time to clarify.
I’m afraid I used sudo rm /boot/<filename>, the command I named in my open post.
Is there something I can do to avoid or mitigate the problems you were talking about?