Linux基础——BClinuxEuler21.10内核降级

Linux基础——BClinuxEuler21.10内核降级

一、准备回退内核安装包

[root@harbor kernel]# ls

kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64.rpm        kernel-devel-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64.rpm

kernel-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64.rpm       kernel-tools-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64.rpm

kernel-devel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64.rpm  kernel-tools-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64.rpm

二、开始回退安装

[root@harbor kernel]# yum downgrade kernel*-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64.rpm

Last metadata expiration check: 2:04:47 ago on Tue 06 Aug 2024 02:20:59 PM CST.

Dependencies resolved.

=================================================================================================================================

 Package                   Architecture        Version                                           Repository                 Size

=================================================================================================================================

Installing:

 kernel                    x86_64              4.19.90-2107.6.0.0192.8.oe1.bclinux               @commandline               43 M

Downgrading:

 kernel-devel              x86_64              4.19.90-2107.6.0.0192.8.oe1.bclinux               @commandline               14 M

 kernel-tools              x86_64              4.19.90-2107.6.0.0192.8.oe1.bclinux               @commandline              448 k

 

Transaction Summary

=================================================================================================================================

Install    1 Package

Downgrade  2 Packages

 

Total size: 57 M

Is this ok [y/N]: y

Downloading Packages:

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

  Preparing        :                                                                                                         1/1

  Running scriptlet: kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                       1/1

  Installing       : kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                       1/5

  Running scriptlet: kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                       1/5

  Downgrading      : kernel-tools-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                 2/5

  Running scriptlet: kernel-tools-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                 2/5

  Downgrading      : kernel-devel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                 3/5

  Running scriptlet: kernel-devel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                 3/5

  Cleanup          : kernel-devel-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64                                                4/5

  Running scriptlet: kernel-tools-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64                                                5/5

  Cleanup          : kernel-tools-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64                                                5/5

  Running scriptlet: kernel-tools-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64                                                5/5

  Running scriptlet: kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                       5/5

  Running scriptlet: kernel-tools-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64                                                5/5

  Verifying        : kernel-devel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                 1/5

  Verifying        : kernel-devel-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64                                                2/5

  Verifying        : kernel-tools-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                 3/5

  Verifying        : kernel-tools-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64                                                4/5

  Verifying        : kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64                                                       5/5

 

Downgraded:

  kernel-devel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64         kernel-tools-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64

 

Installed:

  kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64

 

Complete!

三、确认回退包已安装

[root@harbor kernel]# rpm -qa | grep kernel

kernel-4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64

texlive-l3kernel-svn48022-24.oe1.noarch

kernel-tools-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64

kernel-devel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64

kernel-4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64

四、查看boot目录下的所有内核

[root@harbor kernel]# cat /boot/grub2/grub.cfg | grep "menuentry"

if [ x"${feature_menuentry_id}" = xy ]; then

  menuentry_id_option="--id"

  menuentry_id_option=""

export menuentry_id_option

menuentry 'BigCloud Enterprise Linux (4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64) 21.10 (LTS-SP2)' --class bigcloud --class gnu-l                        inux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.19.90-2107.6.0.0227.28.oe1.bclinux.x86_64-advanced-16                        24fa73-8ed0-4870-bfc6-d98748252a89' {

menuentry 'BigCloud Enterprise Linux (4.19.90-2107.6.0.0251.43.oe1.bclinux.x86_64) 21.10 (LTS-SP2)' --class bigcloud --class gnu-                        linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.19.90-2107.6.0.0227.28.oe1.bclinux.x86_64-advanced-1                        624fa73-8ed0-4870-bfc6-d98748252a89' {

menuentry 'BigCloud Enterprise Linux (0-rescue-d24f36113bef4feb89c6b7fe93b524d4) 21.10 (LTS-SP2)' --class bigcloud --class gnu-li                        nux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-d24f36113bef4feb89c6b7fe93b524d4-advanced-1624f                        a73-8ed0-4870-bfc6-d98748252a89' {

五、设置默认内核

[root@harbor kernel]# grub2-set-default "BigCloud Enterprise Linux (4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64) 21.10 (LTS-SP2)""                        > ^C

[root@harbor kernel]# grub2-set-default "BigCloud Enterprise Linux (4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64) 21.10 (LTS-SP2)"

六、确认设置默认是否成功

[root@harbor kernel]# grub2-editenv list

saved_entry=BigCloud Enterprise Linux (4.19.90-2107.6.0.0192.8.oe1.bclinux.x86_64) 21.10 (LTS-SP2)

boot_success=0

boot_indeterminate=0

七、重启应用回退内核

[root@harbor kernel]# reboot

posted on 2024-08-07 10:03  gkhost  阅读(114)  评论(0编辑  收藏  举报

导航