listing grub entries.

Issues related to applications and software problems and general support
Post Reply
netblues
Posts: 2
Joined: 2014/01/20 23:20:17

listing grub entries.

Post by netblues » 2019/10/24 10:18:00

According to wiki,
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
should list availabe kernels
this works great on centos 7
However, since there is no menuentry in grub2.cfg, nothing is printed

grub-set-default n works, however can't find how to get the correct list.

Any ideas, more than welcome

aks
Posts: 3032
Joined: 2014/09/20 11:22:14

Re: listing grub entries.

Post by aks » 2019/10/24 19:27:20

Use RPM?

nouvo09
Posts: 183
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: listing grub entries.

Post by nouvo09 » 2019/10/25 09:47:43

since BLS has been implemented, the entries are in /boot/loader/entries
Member of centos-FR forum

netblues
Posts: 2
Joined: 2014/01/20 23:20:17

Re: listing grub entries.

Post by netblues » 2019/11/18 10:43:21

Yes, the entries are in /boot/laoder/entries
But what is the index number they get when the boot screen will appear

grub2-set-default NEEDS an argument that cannot be speculated by an ls...

nouvo09
Posts: 183
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: listing grub entries.

Post by nouvo09 » 2019/11/18 10:55:07

This command seems to be no longer available.

If you want to handle grub menu and list old-fashion, so in the /etc/default/grub file change BLSCFG to false and generate a new grub.cfg.
Member of centos-FR forum

Post Reply

Return to “CentOS 8 - General Support”