I’ve had this problem before and it was solved here
Now I have upgraded to F40, and the problem has reappeared. Then the reason was having debug kernels installed, but this is not the case now - I’ve checked. The size of my /boot partition is 1.1G. I have many large files in /boot, see below:
You seem to have configured timeshift to write to /boot. That directory probably is what is filling the file system. Timeshift probably should have a different location to save the images.
You also have a ton of vmlinuz images for fc38 (some are debug kernels) that seem obsolete and should be removed. Apparently because the names of those images are not stock fedora kernel names they were left behind during upgrades.
Additionally the rescue image is from 2021 and probably will not boot with the current libraries. It probably should be recreated. Instructions for that are in the solution here.
For some reason you have installed the kernel-uki-virt and/or the kernel-debug-uki-virt. It is a known problem that when installing a new version the old version is not properly removed.
I would recommend to remove the kernel-uki-virt packages and also delete the vmlinuz-virt.efi files.
The kernel-uki-virt packages are only provided as a test on some specific virtual machine, and should generally not be installed.
If the packages noted by Villy have been removed and are no longer installed then those files can be removed with sudo rm /boot/vmlinuz-virt.efi* It should ask for confirmation for each file to be removed so you can verify what it is doing.
The same command would also take care of the timeshift directory and content when structured as sudo rm -r /boot/timeshift
Use both at your own risk but I think they are safe for your needs since both require individual confirmation for each file being removed.
This seems to show you got a bit aggressive in deleting files
You should still have vmlinuz, symvers, config, initramfs, and System.map file for each of the 3 installed kernels. It appears you manually deleted most of those for the 6.9.11 & 6.9.12 kernels which is not a good thing since now those older kernels cannot boot. They also cannot be easily reinstalled since they are no longer available in the updates repo. You may be able to get the rpms from the koji.fedoraproject.org repo if you wish to do so.
At present, from that file list, it appears that you only have the 6.10.3 kernel and the rescue image as bootable options.
You may be able to recover those files by running sudo kernel-install with appropriate options but I have never tried it.
I only suggested removal of the extra vmlinuz-virt.efi files which would not have affected booting from any of the currently installed kernels.
I see what you mean, but I only removed by hand the files with f38 in them - I ran exactly the command you suggested (<rm vmlinuz-virt.efi*/>) and looked before responding ‘y’ to each. I’ll have to take my chances and hope things work ok.
I am not sure what happened but above is the file list from your original post, and I expected it to look like below after the deletions. (but with the changed rescue images)
Yes, I completely see what you mean. Something happened in the process of reassigning the rescue core.
I searched at koji.fedoraproject.org, I couldn’t find the kernels I’m missing but - no worries, I’ll hope the present kernel works until new versions are issued and I’m back to three.
Does the file below look ok?
more /etc/dnf/dnf.conf
# see `man dnf.conf` for defaults and possible options
[main]
gpgcheck=True
installonly_limit=4
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
The default is installonly_limit=3 but otherwise that looks perfectly normal.
That can be set to whatever you consider reasonable but should never be less than 2 (the currently booted kernel and the newly installed one makes 2 so that is absolute minimum)
The only other command I ran (apart from moving the initramfs and vmlinuz files for the rescue core to my home directory) was: dnf reinstall kernel kernel-core
So this is probably what removed the files that are missing, I am not sure.
sudo kernel-install add-all will rebuild all the initrd’s and reinstall all the vllinuz files from where they are safely stored in /usr/lib/modules directory. This is a new feature in Fedora 40.