Knowledgebase
Knowledgebase
Updating Kernel No Space in boot
Posted by Will Kruss on 11 August 2016 08:14 PM

When update your kernel using yum & receive an error that there is no space in/boot, you need to remove old kernels.

If you are trying to update your kernel using yum and receive an error that there is no space in /boot then you will need to remove old kernels that are no longer in use.

First type:
uname -r

This will tell you the current kernel (do not delete that one)

Now type:
rpm -q kernel

This will list all the kernels currently installed.

For each one you want to delete type:
yum remove kernel-2.6.x-x.x.x.elx.x86_64

Alternatively run these commands to set the max kernels and update the kernel

[ ! -h /etc/grub.conf ] && mv -f /etc/grub.conf /boot/grub/grub.conf && ln -s /boot/grub/grub.conf /etc/grub.conf

yum install yum-utils -y && package-cleanup --oldkernels --count=1 -y && sed -i 's/installonly_limit=.*/installonly_limit=2/g' /etc/yum.conf && yum clean all && yum update -y

(0 vote(s))
Helpful
Not helpful