Too many grub entries

I just installed EOS Plasma. I see too many grub entries. I have only 3 more Linux distros and a Windows one. With the Linux distros, grub shows too many entries, repeating same Linux distro many times with different older kernels. Is there a way to get rid of this problem from the EOS end, or do I have to go to those Linux distros and delete all the old kernels and come back and do
# grub-mkconfig -o /boot/grub/grub.cfg?
Thanks.

If OSProber finds a bootable OS it will tell GRUB to list it. This does indeed include all bootable kernel versions.
Basically the answer is Yes, you have to boot into the kernel version you want to keep in each distro and uninstall the others.

1 Like

I would try enabling the submenu on grub, which I believe is disabled by default in EOS. Back up your system. Sudo edit /etc/default/grub, comment out the line GRUB_DISABLE_SUBMENU=y, and then run sudo grub-mkconfig -o /boot/grub/grub.cfg to rebuild grub. I believe that will group the various kernels for each install under submenus.

7 Likes

@chdsl
What does the output show for efibootmgr -v

and or

efibootmgr

Another assist can be - if they are debian (or Ubuntu based) - run sudo apt autoremove in each of them to thin out the herd of old kernels. The submenu will also help considerably!

1 Like

This worked. Thanks! :grinning:

2 Likes

You could also not use osprober at all, I don’t.

Just grub chainload each OS you want to boot into, one entry per OS, which will redirect you to their specific grubs.

$ cat /etc/grub.d/40_custom

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Arch KDE" {
    set root="hdX,gptY"
    chainloader /EFI/Arch/grubx64.efi
}

hdX is zero based disk number.
gptY is partition number of efi partition.

2 Likes

I just want the grub screen look small, that’s all.

That is the beauty of not using osprober, you have complete control over the number of grub entries and their organisation.

You can shrink it to invisibility if you want - have you looked into rEFInd? :grin: That’s what I use for multi multi-boots - and it is much tidier (and less wordy) while still giving you access to all the kernels around. If you’re interested, look at the wiki entry here @ EndeavourOS on How to install rEFINd. Then you can disable OS_PROBER entirely, which will speed things up if you need to update grub…

1 Like

I know that, but what I wanted to point out was, that when one installs EOS first time, this is the grub screen one gets.