[CentOS] Hiding a grub menuentry?

Tue Oct 15 15:17:56 UTC 2019
Richard <lists-centos at listmail.innovate.net>

> Date: Tuesday, October 15, 2019 14:52:39 +0100
> From: James Pearson <james-p at moving-picture.com>
> Does anyone know if it is possible to 'hide' a grub menuentry with
> CentOS 7 ?
> I have a custom menuentry that I don't want to be seen on the grub
> screen - but it needs to be selectable as the entry to boot via
> 'grub2-reboot'
> I've scanned the grub2 documentation - but I can't find anything
> obvious - so I'm guessing it can't be done - unless someone knows
> otherwise ?

I believe that you can accomplish what you are after by changing the
quoted menuentry label in grub.cfg:

    menuentry 'CentOS Linux (3.10.0-1062.1.2.el7.x86_64) 7 (Core)' ...

to just a blank:

    menuentry ' ' ...

for the specific entry. I do this for the windows side of my
dual-boot laptop. I boot to windows by scrolling down to the blank
line below the centos entries.