Centos7は役に立たないカーネルを削除します

通常、起動項目は2つあり、1つは「通常起動」、もう1つは「レスキューモード起動」(レスキュー)です。
起動項目が3つ以上ある場合は、現在のシステムに削除されていない古いカーネルがあることを意味します。その理由は、CentOSが更新された後、古いカーネルが自動的に削除されないためです。
デフォルトでは、新しいカーネルから開始します。これは、起動オプションで一時的に選択できます。または、構成を変更して永続的に指定することもできます。

[ root@controller ~]# uname -r     #現在のカーネルを表示
3.10.0- 862.3.2. el7.x86_64
[ root@controller ~]# grub2-editenv list       #デフォルトのカーネルは最新バージョンです
saved_entry=CentOS Linux(3.10.0-862.3.2.el7.x86_64)7(Core)[root@controller ~]# rpm -qa |grep kernel-[0-9]
kernel-3.10.0-862.3.2.el7.x86_64
kernel-3.10.0-862.el7.x86_64
erlang-kernel-19.3.6.4-1.el7.x86_64
[ root@controller ~]# cat /boot/grub2/grub.cfg |grep "menuentry "
menuentry 'CentOS Linux (3.10.0-862.3.2.el7.x86_64) 7 (Core)'--classcentos--classgnu-linux --classgnu--classos--unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.el7.x86_64-advanced-2e7f2bc7-8c8f-47f7-905d-5d65331a89be'{
menuentry 'CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)'--classcentos--classgnu-linux --classgnu--classos--unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.el7.x86_64-advanced-2e7f2bc7-8c8f-47f7-905d-5d65331a89be'{
menuentry 'CentOS Linux (0-rescue-806e7521af0743a9a4414ff917f6c852) 7 (Core)'--classcentos--classgnu-linux --classgnu--classos--unrestricted $menuentry_id_option 'gnulinux-0-rescue-806e7521af0743a9a4414ff917f6c852-advanced-2e7f2bc7-8c8f-47f7-905d-5d65331a89be'{[root@controller ~]# yum remove kernel-3.10.0-862.el7.x86_64   #古いカーネルを削除する
またはrpm-e kernel-3.10.0-862.el7.x86_64

試験:

[ root@controller ~]# rpm -qa |grep kernel-[0-9]
kernel-3.10.0-862.3.2.el7.x86_64
erlang-kernel-19.3.6.4-1.el7.x86_64
[ root@controller ~]# grep menu /boot/grub2/grub.cfg

この記事のアドレス: [https://www.zwblog.cn/post/81.html](https://www.zwblog.cn/post/81.html)**著作権ステートメント:**この記事は元の記事であり、著作権は[herve](https://www.zwblog.cn/author-1.html)に帰属します。この記事を共有することを歓迎します。再印刷のソースを保管してください!

Recommended Posts

Centos7は役に立たないカーネルを削除します
Centosは冗長カーネルを削除します
Centos7アップグレードカーネル
CentOS7.5-1804システムカーネルのアップグレード
Centosカーネルコンパイル構成
CentOS6.5はカーネルを3.10.28にアップグレードします
Centosカーネルバージョンのアップグレード
Centosでカーネルパニックをデバッグする
CentOS 8(2)
Centosカーネルアップグレードの3つの方法
Linux:Centos7は元のカーネルをアップグレードします
CentOS 8(1)
セントス7カーネルのアップグレード事故を覚えておいてください
LinuxカーネルのコンパイルとCentOSシステムのインストール