How to fix two GRUBs due to multiple Linux installations

Hello!

Up until yesterday I was using Arch for the best part of the year, but I decided to try Open Suse Tumbleweed because it seems to be more stable and organized. I installed it using an USB stick and on top of my old Windows installation (I actually erased all Windows partitions using GParted). Now I have two GRUBs installed, and an invalid Windows Boot Manager entry.

I would like the help of someone more experience with GRUB and boot entries to fix this. The output of efibootmgr is the following:

BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001,001F,0000,0019,001A,001B,001C,001D,001E,0020,0022,0021,0023,0024
Boot0000* Windows Boot Manager
Boot0001* GRUB
Boot0002* opensuse-secureboot
Boot0010 Setup
Boot0011 Boot Menu
Boot0012 Diagnostic Splash Screen
Boot0013 Lenovo Diagnostics
Boot0014 Regulatory Information
Boot0015 ThinkShield secure wipe
Boot0016 Startup Interrupt Menu
Boot0017 Rescue and Recovery
Boot0018 MEBx Hot Key
Boot0019* USB CD
Boot001A* USB FDD
Boot001B* NVMe0
Boot001C* NVMe1
Boot001D* ATA HDD0
Boot001E* ATA HDD1
Boot001F* USB HDD
Boot0020* PXE BOOT
Boot0021* HTTPS BOOT
Boot0022* LENOVO CLOUD
Boot0023 Other CD
Boot0024 Other HDD
Boot0025* IDER BOOT CDROM
Boot0026* IDER BOOT Floppy
Boot0027* ATA HDD
Boot0028* ATAPI CD

If I boot to opensuse-secureboot, I see the custom GRUB of Tumbleweed with the options to boot to Tumbleweed or Windows. If I boot to GRUB, I see the Arch GRUB with the options to boot to Arch or Windows.

I have a couple of questions (if that’s ok):

  • How to delete the invalid entries?
  • How did that happen
  • How can I just use one GRUB to boot to either Arch or Tumbleweed?
  • Is there any difference between the two GRUBs installed?

Thank you so much in advance! I’m eager to fix this - I went to sleep yesterday with an itch haha.

How to remove stale entries might depend on your BIOS (UEFI firmware).

To remove that “Grub” entry (apparently an “arch” entry) you could use (as root)

efibootmgr -b 0001 -B

That would work on all of my systems except for my Lenovo box, which would put that entry back. I think I can permanently remove then entry in the BIOS settings of that computer. Or I can remove the entire directory

rm -rf /boot/efi/EFI/grub

And then, if I use “efibootmgr” to remove the entry, the BIOS won’t put it back.

NOTE: I don’t know whether that is the entry you wish to remove. That’s just an illustration. Most of your boot entries are for hardware or other options, and those are managed by your BIOS. You probably can’t remove those.

You can also change the boot order.

efibootmgr -o 0001,0002,001F,0000,0019,001A,001B,001C,001D,001E,0020,0022,0021,0023,0024

would put the “grub” entry first. And again, on my Lenovo box that doesn’t work. After reboot, the BIOS changes the order back. If I want to change the order, I have to do that in BIOS settings.

So, getting back to what you probably wanted to do:


rm -rf /boot/efi/EFI/Microsoft  ## remove that directory
efibootmgr -b 0000 -B   ### remove that entry

Those should be run as root.

When running openSUSE, you can use:

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

to rebuild the menu. After that, I should have an entry to boot arch. If that doesn’t do the job, you might need to add an entry to “/etc/grub.d/40_custom”.

When running arch, the equivalent command is probably:

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

although that depends on how you setup arch

When I last installed arch, I think I had it booting from a compressed grub archive in the EFI partition, and maybe the update on openSUSE won’t find that to add an entry for arch.

You have not provided much actual information about your system. So I have mostly been guessing. I’m really only guessing that it is a Lenovo, and I am guessing that it might behave similarly to my Lenovo. Provide more detailed information and ask more specific questions if you need more detailed help.

I should note that where I wrote:

efibootmgr -b 0000 -B

you could instead use:

efibootmgr -b 0 -B

You don’t need to use 4 digit numbers. I use 4 digits in examples because that better suggests what I am referring to.