CentOS 8.x 和 RHEL 8.x 更改默认启动项
CentOS 7内核升级后内核启动顺序的更改
一、查看所有 menuentry
# 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 (4.4.34-1.el7.elrepo.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-3d336981-24de-4456-87af-9094e7cdb25c' { menuentry 'CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-3d336981-24de-4456-87af-9094e7cdb25c' { menuentry 'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-327.el7.x86_64-advanced-3d336981-24de-4456-87af-9094e7cdb25c' { menuentry 'CentOS Linux (0-rescue-66f00fb9b7b84667bc1f1aa321d6569b) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-66f00fb9b7b84667bc1f1aa321d6569b-advanced-3d336981-24de-4456-87af-9094e7cdb25c' {
二、查看当前默认选项
# grub2-editenv list saved_entry=CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core)
三、更改默认启动选项
# grub2-set-default "CentOS Linux (4.4.34-1.el7.elrepo.x86_64) 7 (Core)"
转载请注明:爱开源 » CentOS 7内核升级后内核启动顺序的更改