rhel7.2采用的grub作为引导程序,所以和以前版本不同,并不是修改/etc/grub.conf来修改启动项,需要如下操作:
1、查看可以修改的内核选项
-
[root@localhost ~]# 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 'Red Hat Enterprise Linux Server (4.4.0) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-4becb360-5f46-4607-9408-285eec7c39cc' {
-
menuentry 'Red Hat Enterprise Linux Server (3.10.0-327.el7.x86_64) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-4becb360-5f46-4607-9408-285eec7c39cc' {
-
menuentry 'Red Hat Enterprise Linux Server (0-rescue-5bb9b453915c4d5cbabb3f776aaadec4) 7.2 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-5bb9b453915c4d5cbabb3f776aaadec4-advanced-4becb360-5f46-4607-9408-285eec7c39cc' {
-
[root@localhost ~]#
2、修改默认内核
-
[root@localhost ~]# grub2-set-default "Red Hat Enterprise Linux Server (4.4.0) 7.2 (Maipo)"
3、验证是否成功,并重启服务器
-
[root@localhost ~]# grub2-editenv list
-
saved_entry=Red Hat Enterprise Linux Server (4.4.0) 7.2 (Maipo)
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-2093954/,如需转载,请注明出处,否则将追究法律责任。