云计算运维

Windows Server 2003 - Windows Server 2019 系统工具,Linux系统脚本,Mysql、Nginx、PHP、Redis、K8S、Seafile、Weblogic 、Jenkins、DNS、DHCP、FTP、IIS、Zookeeper、Rabbitmq、Oracle、Tomcat、Mavrn等服务搭建维护,请关注我.

CentOS7修改默认启动内核


查看可用内核

# grep "menuentry" /boot/grub2/grub.cfg 

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
  menuentry_id_option=""
export menuentry_id_option
menuentry 'CentOS Linux (5.4.123-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-5.4.123-1.el7.elrepo.x86_64-advanced-21730aff-e265-4713-9973-d43721b73cb4' {
menuentry 'CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1160.el7.x86_64-advanced-21730aff-e265-4713-9973-d43721b73cb4' {
menuentry 'CentOS Linux (0-rescue-577567423019484e9466d9570b6fbb17) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-577567423019484e9466d9570b6fbb17-advanced-21730aff-e265-4713-9973-d43721b73cb4' {

查看当前内核

# uname -r
5.4.123-1.el7.elrepo.x86_64

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

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

查看内核修改结果

# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core)

  • 分享:
评论
还没有评论
    发表评论 说点什么