Hi all, me again. I recently did an update that included kernel updates. Upon booting into Rocky Linux I received a warning that my ‘/boot’ partition was nearly full.
by ‘/boot’ is a 1.1 GB XFS partition and its filling up with something, I suspect some vestigial files from previous versions of Rocky Linux?
Is there some advice about how to update then run maintenance to remove vestigial files?
Could it be a solution to extend the XFS partition mounted at /boot to be larger? Like 5GB for example? - However I think the best solution is for me to actually understand the fundamentals of whats going on. Like I highly suspect the /boot partition of being filled with some kind of vestigial data from previous versions of Rocky.
There is a max of three kernels installed for Rocky Linux. When a fourth gets installed for an update, the oldest of the original three are removed. If your /boot partition is being filled up, check du like below to try to determine where the issue is.
Kernel is a package that there can be more than one version simultaneously installed.
Consider following: You are running kernel version X. You install version Y. If Y would replace files of X, then you would still have version X in memory, but not in files. After reboot, you would then run Y – if the install was successful. If there is an issue in the install, then you have no kernel at all. With current system the X is kept, so you can still boot with known-to-work X and fix install of Y.
There is installonly_limit in /etc/dnf/dnf.conf. It could be decreased to 2 to keep only two kernels. However, three should fit fine.
One can get a neat summary of disk usage with:
sudo du -d 1 -hx /boot
The ‘x’ limits search to one filesystem – does not add the /boot/efi that is different filesystem into the total.
The number after ‘d’ tells much details to show before total.
Note how most of the space is used by the initramfs images. Note also that you have 7 of them. That is as expected.
There is one for each installed kernel. That is three
There is one “rescue” and corresponding vmlinuz-0-rescue-* (and file in /boot/loader/entries/). Package dracut-config-rescue makes a copy of vmlinuz and generates a special initramfs in some conditions. This kernel is one more safety measure for situations, where none of the regular kernels can boot
There are three “kdump” images, one for each kernel (except the rescue copy). On certain crash situations the machine reboots with that image in order to debug the crash. If that (kdump service) is disabled, then install of new kernels will no longer generate the additional “kdump.img”
[EDIT] Note: lsblk -f shows filesystem type and remaining free space.