Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of insufficient space in / boot partition when CentOS system installs kernel

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to solve the problem of insufficient space of / boot partition prompted when installing kernel in CentOS system". In daily operation, I believe many people have doubts about how to solve the problem of insufficient space of / boot partition when installing kernel in CentOS system. The editor consulted all kinds of materials and sorted out simple and useful operation methods. I hope it will be helpful for you to answer the question of "how to solve the problem of insufficient space in / boot partition when installing kernel in CentOS system"! Next, please follow the editor to study!

Log in to the server today, ready to use yum to install a software, habitually yum update it first, and end up with the following error:

The code is as follows:

...

Transaction check error:

Installing package kernel-3.10.0-327.4.5.el7.x86_64 needs 20MB on the / boot filesystem

Error Summary

-

Disk Requirements:

At least 20MB more space needed on the / boot filesystem.

The prompt is to install a new Linux kernel package, but the / boot file system does not have enough space for 20MB. So the update failed.

All right, let's see how much space there is under / boot.

The code is as follows:

> df-H / boot

Filesystem Size Used Avail Use% Mounted on

/ dev/sda1 247M 237M 10m 96% / boot

Well, there's only 10m left, and computers don't lie. What to do, the / boot file system is very important, otherwise the system will hang up. I don't want this to happen. Tomorrow is Saturday.

After searching on the Internet, we can try to delete the old kernel package to clean up the space. (article address)

Let's see if there are any old kernel packages:

The code is as follows:

> rpm-qa | grep kernel

Kernel-3.10.0-229.14.1.el7.x86_64

Kernel-3.10.0-229.11.1.el7.x86_64

Kernel-devel-3.10.0-229.11.1.el7.x86_64

Kernel-3.10.0-327.4.4.el7.x86_64

Kernel-devel-3.10.0-327.4.4.el7.x86_64

Kernel-devel-3.10.0-229.14.1.el7.x86_64

Kernel-headers-3.10.0-327.4.4.el7.x86_64

Kernel-3.10.0-229.el7.x86_64

Kernel-tools-libs-3.10.0-327.4.4.el7.x86_64

Kernel-tools-3.10.0-327.4.4.el7.x86_64

Well, yes, that's good. But before I start, I have to make sure which one is used in the current system. It's not good to delete it incorrectly.

The code is as follows:

> uname-a

Linux... 3.10.0-229.14.1.el7.x86_64 # 1... GNU/Linux

It seems that all I have to do is not to move 3.10.0-229.14.1. I decided to delete the version 3.10.0-229.11.1.

The code is as follows:

> sudo rpm-e kernel-3.10.0-229.11.1.el7.x86_64 kernel-devel-3.10.0-229.11.1.el7.x86_64

Then take a look at the available size of the / boot file system.

The code is as follows:

> df-H / boot

Filesystem Size Used Avail Use% Mounted on

/ dev/sda1 247M 190M 57M 78% / boot

It's 57m, that's enough. Execute sudo yum update again and update the new kernel package successfully.

At this point, the study on "how to solve the problem of insufficient space in the / boot partition prompted by the kernel installation of the CentOS system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report