-
查看当前默认启动内核
[root@centOS7 client]# grub2-editenv listsaved_entry=CentOS Linux (3.10.0-1160.36.2.el7.x86_64) 7 (Core)
[root@centOS7 client]# -
罗列所有内核
[root@centOS7 client]# cat /boot/grub2/grub.cfg | grep menuentryif [ x${feature_menuentry_id} = xy ]; thenmenuentry_id_option=–idmenuentry_id_option=export menuentry_id_optionmenuentry ‘CentOS Linux (3.10.0-1160.36.2.el7.x86_64) 7 (Core)’ --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentr_id_option ‘gnulinux-3.10.0-1062.el7.x86_64-advanced-8f9975e4-1e74-43c1-90c7-fa52d245834e’ {menuentry ‘CentOS Linux (3.10.0-1062.12.1.el7.x86_64) 7 (Core)’ --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentr_id_option ‘gnulinux-3.10.0-1062.el7.x86_64-advanced-8f9975e4-1e74-43c1-90c7-fa52d245834e’ {menuentry ‘CentOS Linux (0-rescue-1e70e236cf034db09caee96c18007260) 7 (Core)’ --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option ‘gnulinux-0-rescue-1e70e236cf034db09caee96c18007260-advanced-8f9975e4-1e74-43c1-90c7-fa52d245834e’ {
[root@centOS7 client]# -
设置默认启动内核
[root@centOS7 client]# grub2-set-default ‘CentOS Linux (3.10.0-1062.12.1.el7.x86_64) 7 (Core)’ -
确认改动的结果
[root@centOS7 client]# grub2-editenv listsaved_entry=CentOS Linux (3.10.0-1062.12.1.el7.x86_64) 7 (Core)
[root@centOS7 client]# -
重启系统reboot now
uname -r
04-28
841
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-21