2023년 12월 14일 목요일

[Linux]_Boot 파티션 용량 full 해결법(Rocky linux)

  [ 출처 :  https://www.centlinux.com/ ]

 

리눅스는 기본적으로 과거 커널을 5개까지 보관하고 있는데 이로 인하여 /Boot 파티션 용량이 full이 되면서 업데이트가 되지 않는 경우가 발생함.

# cat /etc/yum.conf  <--아래 보관횟수 확인 가능

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False

# rpm -q kernel  <--설치된 kernel 확인
kernel-5.14.0-162.6.1.el9_1.0.1.x86_64
kernel-5.14.0-284.25.1.el9_2.x86_64
kernel-5.14.0-284.30.1.el9_2.x86_64

# grubby --default-kernel  <-- 사용중인 kernel 확인
/boot/vmlinuz-5.14.0-284.30.1.el9_2.x86_64

* 과거 커널을 삭제 하는 방법

# dnf -y remove --oldinstallonly --setopt installonly_limit=2 kernel
Dependencies resolved.
==============================================================================================================================================================================================
 Package                                           Architecture                         Version                                                Repository                                Size
==============================================================================================================================================================================================
Removing:
 kernel                                            x86_64                               5.14.0-162.6.1.el9_1.0.1                               @anaconda                                  0
 kernel                                            x86_64                               5.14.0-284.25.1.el9_2                                  @baseos                                    0
 kernel-core                                       x86_64                               5.14.0-162.6.1.el9_1.0.1                               @anaconda                                 84 M
 kernel-core                                       x86_64                               5.14.0-284.25.1.el9_2                                  @baseos                                   56 M
 kernel-devel                                      x86_64                               5.14.0-162.6.1.el9_1.0.1                               @AppStream                                60 M
 kernel-devel                                      x86_64                               5.14.0-284.25.1.el9_2                                  @appstream                                63 M
 kernel-modules                                    x86_64                               5.14.0-162.6.1.el9_1.0.1                               @anaconda                                 31 M
 kernel-modules                                    x86_64                               5.14.0-284.25.1.el9_2                                  @baseos                                   33 M
 kernel-modules-core                               x86_64                               5.14.0-284.25.1.el9_2                                  @baseos                                   31 M

Transaction Summary
==============================================================================================================================================================================================
Remove  9 Packages

Freed space: 357 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                      1/1
  Erasing          : kernel-5.14.0-284.25.1.el9_2.x86_64                                                                                                                                  1/9
  Running scriptlet: kernel-5.14.0-284.25.1.el9_2.x86_64                                                                                                                                  1/9
  Erasing          : kernel-modules-5.14.0-284.25.1.el9_2.x86_64                                                                                                                          2/9
  Running scriptlet: kernel-modules-5.14.0-284.25.1.el9_2.x86_64                                                                                                                          2/9
  Erasing          : kernel-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                               3/9
  Running scriptlet: kernel-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                               3/9
  Erasing          : kernel-modules-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                       4/9
  Running scriptlet: kernel-modules-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                       4/9
  Erasing          : kernel-modules-core-5.14.0-284.25.1.el9_2.x86_64                                                                                                                     5/9
  Running scriptlet: kernel-modules-core-5.14.0-284.25.1.el9_2.x86_64                                                                                                                     5/9
  Running scriptlet: kernel-core-5.14.0-284.25.1.el9_2.x86_64                                                                                                                             6/9
  Erasing          : kernel-core-5.14.0-284.25.1.el9_2.x86_64                                                                                                                             6/9
warning: file /lib/modules/5.14.0-284.25.1.el9_2.x86_64/modules.builtin.modinfo: remove failed: No such file or directory
warning: file /lib/modules/5.14.0-284.25.1.el9_2.x86_64/modules.builtin: remove failed: No such file or directory

  Running scriptlet: kernel-core-5.14.0-284.25.1.el9_2.x86_64                                                                                                                             6/9
  Running scriptlet: kernel-core-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                          7/9
  Erasing          : kernel-core-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                          7/9
  Running scriptlet: kernel-core-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                          7/9
  Erasing          : kernel-devel-5.14.0-284.25.1.el9_2.x86_64                                                                                                                            8/9
  Erasing          : kernel-devel-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                         9/9
  Running scriptlet: kernel-devel-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                         9/9
  Verifying        : kernel-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                               1/9
  Verifying        : kernel-5.14.0-284.25.1.el9_2.x86_64                                                                                                                                  2/9
  Verifying        : kernel-core-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                          3/9
  Verifying        : kernel-core-5.14.0-284.25.1.el9_2.x86_64                                                                                                                             4/9
  Verifying        : kernel-devel-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                         5/9
  Verifying        : kernel-devel-5.14.0-284.25.1.el9_2.x86_64                                                                                                                            6/9
  Verifying        : kernel-modules-5.14.0-162.6.1.el9_1.0.1.x86_64                                                                                                                       7/9
  Verifying        : kernel-modules-5.14.0-284.25.1.el9_2.x86_64                                                                                                                          8/9
  Verifying        : kernel-modules-core-5.14.0-284.25.1.el9_2.x86_64                                                                                                                     9/9

Removed:
  kernel-5.14.0-162.6.1.el9_1.0.1.x86_64            kernel-5.14.0-284.25.1.el9_2.x86_64        kernel-core-5.14.0-162.6.1.el9_1.0.1.x86_64     kernel-core-5.14.0-284.25.1.el9_2.x86_64
  kernel-devel-5.14.0-162.6.1.el9_1.0.1.x86_64      kernel-devel-5.14.0-284.25.1.el9_2.x86_64  kernel-modules-5.14.0-162.6.1.el9_1.0.1.x86_64  kernel-modules-5.14.0-284.25.1.el9_2.x86_64
  kernel-modules-core-5.14.0-284.25.1.el9_2.x86_64

Complete!

 

Centos는 아래 링크 참조

https://www.runit.cloud/

 

댓글 없음:

댓글 쓰기