Fedora Annoyance: Needs XX MB on the /boot filesystem

By | August 30, 2013

I originally wrote this post in January 2012 on the old version of my website. I am re-posting it here in case anyone might still find it useful.

“This post is quite a bit different from my other posts thus far on this blog (which have been about Android programming), but I decided to include it because I find this problem pretty irritating, and I think that yum should have some sort of option to deal with it automatically.

Fedora is known for keeping its packages very up to date. Though this is great for security and functionality, constant kernel updates can become irritating when one’s /boot partition fills up. Sometimes, you might see yum spit out the following error during an update:

Transaction Check Error:
installing package kernel-3.1.0-7.fc16.x86_64 needs 9MB on the /boot filesystem

Error Summary
Disk Requirements:
At least 9MB more space needed on the /boot filesystem.

This means that your update has failed because you have run out of space to install the new kernel. (It is important to note that Fedora doesn’t just replace old kernels, it keeps them so that you can boot into them should the new kernel give you any trouble. This is why GRUB (or whatever bootloader you use) will show a few kernels after you’ve updated a few times.)

Though / or /home might have a tremendous amount of free space, kernels are installed to the /boot filesystem. Since /boot is (almost) always on its own partition, the amount of space on / or /home is irrelevant: when /boot is full, you won’t be able to update to a new kernel and your yum update will error out. The solution to this problem is simple: remove old, unused kernels from /boot to make room for new kernels.

First, check which version kernel you are currently running. At the command prompt, type:
uname -r

You should see something like this:

The output from uname (uname is a utility to print system information; the -r flag tells uname to print the kernel release that you are running) says that I have the Fedora 16 package of the 3.1.7-1 version of the Linux kernel, compiled for x86_64 processors, installed.

Next, check which kernel versions you currently have installed. At the command prompt, type:
rpm -q kernel

You should see something like this:

The output from rpm (RPM is a package manager; the -q flag queries the package manager for whatever term immediately follows the -q flag) says that three “kernel” packages are installed: 3.1.4, 3.1.6, and 3.1.7. The only thing left to do is to remove one of the kernels to make room for the new one.

It is very important to note that the previous command listed the kernel which uname told us was currently running. We do not want to remove that kernel. Generally, I would recommend removing the oldest kernel version that you have. To do so, simply type the following at the command prompt:

yum remove kernel-version.that.you.found.above
(kernel-version.that.you.found.above, of course, will be something like kernel-3.1.4-1.fc16.x86_64)

You can check to see that you removed the kernel version by querying rpm for “kernel” again.

Now, simply update (ie type in “yum update” at the command prompt) and your new kernel version will install because you have freed up space for it on /boot.

I have personally used this solution on both Fedora 15 and Fedora 16, and I cannot think of a reason why it would not work on other versions of Fedora.”

Leave a Reply

Your email address will not be published. Required fields are marked *