centos7 选定默认启动内核,及删除无用内核
[root@bigapp-slave27 ~]
if
[ x
"${feature_menuentry_id}"
= xy ];
then
menuentry_id_option=
"--id"
menuentry_id_option=
""
export
menuentry_id_option
menuentry
'CentOS Linux (3.10.0-514.16.1.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-6f5840d0-55ac-4d3b-899b-61c0297c5347'
{
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-6f5840d0-55ac-4d3b-899b-61c0297c5347'
{
menuentry
'CentOS Linux (0-rescue-d57307c454c0437d91c309347178cdf5) 7 (Core)'
--class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option
'gnulinux-0-rescue-d57307c454c0437d91c309347178cdf5-advanced-6f5840d0-55ac-4d3b-899b-61c0297c5347'
{
[root@bigapp-slave27 ~]
3.10.0-514.16.1.el7.x86_64
grub2-
set
-default
'CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)'
[root@bigapp-slave27 ~]
saved_entry=CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
[root@bigapp-slave27 ~]
kernel-3.10.0-327.el7.x86_64
kernel-headers-3.10.0-514.6.1.el7.x86_64
kernel-tools-libs-3.10.0-327.el7.x86_64
kernel-3.10.0-514.16.1.el7.x86_64
kernel-tools-3.10.0-327.el7.x86_64
yum remove kernel-3.10.0-327.el7.x86_64