How to remove / replace boot entries in systemd-boot

After install endeavouros, there are now 3 boot options in BIOS boot menu

        Title: Windows Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/f158146a-65ee-41bb-a779-983555857b22

        Title: Linux Boot Manager
           ID: 0x0003
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/ee613112-36a0-469a-b87a-24e5eed7f0d0

        Title: Windows Boot Manager
           ID: 0x0004
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/ee613112-36a0-469a-b87a-24e5eed7f0d0

You can see that there are two Windows boot entries.While the first one (id 0000) works well, the second one (id 0004) not only got error when chosen, but was somehow born after this endeavouros installation.

So my boot loader menu is now like this

EndeavourOS Fallback
Windows 10 

The Windows 10 option leads that broken boot option 0004 rather than 0000.

My goal is to turn the Windows 10 option in loader menu to points to the well-working 0000. Is there anyway to remove the broken one? Or is there any way to override the option from 0004 to 0000?

Some of my search answers on the internet

  • using efibootmgr
udo efibootmgr --delete-bootnum --bootnum 0004
[sudo] password for joun: 
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0000,0003
Boot0000* Windows Boot Manager  HD(1,GPT,f158146a-65ee-41bb-a779-983555857b22,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d0000002c000100000010000000040000007fff0400
Boot0003* Linux Boot Manager    HD(7,GPT,ee613112-36a0-469a-b87a-24e5eed7f0d0,0x323e0000,0x100000)/File(\EFI\SYSTEMD\SYSTEMD-BOOTX64.EFI)

While the entry is gone, it got recovered as normal when I reboot again.

  • delete entry directory

I haven’t done this since I’m afraid it can affect the boot entry 0000. You can see in the BIOS menu that they have the same file path /EFI/MICROSOFT/BOOT/BOOTMGFW.EFI

Thank you in advance!

Extra info

  • Desktop: Plasma KDE
  • Boot method: systemd-boot
[joun@jounPc ~]$ bootctl
/efi/loader/loader.conf:5: Unknown line 'reboot-for-bitlocker', ignoring.
      Firmware: UEFI 2.70 (American Megatrends 5.17)
 Firmware Arch: x64
   Secure Boot: disabled (disabled)
  TPM2 Support: yes
  Boot into FW: supported

Current Boot Loader:
      Product: systemd-boot 253.4-1-arch
     Features: ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
               ✓ Support for passing random seed to OS
               ✓ Load drop-in drivers
               ✓ Support Type #1 sort-key field
               ✓ Support @saved pseudo-entry
               ✓ Support Type #1 devicetree field
               ✓ Boot loader sets ESP information
          ESP: /dev/disk/by-partuuid/ee613112-36a0-469a-b87a-24e5eed7f0d0

Random Seed:
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
          ESP: /efi (/dev/disk/by-partuuid/ee613112-36a0-469a-b87a-24e5eed7f0d0)
         File: ├─/EFI/systemd/systemd-bootx64.efi

Boot Loaders Listed in EFI Variables:
        Title: Windows Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/f158146a-65ee-41bb-a779-983555857b22

        Title: Linux Boot Manager
           ID: 0x0003
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/ee613112-36a0-469a-b87a-24e5eed7f0d0

Boot Loader Entries:
        $BOOT: /efi (/dev/disk/by-partuuid/ee613112-36a0-469a-b87a-24e5eed7f0d0)
        token: endeavouros

Default Boot Loader Entry:
         type: Boot Loader Specification Type #1 (.conf)
        title: EndeavourOS (6.3.8-arch1-1)
           id: 6b63149fa8b2401f8e2965db9dd061f8-6.3.8-arch1-1.conf
       source: /efi//loader/entries/6b63149fa8b2401f8e2965db9dd061f8-6.3.8-arch1-1.conf
     sort-key: endeavouros-6.3.8-arch1-1
      version: 6.3.8-arch1-1
   machine-id: 6b63149fa8b2401f8e2965db9dd061f8
        linux: /efi//6b63149fa8b2401f8e2965db9dd061f8/6.3.8-arch1-1/linux
       initrd: /efi//6b63149fa8b2401f8e2965db9dd061f8/6.3.8-arch1-1/initrd
      options: nvme_load=YES nowatchdog rw root=UUID=9ebc2a1e-8561-43f8-9a01-a25349795825 nvidia-drm.modeset=>

You can delete the broken one by deleting the files in /efi/microsoft from your EOS install.

If you want to add the other one you need to follow the instructions here:

Thank you for your help! Finally solved, but the result is quite weird. Wrote here if anyone met the same situation.

After I created a new boot option called windows, while it did boot the right option (0000), the window os keep crashing and blue death screen; Even the option 0000 itself at BIOS menu caused the same error;

For some reason, I could still enter Windows Safe Mode to take some data out to prepare for next window reinstall then exit.

Surprisingly, option 0000 worked well again. And somehow while the new option in loader menu Windows didnt work anymore, the old one Windows 10 did.

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