If you receive a notification with the subject DISKCRITICAL blocks: Mount Point “/boot”, it is likely that your CentOS operating system is retaining more kernel versions than necessary.
What is the kernel?
According to Wikipedia: "The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel."
In simpler terms, the kernel is the core component that facilitates communication between your hardware (CPU, memory, hard drive, etc.) and the software you use. It is essential for your computer or server to function correctly.
By default, CentOS retains the last 5 versions of the kernel. The error message you received is most likely due to this limit causing your /boot partition to reach capacity. Fortunately, there is an easy fix.
How to Limit the Number of Old Kernels
- Install the
yum-utilspackage:yum install yum-utils - Remove old kernels, keeping only the latest two:
package-cleanup --oldkernels --count=2 - Make this change permanent by editing
/etc/yum.confand settinginstallonly_limit:installonly_limit=2
You're all set! CentOS will now keep only the current kernel and the previous two versions, allowing you to roll back if needed while preventing your /boot partition from filling up.