[GRUB] How to remove additional entries from GRUB boot screen

Long time user of EndeavourOS, first-time user.

To wit, some statements of fact / up-front information:

  • I have NOT, repeat NOT installed additional linux kernels
  • Ever since I’ve installed endeavourOS on my system, I’ve had multiple entries appearing
  • Every time I update system, it stays the same, not cleaned up
  • I also have windows dual booted
  • Windows exists on primary SSD, Linux on second SSD. I have configured to boot into nix
  • I don’t have grub-customizer - I did once and it was good at cleaning up these entries, but now it won’t launch, so I uninstalled it.

My problem:

In grub loader I have multiple entries - 4 x linux and 2 x windows:

  • In terminal, /usr/lib/modules shows 3 kernel versions
  • but listing what’s installed by pacman, shows only one installed

How do I clean them up? I don’t really care if terminal or UI. Please no polemics about “why would you want to manage your grub entries via a UI” or some other non-helpful response that I’ve seen on other threads like this. Evidently, a UI would be really useful in removing these annoying duplicates.

Thanks in advance for any help offered.

1 Like

First, welcome to the forum!

Unfortunately, uninstalling it usually won’t undo the damage it does.

Looks like 4 versions. That is concerning if the extra entries have pkgbase and vmlinuz files in them. If they don’t, it won’t matter.

Can we see the output of find /usr/lib/modules -name vmlinuz and ls /boot?

The issues with grub-customizer have nothing to do with it being a GUI. They have to do with the mess it often leaves behind.

If both of the commands above show only one kernel, then what is needed is probably to clean-up after grub-customizer. That usually requires cleaning out your grub config and bringing clean versions in by reinstalling the package grub:

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

I wouldn’t try that until you have verified the kernel situation first.

output of find /usr/lib/modules -name vmlinuz:

image

output of ls /boot:

image

/usr/lib/modules looks fine. Those are probably just some left over directories.

You don’t have any kernels or initrams in /boot at all. I would not reboot right now until we figure out what is going on there.

What does ls /boot/efi show?

output of ls /boot/efi:

image

Can you reinstall your kernel package then check again?

sudo pacman -S linux
ls /boot

One sec, I just did a full system upgrade. Need to reboot anyway.

As discussed above, don’t reboot until you fix that kernel situation.

EDIT: Did that ls /boot output above been taken in the middle of your update? That could explain the missing kernel/initrams.

EDIT: Did that ls /boot output above been taken in the middle of your update? That could explain the missing kernel/initrams.

Yes, it was.

As discussed above, don’t reboot until you fix that kernel situation.

Too late. Already rebooted as prompted by system

contents of boot / output of ls /boot/efi:

OK, the missing kernel was probably caused by the ls running at the specific time in the update.

If you still have multiple entries, I would follow these instructions:

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

done. let’s see what happens when I reboot… :sparkler:. still installing AUR packages that haven’t been updated in a while…

I just realized there is a typo in that command.

It should be:

sudo grub-mkconfig -o /boot/grub/grub.cfg

The other command won’t hurt anything, but it also won’t be helpful as it will write a grub config file in the wrong place.

sure, I removed the config file and re-ran it.

1 Like

@dalto - OK, it worked. Thanks for your step by step help! Much appreciated. Hope this thread remains for helping anyone who experiences this in the future.

That means it is most likely that grub-customizer was the cause of your issue.

Glad you got it fixed!

1 Like

Sure Grub Customizer might wreak havoc on some systems and this is not for advocating to use it.

However most of these “havocs” I have seen are due to uninstalling it before restoring changes made by it. It has a restore mechanism that most of the people using it don’t use or are unaware of.

So if one doesn’t know how to, or is not careful to, use a big hammer, ending up with a sore thumb should not come as a surprise :wink:

2 Likes