Boot disk full

My system is a few years old. It came with Fedora 23 or 24 installed as the only OS. The boot partition was set up at 898MB. Currently it reports ZERO empty space.

Thing seemed to be okay until kernel 6.16.4. It failed to install due to lack of space. I deleted kernel 6.15.9 and managed to get it installed but… another new kernel has failed to install for the same reason.

There are currently 3 kernels - each having a config, initramfs, symvers, system.map, and vmlinuz file. There are also files for a rescue image. The initramfs files for the 6.16 kernels are 168Mb each vs. 105Mb for the 6.15 kernel.

Is there something I can delete to recover space or should I expand the boot partition?

There seems to be an issue that causes initramfs for new kernels to be significantly bigger, leading to space issues on /boot partitions:

As a temporary workaround, you should be able to uninstall the oldest of the currently installed three kernels.

This issue is affecting other users and is being investigated. It appears to be caused by a new dracut version. dracut is provided by kernel.org. This document descirbes dracut configuration options that can be used to reduce the size of initrd files until a proper solution appears.

I would recommend to temporarily add installonly_limit=2 to /etc/dnf/dnf.conf instead of more complicated options. Just doing this and running dnf distro-sync should remove the oldest installed kernel, and giving you enough space in /boot for an upgrade.

This config change is also easy to revert (just remove that line from the config file again) once it is no longer necessary.

thanks.

I deleted the oldest of the kernels and the new kernel installed. I just have to remember to do it next time.

thanks but, to me, deleting the oldest kernel is the easiest.

I have a similar problem with the very latest (today’s) sytem (including kernel) update of FC43 on Thinkpad Tp15. I am going to add the line: installonly_limit=2 to /etc/dnf/dnf.conf and I would like to make more space by deleting the oldest kernel. But which files exactly should I delete without fear of running into troubles? If I issue: sudo ls -l boot/6.17.0-0 (i.e. the oldest present kernel, the others are 6.17.0-63 and 6.17.1-300) I get the following files:

/boot/config-6.17.0-0.rc7.56.fc43.x86_64
/boot/initramfs-6.17.0-0.rc7.56.fc43.x86_64.img
/boot/symvers-6.17.0-0.rc7.56.fc43.x86_64.xz → /lib/modules/6.17.0-0.rc7.56.fc43.x86_64/symvers.xz
/boot/System.map-6.17.0-0.rc7.56.fc43.x86_64
/boot/vmlinuz6.17.0-0.rc7.56.fc43.x86_64

Can I remove all of them?
Note: I have run the dnf distro-sync as suggested by F. Valentini but the oldest kernel files are still there (even after having restarted the system), and I get the same complain about insufficient space when I call the “updates” application. Thus I think I should do as Nancy did, i.e. removing the oldest kernel files by hand, but I want to be sure no to run into troubles.
Many thanks in advance.

Don’t remove the files manually - dnf should uninstall the oldest kernel package in the next transaction as soon as you set installonly_limit=2.

Here my updated dnf.conf:

sudo more /etc/dnf/dnf.conf
# see man dnf.conf for defaults and possible options

[main]
installonly_limit=2

Then I run dnf distro-sync, and here the bottom line:

sudo dnf distro-sync

[202/202] Total 100% | 0.0 B/s | 0.0 B | 00m02s
Running transaction
Transaction failed: Rpm transaction failed.

  • installing package kernel-core-6.17.4-300.fc43.x86_64 needs 24MB more space on the /boot filesystem

Is there something I did wrong?

Can you try sudo dnf distro-sync --exclude "kernel-core-6.17.4-300.fc43"? This should prevent the new kernel from being installed, but uninstall one old one. The next update without that exclude argument should then work. I think. :slight_smile:

If you have installed the nvidia driver and are not using the kernel nouveau driver, you can exclude the nouveau driver from being added to the initramfs. This will significantly reduce the size of the initramfs files.

see

$ find /usr/lib/firmware/nvidia/  -type f -iname \*gsp-\* -ls
 30849779  12296 -rw-r--r--   1 root     root     12589816 Oct 21 02:00 /usr/lib/firmware/nvidia/tu102/gsp/gsp-535.113.01.bin.xz
 30849780  13060 -rw-r--r--   1 root     root     13371848 Oct 21 02:00 /usr/lib/firmware/nvidia/tu102/gsp/gsp-570.144.bin.xz
 30849417  25040 -rw-r--r--   1 root     root     25639648 Oct 21 02:00 /usr/lib/firmware/nvidia/ga102/gsp/gsp-535.113.01.bin.xz
 30849418  50124 -rw-r--r--   1 root     root     51324396 Oct 21 02:00 /usr/lib/firmware/nvidia/ga102/gsp/gsp-570.144.bin.xz

Or rename the FW files that your system don’t need.

Thank you for the suggestion: unfortunately it seems I get mre troubles:
sudo dnf distro-sync --exclude “kernel-core-6.17.4-300.fc43”
Updating and loading repositories:
Fedora 43 - x86_64 - Updates 100% | 22.9 KiB/s | 13.8 KiB | 00m01s
Repositories loaded.
Failed to resolve the transaction:
Problem 1: installed package kernel-6.17.0-63.fc43.x86_64 requires kernel-modules-uname-r = 6.17.0-63.fc43.x86_64, but none of the providers can be installed

  • conflicting requests
    Problem 2: installed package kernel-core-6.17.0-63.fc43.x86_64 requires kernel-modules-core-uname-r = 6.17.0-63.fc43.x86_64, but none of the providers can be installed
  • conflicting requests
    You can try to add to command line:
    –skip-broken to skip uninstallable packages

And when I added --skip-broken the output was the same.

try sudo dnf distro-sync --exclude kernel\*

All right, thank you: now it run until the end.
I now see only two kernels in /boot:

sudo ls -lrt /boot/
total 675164
drwx------. 5 root root 4096 Jan 1 1970 efi
drwx------. 2 root root 16384 Sep 28 21:05 lost+found
drwxr-xr-x. 3 root root 4096 Sep 28 21:07 loader
-rwxr-xr-x. 1 root root 17791336 Sep 28 21:08 vmlinuz-0-rescue-95120484391c46039d51090889493500
-rw-------. 1 root root 268632326 Sep 28 21:08 initramfs-0-rescue-95120484391c46039d51090889493500.img
-rwxr-xr-x. 1 root root 17807720 Sep 29 02:00 vmlinuz-6.17.0-63.fc43.x86_64
-rw-r–r–. 1 root root 12013250 Sep 29 02:00 System.map-6.17.0-63.fc43.x86_64
-rw-r–r–. 1 root root 292921 Sep 29 02:00 config-6.17.0-63.fc43.x86_64
lrwxrwxrwx. 1 root root 45 Sep 30 21:09 symvers-6.17.0-63.fc43.x86_64.xz → /lib/modules/6.17.0-63.fc43.x86_64/symvers.xz
-rw-------. 1 root root 172328739 Sep 30 21:10 initramfs-6.17.0-63.fc43.x86_64.img
-rwxr-xr-x. 1 root root 17807720 Oct 6 02:00 vmlinuz-6.17.1-300.fc43.x86_64
-rw-r–r–. 1 root root 12017392 Oct 6 02:00 System.map-6.17.1-300.fc43.x86_64
-rw-r–r–. 1 root root 292938 Oct 6 02:00 config-6.17.1-300.fc43.x86_64
lrwxrwxrwx. 1 root root 46 Oct 10 08:01 symvers-6.17.1-300.fc43.x86_64.xz → /lib/modules/6.17.1-300.fc43.x86_64/symvers.xz
-rw-------. 1 root root 172331958 Oct 10 08:02 initramfs-6.17.1-300.fc43.x86_64.img
drwx------. 3 root root 4096 Oct 26 12:06 grub2

I guess I can try to restart the system.

1 Like

Once more, thank you both: everything worked and now I only see two kernels, the current one and the former.
Mark: I have checked and I confirm I am using the nidia driver and not the nouveau one:

inxi -G

Device-2: NVIDIA TU104M [GeForce RTX 2070 SUPER Mobile / Max-Q]
driver: nvidia v: 580.95.05

and: lsmod | grep nouveau does not return anything. I have made a search about how to exclude he nouveau driver from initramfs, and I found this:

a) Create the /usr/lib/modprobe.d/blacklist-nouveau.conf file and add the following information to the file:

blacklist nouveau

options nouveau modeset=0

b) Re-generate initramfs.

$ sudo dracut --force

The driver is already blacklisted. see /etc/default/grub

You need to tell dracut to omit the driver
man dracut.conf look for omit_drivers+