Unable to boot into windows 10 with rEFInd (solved)

22,875

Solution 1

rEFInd should automatically detect the Windows EFI boot loader and create a menu entry for it. If this isn't happening, then my hunch is that Windows is installed to an MBR disk in BIOS/CSM/legacy mode, not to a GPT disk in EFI/UEFI mode. You can check the partition table types of your disks like this (as root):

parted /dev/sda print | grep Table

Change /dev/sda for each of your disks (they're probably /dev/sda and /dev/sdb, but might be something more exotic). parted reports GPT disks as gpt, but uses msdos for MBR disks. If my hunch is correct, then the Linux disk will probably show up as GPT and the Windows disk as MBR.

If I'm right, you can try editing refind.conf (usually in /boot/efi/EFI/refind or /boot/EFI/refind): Uncomment the scanfor line and add hdbios to the options. This will tell rEFInd to activate its support for booting BIOS-mode OSes. You'll probably get one or two gray diamond-shaped icons when you boot, one of which should boot Windows. (If you get just one icon and it doesn't boot Windows, also try uncommenting the uefi_deep_legacy_scan option in refind.conf.) If you want to hide the non-functional Windows boot entry, you can do so with dont_scan_volumes, assuming you can find a unique part of the boot option's description to hide it.

As an alternative to all of this, or if rEFInd's BIOS-mode support doesn't work on your computer, you could convert Windows to boot in EFI mode rather than BIOS mode. This is riskier than adding BIOS-mode support to rEFInd's configuration, but it may boot a little faster and it will let Windows access EFI features. See this page for instructions on how to make this change.

If I'm wrong in my assumption that Windows is booting in BIOS mode, then something else is wrong -- perhaps a damaged filesystem on the ESP that holds the Windows boot loader or even a destroyed Windows boot loader. The necessary repair will depend on the exact nature of the problem. In this case, please run the Boot Info Script. This will generate a file called RESULTS.txt. Post that file to a pastebin site and post the URL to your document here.

Solution 2

I think that the \EFI\tools\launch_windows.nsh file is just an example of script that launches the actual Windows bootloader, which should be somewhere in EFI\Microsoft directory.

\EFI\tools\shell.efi file is a UEFI shell, you can get it from here. Though if you just want to launch Windows bootloader you do not need the shell for that. Windows bootloader can be launched directly as any normal UEFI application.

Try adding something like:

menuentry Windows {
    loader \EFI\Microsoft\Boot\bootmgfw.efi
}

to your rEFInd configuration.

Solution 3

After installing Linux with an EFI bootloader on a system where Windows had been installed with legacy BIOS mode, I was unable to boot into Windows, only Linux. @Rod Smith's answer was great and helped me troubleshoot a bunch of things. But even after installing rEFInd and setting the config options, I wasn't able to boot Windows. I converted the drive from MBR to GPT, but that didn't work. I tried toggling the motherboard between UEFI and Legacy - still nothing. I actually had to copy the EFI bootloader for Windows from Windows\Boot\EFI to the ESP. And I'm guessing that @Marcel could have done the same instead of reinstalling Windows - although that is certainly an option.

There is a great Medium post that explains the whole process: https://medium.com/@hetmansoftware/how-to-restore-the-structure-of-deleted-efi-partitions-in-windows-653a68b5c09f

Share:
22,875

Related videos on Youtube

Marcel
Author by

Marcel

I am a student who is also an avid website developer. I make websites for local not-for-profit organisations.

Updated on September 18, 2022

Comments

  • Marcel
    Marcel almost 2 years

    Edit: Solved, see below.

    I just installed arch linux on my previously only windows 10 laptop. I have one ssd for arch linux and one for windows. I want to use rEFInd as my bootloader, which works perfectly for arch linux. I tried to set up a menu entry for windows following this tutorial. The problem is, I don't have \EFI\tools\shell.efi or fs0:\EFI\tools\launch_windows.nsh. My hunch is that because I have two ssds and I was previously only using the windows one, I have two ESPs so my windows .efi files don't exist on my arch linux ESP. Is this accurate? I tried digging through the partitions on my windows drive but I don't see any .efi files there either. Is it possible that windows was booting using BIOS and didn't create those files?

    Edit: I had to reinstall windows in UEFI mode. I had it in legacy mode.

  • Marcel
    Marcel over 7 years
    Thanks for the answer but I don't have \EFI\Microsoft\Boot\bootmgfw.efi.
  • ea7ababe
    ea7ababe over 7 years
    Do you have EFI\Microsoft directory on one of your ESPs? If not then your Windows installation is not configured to boot from UEFI. In that case you can for example use GRUB uefi executable to chainload Windows bootloader. Or try to install native uefi Windows bootloader. But I can't help you with this right now, sorry.