Normally there are two startup items, one is "normal startup" and the other is "rescue mode startup" (rescue).
If there are more than two startup items, it means that the current system has an old kernel that has not been deleted. The reason is that the old kernel will not be deleted automatically after CentOS is updated.
The default is to start with the new kernel, which can be selected temporarily in the startup options, or you can modify the configuration and specify it permanently.
[ root@controller ~]# uname -r #View current kernel
3.10.0- 862.3.2. el7.x86_64
[ root@controller ~]# grub2-editenv list #The default kernel is the latest version
saved_entry=CentOS Linux(3.10.0-862.3.2.el7.x86_64)7(Core)[root@controller ~]# rpm -qa |grep kernel-[0-9]
kernel-3.10.0-862.3.2.el7.x86_64
kernel-3.10.0-862.el7.x86_64
erlang-kernel-19.3.6.4-1.el7.x86_64
[ root@controller ~]# cat /boot/grub2/grub.cfg |grep "menuentry "
menuentry 'CentOS Linux (3.10.0-862.3.2.el7.x86_64) 7 (Core)'--classcentos--classgnu-linux --classgnu--classos--unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.el7.x86_64-advanced-2e7f2bc7-8c8f-47f7-905d-5d65331a89be'{
menuentry 'CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core)'--classcentos--classgnu-linux --classgnu--classos--unrestricted $menuentry_id_option 'gnulinux-3.10.0-862.el7.x86_64-advanced-2e7f2bc7-8c8f-47f7-905d-5d65331a89be'{
menuentry 'CentOS Linux (0-rescue-806e7521af0743a9a4414ff917f6c852) 7 (Core)'--classcentos--classgnu-linux --classgnu--classos--unrestricted $menuentry_id_option 'gnulinux-0-rescue-806e7521af0743a9a4414ff917f6c852-advanced-2e7f2bc7-8c8f-47f7-905d-5d65331a89be'{[root@controller ~]# yum remove kernel-3.10.0-862.el7.x86_64 #Remove old kernel
Or rpm-e kernel-3.10.0-862.el7.x86_64
an examination:
[ root@controller ~]# rpm -qa |grep kernel-[0-9]
kernel-3.10.0-862.3.2.el7.x86_64
erlang-kernel-19.3.6.4-1.el7.x86_64
[ root@controller ~]# grep menu /boot/grub2/grub.cfg
**Address of this article: **https://www.zwblog.cn/post/81.html **Copyright statement: **This article is an original article, the copyright belongs to herve, welcome to share this article, please keep the source for reprinting!
Recommended Posts