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
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?
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.
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
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.
$ 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 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?
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.
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)
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
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..
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?