Get the App
SLTechnology News&Howtos  ›  Servers  › 

The solution of insufficient centos7 boot space

Shulou Source: shulou.com Published: 2022-06-02 06:50:47 09月28日 Update

The solution of insufficient centos7 boot space

Reference:

Https://blog.csdn.net/wangganggelian/article/details/49848305

Native environment: centos7.4 x64

This solution uses the second method, which is feasible after testing.

Boot directory I believe that the home will not be unfamiliar, the general system will have a boot directory, it is mainly to store some system kernel configuration files, as well as startup management program GRUB directory.

1. Clean up the old kernel:

First of all, we need to check the kernel version: uname-r or uname-an is fine, as follows

[wanggang@localhost] $uname-a

Linux localhost.localdomain 3.10.0-229.20.1.el7.x86_64 # 1 SMP Tue Nov 3 19:10:07 UTC 2015 x86 "64 GNU/Linux

[wanggang@localhost] $uname-r

3.10.0-229.20.1.el7.x86_64

To check other versions of the system, use two commands: rpm-Q kernel or in rpm-qa | grep kernel to view the kernel that exists in the system.

[root@localhost wanggang] # rpm-qa | grep kernel

Kernel-devel-3.10.0-229.14.1.el7.x86_64

Kernel-tools-3.10.0-229.20.1.el7.x86_64

Kernel-devel-3.10.0-229.el7.x86_64

Kernel-3.10.0-229.20.1.el7.x86_64

Kernel-devel-3.10.0-229.20.1.el7.x86_64

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

Kernel-headers-3.10.0-229.20.1.el7.x86_64

Abrt-addon-kerneloops-2.1.11-22.el7.centos.0.1.x86_64

[root@localhost wanggang] # rpm-Q kernel

Kernel-3.10.0-229.20.1.el7.x86_64

Since only kernel-3.10.0-229.20.1.el7.x86_64 is used, the rest can be removed.

Then uninstall the unnecessary kernel using the following yum or in the rpm command:

Yum remove kernel-3.10.0-229.14.1.el7

Or at rpm-e kernel-3.10.0-229.14.1.el7.x86_64

Restart the system to view

Remove boot and add a new boot directory.

A. Umount / boot

B. Mkdir / boot_old

C. Mount / dev/sda1 / boot_old

c. To / boot_old directory: cp-rp * / boot

e. Delete / etc/fstab table contains / boot entry

f. Restart the system to check.

The way to do this is to unmount / boot on sda1 and use the / boot directory directly, but you need to copy the files that were originally on / dev/sda1 to / boot.

Tags: Directory system kernel command file method version not enough scheme space solution feasible unfamiliar two copy environment program but F. native Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia Shulou Tech Info Huawei Microsoft