Windows 11 boot entry in systemd-boot

I had a dual-boot Windows-EOS laptop with two separate EFI partitions for each OS. For some reason, I had to reinstall Windows 11 by formatting the previous C drive and reinstalling to the same drive. I rebooted into Linux thinking that I would need to fix the boot entries to be able to boot into Windows 11 from the Linux boot loader, but to my surprise there is no boot entry conf file for Windows 11, and yet the Windows 11 boot entry is there when I boot my system along with two entries each for the Linux kernel. Even more surprising was that I didn’t have to change anything, and choosing Windows 11 on the boot screen still boots correctly after reinstalling.

$ tree /efi/loader
/efi/loader
β”œβ”€β”€ entries
β”‚   β”œβ”€β”€ dae011a0185549498c026c184a0049e8-6.6.31-2-lts.conf
β”‚   β”œβ”€β”€ dae011a0185549498c026c184a0049e8-6.6.31-2-lts-fallback.conf
β”‚   β”œβ”€β”€ dae011a0185549498c026c184a0049e8-6.9.1-arch1-2.conf
β”‚   └── dae011a0185549498c026c184a0049e8-6.9.1-arch1-2-fallback.conf
β”œβ”€β”€ entries.srel
β”œβ”€β”€ loader.conf
└── random-seed

There is a Microsoft folder in the /efi/EFI folder, but the date modified time of its files hint that they are all related to older Windows installation.

Can anyone explain, what I am missing? Should I copy any EFI related files from Windows’ EFI partition and replace them here? Or should I let it work as it is if I am able to boot in right OSs correctly.

Let it work as it does, no need to do anything else. Although you might have to face some horrors where Windows MAY delete your systemd boot entry. I have faced this issue on Windows 11 although it was a custom build (Win X Lite) . But thought I would tell you anyways.

Yeah that has happened to me as well long ago when I stiil was dual booting, Microsoft don’t want you to use anything else then their Spyware operating system(windows).

I gave up on dual bott long ago, to meny issues.
and Windows now sucks!

1 Like

It always did suck! It just sucks even more now!

3 Likes

True, especially compared to Linux,

Systemd-Boot automatically searches for bootable efi files in certain location (i.e. UKIs in /efi/EFI/Linux).

See https://man.archlinux.org/man/sd-boot.7#FILES.

"
During boot systemd-boot automatically assembles a list of boot entries from the following sources:

  • …
    -The Microsoft Windows EFI boot manager, if installed.
  • …

"