Remove grub2.cfg menuentry “with debugging” the right way!
You boot your Centos 7 machine, and half the entries in the list of available kernels has “with debugging”
If you are not going to do kernel debugging, why have that sitting around?
If you execute the following:
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
you get something like this:
0 : CentOS Linux (3.10.0-514.6.1.el7.x86_64) 7 (Core) 1 : CentOS Linux (3.10.0-514.6.1.el7.x86_64) 7 (Core) with debugging 2 : CentOS Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core) 3 : CentOS Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core) with debugging 4 : CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core) with debugging 5 : CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core) 6 : CentOS Linux 7 (Core), with Linux 0-rescue-ee97a4ebc3874248953d6b0df376e91f
To remove all the “with debugging” lines, edit /etc/sysconfig/kernel and change the line
MAKEDEBUG=yes
to read
MAKEDEBUG=no
Then execute
grub2-mkconfig -o /boot/grub2/grub.cfg
H/T: https://www.centos.org/forums/viewtopic.php?t=61030#p257518