linwin

Add Windows to the boot menu: GRUB, systemd-boot, Limine, rEFInd

After installing Windows, two problems are common: Windows takes first place in the boot order, and it does not show up in the Linux boot loader menu. Here is how each boot loader handles it, and what linwin does automatically.

Put Linux first again

Windows puts itself first in the UEFI boot order. To put the Linux boot loader back first:

efibootmgr                         # find the Linux entry number (e.g. 0003)
sudo efibootmgr --bootorder 0003,0001

linwin does it on both sides: Windows removes itself from the top at its first logon (bcdedit), and linwin puts the entry that booted Linux first.

GRUB (Ubuntu, Debian, Mint, Fedora, openSUSE…)

Without os-prober enabled, GRUB does not detect Windows. An explicit entry, independent of os-prober:

menuentry 'Windows' --class windows {
	insmod part_gpt
	insmod fat
	insmod chain
	search --no-floppy --fs-uuid --set=root EFI-PARTITION-UUID
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

linwin writes it to /etc/grub.d/35_linwin_windows, shows the menu again if it is hidden (GRUB_TIMEOUT_STYLE=hidden on Ubuntu, menu_auto_hide on Fedora) and regenerates the configuration (update-grub or grub-mkconfig/grub2-mkconfig).

systemd-boot

systemd-boot shows Windows automatically when it is on the same EFI partition. The menu stays hidden if timeout is 0: linwin sets timeout 5 in loader/loader.conf.

Limine

Limine does not add Windows automatically. With limine-entry-tool (Arch, CachyOS, Omarchy):

sudo limine-entry-tool --add-efi "Windows" /boot/EFI/Microsoft/Boot/bootmgfw.efi

Otherwise, an entry in limine.conf with protocol: efi and path: boot():/EFI/Microsoft/Boot/bootmgfw.efi. linwin uses the tool when present, or writes the entry.

rEFInd

rEFInd finds Windows on its own: nothing to do.

To do everything automatically, Windows installation included, see the dual-boot without USB guide.

linwin is free software (GPL-3.0) and works on all common distributions.