Remove grub2.cfg menuentry "with debugging" right way!

General support questions
Post Reply
anderson_thomas
Posts: 96
Joined: 2011/11/21 10:19:41

Remove grub2.cfg menuentry "with debugging" right way!

Post by anderson_thomas » 2017/01/20 12:21:53

Hi,

I have on some CentOS 7 installations /boot/grub2/grub2.cfg menuentry like this:

Code: Select all

# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
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
How can I remove all the menuentry listet "with debugging"? (in my case menuentry 1, 3 and 4)

Thank you!

anderson_thomas
Posts: 96
Joined: 2011/11/21 10:19:41

Re: Remove grub2.cfg menuentry "with debugging" right way!

Post by anderson_thomas » 2017/01/20 12:43:56

Hi,

is it the best way to edit

Code: Select all

/etc/sysconfig/kernel
and remove the lines (if present):

Code: Select all

# MAKEDEBUG specifies if new-kernel-pkg should create non-default
# "debug" entries for new kernels.
MAKEDEBUG=yes
and do as last step

Code: Select all

grub2-mkconfig -o /boot/grub2/grub.cfg
Is that right?

Thank you for any advise!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Remove grub2.cfg menuentry "with debugging" right way!

Post by TrevorH » 2017/01/20 14:07:09

Yes.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

anderson_thomas
Posts: 96
Joined: 2011/11/21 10:19:41

Re: Remove grub2.cfg menuentry "with debugging" right way!

Post by anderson_thomas » 2017/01/20 14:08:31

Thank you!

Post Reply