I use Arch, btw.

I have been using both EndeavourOS and Windows, each installed on separate SSDs in my desktop, for several months. (If only I could, I would gladly completely ditch Windows… but there are several issues that makes me hesitate to make this decision. One of them is Kakao Talk, a popular messenger app in Korea that does not support Linux.)

However, using the same setup for months made me bored, and I decided to fresh-install Arch on my desktop. The installation process went smoothly, and I could see the GNOME DE pretty soon. After ricing my desktop, I tried to reboot into Windows for some games of ARAM on League with my friends.1 However, I was surprised to find that Windows had completely disappeared from the boot entry; it was missing not only from GRUB but also from the BIOS.

The first thing I did, of course, was to read the […] manual. I enabled os-probe from GRUB by installing the package and editing the /etc/default/grub file:

GRUB_DISABLE_OS_PROBER=false

and then running

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

from the shell, but os-probe seemed like it couldn’t find Windows’ EFI.

That was strange, because when mounting my NVME drive with the Windows installation, it clearly showed that my bootmgfw.efi file was located in /Windows/Boot/EFI/bootmgfw.efi. So, I started googling about this, and found some articles on Arch Forum. One of the threads suggested to make a new boot entry on GRUB by directly specifying the location of the bootmgfw.efi file.

To do this, I followed the instructions on this article on Gentoo Wiki. I added this to /etc/grub.d/40_custom:

menuentry 'Windows' {
    insmod part_gpt
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root [UUID of the NVME partition]
    chainloader ($root)/Windows/Boot/EFI/bootmgfw.efi
}

and then ran grub-mkconfig again. This time, I was able to see the entry for Windows on GRUB. But when I selected that, windows boot manager complained about it unable to find BCD.

windows-failed-to-start-bcd Image Source: Diskpart

So, I took a deep, frustrated breath, and went back to Arch to try to figure out what the problem was. I mounted the Windows NVME again, and.. found something peculiar. Somehow, Windows did not have its own EFI partition; what I thought to be EFI actually turned out to be just a recovery partition. Recovery partition of size 600MB.. I could finally wrap my head around what was going on the whole time.

Before installing Arch, when I was using Windows and EndeavourOS, I installed EndeavourOS before installing Windows. This was the problem. Since I did not manually generate the EFI partition for Windows on its SSD, Windows Installer looked at the Linux’s EFI partition and thought ‘hey, maybe I could fit in here’ and just put itself in there. This made Windows unbootable after fresh installing Arch, because it got rid of Windows’ boot related files stored in Linux’s EFI partition.

I made a bootable Windows flash and followed the instructions on Arch Wiki to restore the EFI partition. I booted into the flash drive, and manually generated an EFI partition for Windows through diskpart:

DISKPART> list disk
DISKPART> sel disk [DISK NUM]
DISKPART> cre par efi
DISKPART> sel par [CREATED EFI PAR NUM]
DISKPART> assign letter=Z:
DISKPART> exit

and then ran the magic command, which recreates the BCD store:

C:\> bcdboot C:\Windows /x Z: /f UEFI

Then voilà, Windows booted normally like a charm.

The moral of the story? Never trust the Windows installer and always, ALWAYS double-check the EFI partition when installing Windows.

Footnotes

  1. As of patch 13.23, League of Legends is unplayable on Linux.