GRUB overpopulated after removal of grub-customizer

Yes, it’s another GRUB post! However, this is not (mainly) about the recent bug, but rather about the 8 (!) main entries that currently populate my GRUB.

After having been affected by the whole GRUB debacle, I decided to get rid of grub-customizer, since I figured it does more harm than good. That worked fine, but it did leave me with a bloated GRUB menu. I’ve tried following the restore instructions in /etc/grub.d/backup, (specifically, copying the contents of /etc/grub.d/backup/boot_grub to /boot/grub), but this borked GRUB completely and I again had to chroot and reinstall GRUB.

By now, I’m way too scared to try anything else. I’m happy I have a working system, but I would like to know how to properly clean up my GRUB menu. It looks like grub-customizer left a bunch of stuff that I don’t know how to get rid of.

This is what my GRUB menu currently looks like:

  • EndeavourOS Linux, with Linux linux-lts
  • EndeavourOS Linux, with Linux linux-lts (fallback initramfs)
  • EndeavourOS Linux, with Linux linux
  • EndeavourOS Linux, with Linux linux (fallback initramfs)
  • EndeavourOS, on linux-lts
  • EndeavourOS, on linux-lts (fallback initramfs)
  • EndeavourOS, on linux
  • EndeavourOS, on linux (fallback initramfs)
  • UEFI Firmware Settings
  • EndeavourOS snapshots

I don’t even know whether to boot into 3 or 7 at this point, or what the difference is between the first four and the second four.

So, is there a way to ‘clean up’ GRUB without breaking it?

If any more information is required, I’ll gladly provide it!

What does ls /etc/grub.d show?

ls /etc/grub.d  
backup            01_grub-customizer_menu_color_helper  30_os-prober      41_custom
bin               10_linux.bak                          30_os-prober.bak  42_snapshots-btrfs
proxifiedScripts  10_linux_proxy                        33_uefi-firmware  README
00_header         20_linux_xen                          40_custom

It looks like there are quite a few custom entries there. You probably need to go through each one and remove the ones generated by grub customizer.

I do agree that these extra entries are probably (partly) to blame (especially 10_linux_proxy, which seems to contain the duplicate four entries), but so far I didn’t want to mess with them out of fear for breaking GRUB once again. Do you think that removing these files and running a grub-mkconfig would be harmless?

What worries me is that the 10_linux entry only exists in the /etc/grub.d/backup folder, whereas the current /etc/grub.d folder only has 10_linux_proxy. This makes me suspect that simply removing the proxy file will leave me without bootable entries once again.

Another complication is that some files are not custom entries, but do differ from their /etc/grub.d/backup counterparts, such as 10_linux.bak and 20_linux_xen. By diffing them I cannot figure out whether these differences are due to grub-customizer, or simply due to these backups being outdated. In any case, I don’t think I can simply copy these backup files back to the grub.d folder.

That’s why I was wondering if there isn’t a way to somehow completely overwrite all these files and start from scratch, rather than trying to reverse-engineer a clean slate? I also simply don’t know enough about how GRUB works to confidently make sense of this.

By the way, I appreciate you taking the time to reply, thanks a lot!

You could try this:

sudo mv /etc/grub.d /etc/grub.d-old
sudo pacman -S grub
sudo grub-mkconfig -o /boot/grub/grub.cfg

Before rebooting, take a look at your grub.cfg and make sure it has entries for your kernels.


Did exactly as you said, and it worked like a charm! I’m left with four entries now. Thanks a lot!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.