Recovering Windows After Wiping GRUB for Limine

By William Guimont-Martin2 minutes read


I had a working dual-boot setup: Manjaro on one SSD for work, Windows on another for leisure, with GRUB acting as the selector between them. GRUB would chainload Windows at boot. Everything worked fine – until I decided to replace Manjaro with Omarchy, which uses the Limine bootloader instead of GRUB.

I wiped the Manjaro SSD, installed Omarchy, and promptly lost access to Windows.

Here’s what happened and how I fixed it.

What Actually Broke

The setup had a hidden dependency: my UEFI firmware was booting GRUB, and GRUB was chainloading Windows. When I wiped Manjaro, GRUB disappeared – and with it, the only thing pointing at Windows.

Windows itself was completely untouched. The NTFS partitions on the Windows SSD were fine. But the EFI System Partition (ESP), the FAT32 partition that holds bootloaders, was on my NVMe drive alongside Omarchy, and the Windows EFI files (\EFI\Microsoft\Boot\) were simply gone.

Disk Layout

sdb (931 GB)          ← Windows SSD
├─ sdb1  16 MB        Microsoft Reserved Partition
├─ sdb2  930 GB NTFS  Windows C: drive
└─ sdb3  817 MB NTFS  Windows Recovery

nvme0n1 (1.8 TB)      ← Omarchy NVMe
├─ nvme0n1p1  2 GB vfat   ← ESP, mounted at /boot
└─ nvme0n1p2  1.8 TB LUKS → btrfs root

No EFI partition on the Windows SSD at all. The ESP was shared on the NVMe, and Manjaro’s wipe had taken the Windows EFI files with it.

Step 1: Configure Limine

Omarchy uses Limine, so the first task was adding a Windows entry to /boot/limine.conf. The key lesson here: match the path syntax of your working entries.

/Windows
    protocol: efi_chainload
    path: boot():/EFI/Microsoft/Boot/bootmgfw.efi

Step 2: Copy the EFI Files from the Windows Partition

The Windows bootloader (bootmgfw.efi) wasn’t on the ESP, but it was still sitting on the Windows partition itself, under Windows/Boot/EFI/. So I mounted the Windows SSD and copied it over:

sudo mkdir -p /boot/EFI/Microsoft/Boot
sudo cp -r /mnt/Windows/Boot/* /boot/EFI/Microsoft/Boot/

This allowed me to finally boot Windows from Limine, it could now find and launch bootmgfw.efi. But Windows then hit a different wall:

Recovery
The Boot Configuration Data for your PC is missing or contains errors.
File: \EFI\Microsoft\Boot\BCD
Error code: 0xc000000f

Step 3: Rebuild the BCD with bcdboot

The BCD (Boot Configuration Data) is a binary database that tells the Windows bootloader where the OS actually lives. It’s not part of the Windows/Boot/ folder – it gets generated by a Windows tool called bcdboot. You can’t create it from Linux.

This required a Windows installation USB. After booting it and hitting Shift+F10 to open a command prompt, the fix was:

diskpart

select disk 1          :: NVMe (1863 GB)
select partition 1     :: the 2048 MB ESP
assign letter=S

select disk 0          :: Windows SSD (931 GB)
select partition 2     :: the 930 GB primary partition
assign letter=C

exit

bcdboot C:\Windows /s S: /f UEFI

bcdboot regenerated the BCD store on the ESP, pointing it at the Windows installation on the other SSD. One reboot later, Limine showed the Windows entry and it booted cleanly.