Page 1 of 1

[SOLVED]Grub2 menu customisation

Posted: Tue Aug 13, 2019 6:54 am
by GuiGuy
Discovered grub-customizer today (seems to be installed by default) and used it to remove 3 defunct entries from my grub menu :happy: .
Grub-customizer works very well - although it does take a long time.

Next problem: some of the menu entries are wrong - how can I edit them?

Re: Grub2 menu customisation

Posted: Tue Aug 13, 2019 8:01 am
by fehlix
GuiGuy wrote:
Tue Aug 13, 2019 6:54 am
Grub-customizer works very well - although it does take a long time.
Please do note, Grub customizer may work very well, but it has shown to break sometimes the menu.
And it is known to be incompatible with some MX tools. Some user spent a lot of time to try to tidy up a Grub customizer broken grub menu.
GuiGuy wrote:
Tue Aug 13, 2019 6:54 am
some of the menu entries are wrong - how can I edit them?
You can correct them manually or hide them, but this won't sort the underlying issue to sort out the reason, why they do not work properly.

Re: Grub2 menu customisation

Posted: Tue Aug 13, 2019 8:40 am
by GuiGuy
fehlix wrote:
Tue Aug 13, 2019 8:01 am
Please do note, Grub customizer may work very well, but it has shown to break sometimes the menu.
And it is known to be incompatible with some MX tools. Some user spent a lot of time to try to tidy up a Grub customizer broken grub menu.
I have been lucky - my menus still work OK.
You can correct them manually or hide them, but this won't sort the underlying issue to sort out the reason, why they do not work properly.
They do work properly, except the wording on some of them is misleading.

Edit: in fact only one of them is seriously misleading; MX/Devuan ascii is described as "MX 18.3 Continuum".

Re: Grub2 menu customisation

Posted: Tue Aug 13, 2019 9:13 am
by fehlix
GuiGuy wrote:
Tue Aug 13, 2019 6:54 am
... - although it does take a long time.
That's probably because, you have not disabled within the other Linux' grub-menu's the os-prober,
and you might have a large number multiple entries for the identical boot-menu with different titles, though.
You might quickly check the number of menuentries of your "controlling" grubmenu /boot/grub/grub.cfg
by running this:

Code: Select all

grep -c '\bmenuentry'  /boot/grub/grub.cfg
Normally you would have just about 2-3 times the number of installed linux's. E.g. with 10 Linux installation about 20-30 entries.
:puppy:

Re: Grub2 menu customisation

Posted: Tue Aug 13, 2019 9:37 am
by GuiGuy
fehlix wrote:
Tue Aug 13, 2019 9:13 am
That's probably because, you have not disabled within the other Linux' grub-menu's the os-prober,
and you might have a large number multiple entries for the identical boot-menu with different titles, though.
You might quickly check the number of menuentries of your "controlling" grubmenu /boot/grub/grub.cfg
by running this:

Code: Select all

grep -c '\bmenuentry'  /boot/grub/grub.cfg
Normally you would have just about 2-3 times the number of installed linux's. E.g. with 10 Linux installation about 20-30 entries.
:puppy:
Yep!
grubcount.png
But I don't see them all, so does it matter?
How can I remove the hidden ones?

Re: Grub2 menu customisation

Posted: Tue Aug 13, 2019 10:09 am
by fehlix
GuiGuy wrote:
Tue Aug 13, 2019 9:37 am
But I don't see them all, so does it matter?
How can I remove the hidden ones?
The number seems reasonable. Don't know hidden menu entries - probably a Grub customizer feature, which I don't use anyway.

Re: Grub2 menu customisation

Posted: Tue Aug 13, 2019 1:00 pm
by GuiGuy
Thanks.
One more question: if I don't manage to remove them will they be resuscitated when I update-grub?
Or if I install another OS?

Re: Grub2 menu customisation

Posted: Tue Aug 13, 2019 3:27 pm
by fehlix
GuiGuy wrote:
Tue Aug 13, 2019 1:00 pm
Thanks.
One more question: if I don't manage to remove them will they be resuscitated when I update-grub?
Or if I install another OS?
When update-grub is triggered to run , it will scan all partitions for installed OS' it knows to handel with.
For all Linux's found it will also scan the grub-menu /boot/grub/grub.cfg) on the partition of the found Linux.
It will then generated new menu-entries out of all existing menu-entries within the other grub.cfg's.
So if any generated new menu entry is not working, the reason might be that the orignal grub.cfg-menu on the other partition is problematic or not working. Consider to boot into the other Linux, where wrong entries exist and do generate a fresh working grub.cfg.
If you install a new OS, you need to re-generate within your main Linux (wich provides the controling grub-menu) a new fresh grub.cfg, otherwise the new OS might not show up in the menu.
Any changes with Grub-customizer might survive the update-grub run. Any other manual changes. e.g. with an editor, within grub.cfg will be wiped out by the newly generated grub.cfg

Re: Grub2 menu customisation[SOLVED]

Posted: Wed Aug 14, 2019 9:22 am
by GuiGuy
OK, I will not "update-grub".
And will stop trying to improve my existing grub menu which already gives
me access to ten working OSs (including MSWindows).
The phantom OSs I have somehow generated are harmless and will be ignored.
When MX19 is released I shall put it on a fresh drive with its own MBR.

Fehlix, you have given me some valuable lessons.