[Fix] Installing Windows 11 removed Linux UEFI Boot Option

Yesterday I installed Windows 11 onto my Framework 16’s 2230 drive, the 2280 already had an install of Arch Linux. After finishing the install, I was dismayed to find that the Arch install was no longer bootable, and after many hours of troubleshooting I found I had to manually create the EFI boot entry. I have a suspicion that Windows used the drive I didn’t select as it’s EFI entry, and if I’m right, removing the Linux drive will make my Windows install unbootable.

This isn’t necessarily a Framework specific issue, but these forums are more pleasent to write in and I wanted to record my findings somewhere. For anyone else who may run into this issue these are my notes:

Notes


I am using systemd-boot, but based on my research it seems like similar issues can apply to grub installs as well, but commands will need to be replaced with those applicable to Grub. Grub is far more popular, so finding them on a google search should be no problem.

The process that should work, but did not

  1. Boot into a live USB drive
  2. chroot into your linux drive (arch linux live usb makes this easier)
    a. lsblk to get the device paths for your drive (e.g. /dev/nvme0n1p1 for the first partition)
    b. mkdir /mnt/myos
    c. mount /dev/{nvme main partition} /mnt/myos
    d. mount /dev/{nvme boot/esp/efi partition} /mnt/myos/boot this is where my partition gets mounted, yours may be somewhere else.
    e. arch-chroot /mnt/myos
  3. Once chrooted, running bootctl install is supposed to detect and setup your EFI entries. For me, it did not. bootctl update is another command that comes recommended to try. I also tossed in a mkinitcpio -P for good measure and it did not help.

Despite how many times I tried bootctl appeared unable to create the EFI entry, and so it never showed up as a bootable option in the BIOS/UEFI firmware.

The process that worked

  1. Take a break and hit the slot machines down the hall in my hotel, win $75. This step was crucial for moral after hours of troubleshooting and giving up twice.
  2. Boot into live USB and chroot same as above
  3. Manually create the efi entry using efibootmgr
    a. efibootmgr --create --disk /dev/nvme{ID} --part {partition num} --loader '\EFI\systemd-bootx64.efi' --label "My OS" (I hope there’s no typo in there)
    b. for the --disk parameter, do not add the p1 value, or whatever number it is. It should only contain the disks Id, not the partition ID. E.g. /dev/nvme1n1
    c. More information available here

I’ll note that I had also done the first process numerous times before running efibootmgr, as a result it may be good to just run bootctl install before efibootmgr to be safe. It shouldn’t hurt.

1 Like

Does this mean that the safest way to install Windows 11 after already having Linux installed is to remove the SSD where Linux is installed before installing Windows?

1 Like

That’s my take away, yeah.

1 Like

yep, thats how i did it and it worked without much issue.

had to regenerate and reapply the grub config manually to include windows boot manager as an option (so i wouldnt have to hit f2 repeatedly to select it) and do some stuff to fix bitlocker after an upgrade (didnt have secure boot on when enabling bitlocker so when grub got upgraded it changed hash and thus the pcr that bitlocker checks when not in secure boot mode changed, also this same thing means that bitlocker only works if windows is booted through grub rather than directly), but i never had the bootloader deleted once.

2 Likes