zoukankan      html  css  js  c++  java
  • CENTOS 7更换系统启动默认内核

    本文不再更新,可能存在内容过时的情况,实时更新请移步原文地址:CENTOS 7更换系统启动默认内核

    环境:

    • CentOS Linux release 7.6.1810 (Core) ;

    1.查看当前默认启动内核

    [inspur@localhost ~]$ grub2-editenv list
    grub2-editenv: error: cannot open `/boot/grub2/grubenv.new': Permission denied.
    [inspur@localhost ~]$ sudo grub2-editenv list
    [sudo] password for inspur: 
    saved_entry=CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core)
    [inspur@localhost ~]$ 
    
    1. 查看所有内核
    [inspur@localhost ~]$ sudo 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-957.21.3.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.el7.x86_64-advanced-1ef88ad8-4275-4ceb-9d7f-80abefd6a4c2' {
    menuentry 'CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.el7.x86_64-advanced-1ef88ad8-4275-4ceb-9d7f-80abefd6a4c2' {
    menuentry 'CentOS Linux (0-rescue-396035e748534ed49bfde6ab589c7cbe) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-396035e748534ed49bfde6ab589c7cbe-advanced-1ef88ad8-4275-4ceb-9d7f-80abefd6a4c2' {
    [inspur@localhost ~]$ 
    

    3.设置新的启动内核

    [inspur@localhost ~]$ sudo grub2-set-default 'CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)'
    [inspur@localhost ~]$ 
    

    4.验证启动内核

    [inspur@localhost ~]$ sudo grub2-editenv list
    saved_entry=CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)
    [inspur@localhost ~]$ 
    

    本文不再更新,可能存在内容过时的情况,实时更新请移步原文地址:CENTOS 7更换系统启动默认内核

  • 相关阅读:
    Python爬虫-- BeautifulSoup库
    Python爬虫--Requests库
    Python爬虫--Urllib库
    Python爬虫--初识爬虫
    性能测试--十个命令迅速发现性能问题
    性能测试--测试流程、APDEX、linux性能知识
    性能测试--Jmeter的Non GUI模式、集群
    Python使用Timer实现验证码功能
    Python 之Event
    Python信号量
  • 原文地址:https://www.cnblogs.com/cobcmw/p/11387801.html
Copyright © 2011-2022 走看看