黑白格子

  • 首页
  • 所有文章
  • 文章分类
  • 关于页面
  • 友链

  • 搜索
工具 随笔 脚本 Shell MAC IE SSL iptables 网络 k8s docker ubuntu web 镜像 Nginx Linux Windows cloud-init

CentOS7修改默认启动内核

发表于 2020-05-14 | 分类于 Linux | 0 | 阅读次数 527
查看当前启动内核
root@BJ-CentOS7 ~ # uname -sr
Linux 3.10.0-957.21.3.el7.x86_64
查看当前默认启动内核
root@BJ-CentOS7 ~ # grub2-editenv list
saved_entry=CentOS Linux (3.10.0-693.el7.centos.toa.x86_64) 7 (Core)
确认系统内当前已安装内核版本
root@BJ-CentOS7 ~ # cat /boot/grub2/grub.cfg | grep -v rescue | grep ^menuentry
menuentry 'CentOS Linux, with Linux 3.10.0-957.21.3.el7.x86_64' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.21.3.el7.x86_64-advanced-244b1cf5-bcde-47c5-9a90-055dcee38030' {
menuentry 'CentOS Linux, with Linux 3.10.0-693.el7.centos.toa.x86_64' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-693.el7.centos.toa.x86_64-advanced-244b1cf5-bcde-47c5-9a90-055dcee38030' {
menuentry 'CentOS Linux, with Linux 3.10.0-123.el7.x86_64' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.el7.x86_64-advanced-244b1cf5-bcde-47c5-9a90-055dcee38030' {
root@BJ-CentOS7 ~ # rpm -qa kernel
kernel-3.10.0-123.el7.x86_64
kernel-3.10.0-693.el7.centos.toa.x86_64
kernel-3.10.0-957.21.3.el7.x86_64
设置默认启动内核

修改默认启动内核后,重启机器即可以修改后的内核加载系统

root@BJ-CentOS7 ~ # grub2-set-default 'CentOS Linux (3.10.0-693.el7.centos.toa.x86_64) 7 (Core)'
root@BJ-CentOS7 ~ # grub2-editenv list
saved_entry=CentOS Linux (3.10.0-693.el7.centos.toa.x86_64) 7 (Core)
root@BJ-CentOS7 ~ # grub2-set-default 'CentOS Linux (3.10.0-957.21.3.el7.x86_64^C7 (Core)'
root@BJ-CentOS7 ~ # grub2-editenv list
saved_entry=CentOS Linux (3.10.0-957.21.3.el7.x86_64^C7 (Core)
  • 本文作者: 黑白格子
  • 本文链接: https://www.clhuang.cn/?p=16
  • 版权声明: 本博客所有文章除特别声明外,均采用CC BY-NC-SA 4.0 许可协议。转载请注明出处!
# Linux
记几个Curl工具使用技巧
eclipse安装配置及汉化
黑白格子

黑白格子

56 日志
11 分类
18 标签
Creative Commons
0%
© 2023 黑白格子
主题 - NexT.Mist
网站已稳定运行:
陕ICP备2023008476号