zoukankan      html  css  js  c++  java
  • 【kernel】Centos 云上升级内核失败 如何处理【笔记记录转】

    Centos7选定默认启动的内核版本

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
    本文链接:https://blog.csdn.net/lemontree1945/article/details/98172888

    #使用cat /boot/grub2/grub.cfg |grep menuentry  查看系统可用内核

    [root@bigapp-slave27 ~]# 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 'CentOS Linux (3.10.0-514.16.1.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347' {

    menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347' {

    menuentry 'CentOS Linux (0-rescue-d57307c454c0437d91c309347178cdf5) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-d57307c454c0437d91c309347178cdf5-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347' {

    #查看当前内核

    [root@bigapp-slave27 ~]# uname -r

    3.10.0-514.16.1.el7.x86_64

    #修改开机时默认使用的内核

    grub2-set-default 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)'

    #查看内核修改结果

    [root@bigapp-slave27 ~]# grub2-editenv list

    saved_entry=CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)

    #查看系统安装了哪些内核包

    [root@bigapp-slave27 ~]# rpm -qa |grep kernel

    kernel-3.10.0-327.el7.x86_64

    kernel-headers-3.10.0-514.6.1.el7.x86_64

    kernel-tools-libs-3.10.0-327.el7.x86_64

    kernel-3.10.0-514.16.1.el7.x86_64

    kernel-tools-3.10.0-327.el7.x86_64

    #使用yum remove 或rpm -e 删除无用内核

    yum remove kernel-3.10.0-327.el7.x86_64

  • 相关阅读:
    七牛图片上传JSSDK
    2015年12月中国航空公司名录
    HTML5 开发框架
    利用HTML5定位功能,实现在百度地图上定位
    openerp7 时区问题
    AS3使用Json 传复杂数据 -------- 用数组而不是向量
    随便写写
    生产环境该如何选择lvs的工作模式,和哪一种算法
    获取Linux权限后安装rootkit
    IT求职经验分享
  • 原文地址:https://www.cnblogs.com/oscarli/p/11991386.html
Copyright © 2011-2022 走看看