1

Okay, let me explain. This is a UEFI computer. It has two disks. The primary disk is partitioned with GPT and boots via GRUB2 to an Arch Linux partition. The secondary disk is partitioned with MBR and only boots if I disable the primary disk in the UEFI setup utility. The secondary disk has a partition with Windows 10. My question is how do I add a menu entry to the primary GRUB2 configuration that boots the Windows 10 partition on the secondary disk? I tried grub-mkconfig with os-prober and it was unable to find the Windows 10 install. There's apparently nothing wrong with the Windows 10 install, since it boots just fine on its own. I then tried manually adding various menu entries to the grub.cfg but they didn't work. Below are some of the entries that I tried.

menuentry "Windows 10 (loader) (on /dev/sda3)" {
    insmod part_msdos
    insmod ntfs
    insmod ntldr

    ntldr (hd0,msdos3)/bootmgr
}

menuentry "windows 10 (loader) (on /dev/sda3) 2" {
    insmod part_msdos
    insmod ntfs
    chainloader (hd0,msdos3)+1
}

menuentry "Windows 10 (loader) (on /dev/sda3) 3" {
    insmod part_msdos
    insmod ntfs
    chainloader (hd0,msdos3)/Windows/Boot/EFI/bootmgfw.efi
}

The most successful one is the last one which apparently boots to the EFI FW program but gives a BCD error (which is not present when booting normally.)

Anthony
  • 111
  • 2
  • 2
    AFAIK you can't boot a legacy Windows if booted from UEFI. But you could [convert](https://www.tenforums.com/tutorials/81502-convert-windows-10-legacy-bios-uefi-without-data-loss.html) your Windows disk to GPT. Make sure to backup your Windows drive and maybe disconnect your primary disk before you run the conversion (haven't tried that with a dual boot system and two disks). `grub-mkconfig` should find Windows after the conversion. – Freddy Nov 06 '20 at 21:13
  • 2
    UEFI & BIOS are not compatible. Once you start booting in UEFI, you cannot switch to BIOS without rebooting. BIOS & UEFI Windows partitions, note system has totally different format & meaning between BIOS & UEFI https://msdn.microsoft.com/en-us/library/windows/hardware/dn898504%28v=vs.85%29.aspx & https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-uefigpt-based-hard-drive-partitions#RecommendedPartitionConfigurations https://msdn.microsoft.com/en-us/library/windows/hardware/dn898510%28v=vs.85%29.aspx#RecommendedPartitionConfigurations – oldfred Nov 06 '20 at 21:29

1 Answers1

1

You cannot boot Windows installed in MBR mode from UEFI. Period.

You will have to

  1. Grab Windows UEFI boot files somewhere, unpack them to /boot/efi/EFI/Microsoft/Boot
  2. Recreate BCD
  3. Remove all the entries from HKEY_LOCAL_MACHINE\System\MountedDevices

This will probably make your Windows bootable.

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64