如何在Oracle Linux中将内核版本从6.8降级到6.7

时间:2016-10-17 08:35:32

标签: linux linux-kernel

Oracle Linux 6.7意外升级到6.8。需要将其降级到6.7。 我们如何编辑menu.lst以将其更改为从旧内核启动?而不使用yum降级 以下是最近的一些产出,

[root@******cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_lkkddb02-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server Unbreakable Enterprise Kernel (3.8.13-118.13.2.el6uek.x86_64)
root (hd0,0)
kernel /vmlinuz-3.8.13-118.13.2.el6uek.x86_64 ro root=/dev/mapper/vg_lkkddb02-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_lkkddb02/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=256M rd_LVM_LV=vg_lkkddb02/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-3.8.13-118.13.2.el6uek.x86_64.img
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-642.6.1.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-642.6.1.el6.x86_64 ro root=/dev/mapper/vg_lkkddb02-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_lkkddb02/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=256M rd_LVM_LV=vg_lkkddb02/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-642.6.1.el6.x86_64.img
title Oracle Linux Server Unbreakable Enterprise Kernel (3.8.13-68.3.4.el6uek.x86_64)
root (hd0,0)
kernel /vmlinuz-3.8.13-68.3.4.el6uek.x86_64 ro root=/dev/mapper/vg_lkkddb02-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_lkkddb02/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=256M rd_LVM_LV=vg_lkkddb02/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-3.8.13-68.3.4.el6uek.x86_64.img
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-573.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root=/dev/mapper/vg_lkkddb02-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_lkkddb02/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_lkkddb02/lv_swap KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-573.el6.x86_64.img

[root@*******~]# cat /proc/cmdline
ro root=/dev/mapper/vg_lkkddb02-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=vg_lkkddb02/lv_root SYSFONT=latarcyrheb-sun16 crashkernel=256M rd_LVM_LV=vg_lkkddb02/lv_swap  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet

[root@******~]# uname -a
Linux lkkddb02.cclk.lk 3.8.13-118.13.2.el6uek.x86_64 #2 SMP Wed Oct 5 11:04:20 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@*******~]# cat /etc/oracle-release
Oracle Linux Server release 6.8

[root@*******~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)

1 个答案:

答案 0 :(得分:2)

我能够通过以下步骤来解决这个问题,

  • 只需更改menu.lst文件中的默认值即可从较旧的内核启动
  • 使用以下步骤
  • 能够降低操作系统版本的旧版本
 [root@test-db ~]# yum history
    Loaded plugins: refresh-packagekit, security, ulninfo
    ID     | Login user               | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
     5 | root <root>              | 2016-10-17 21:29 | I, O, U        |  400 EE
     4 | root <root>                | 2016-10-17 20:49 | I, O, U        |   58
     3 | root <root>                | 2016-10-17 20:44 | D, E, I        |  458 EE
     2 | root <root>                | 2016-10-17 17:10 | I, O, U        |  458 EE
     1 | System <unset>           | 2016-10-17 11:54 | Install        | 1145
history list
     

[root@test-db ~]# yum history undo 5