I have an SSD and I am using windows 10. I recently installed Arch and I configured my SSD in a way that it has 2 EFI System partion. One for GRUB2 and another for windows boot manager.My system boots as UEFI.Eventhough I installed os prober it didn't detect windows bootloader. So I need to switch to UEFI and change boot orders everytime I need to switch. How should I configure grub2 file so it also detects windows bootloader and gives me a option to choose from either, when grub2 is loaded.
1 Answer
Put this in your /etc/grub.d/40_custom file:
menuentry 'Windows 10' {
search --fs-uuid --no-floppy --set=root D464-A236
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi }
Where D464-A236 is the UUID of your windows UEFI partiton. You can find this by doing fdisk -l, and looking for a partition called "EFI System", but also make sure you are looking at the correct drive, you might have 2 or more EFI partitions, if you have multiple OSes. You want the one that is on the same device as the "Windows recovery environment". After you have the device, you can query the UUID with blkid, eg. blkid /dev/sda2.
Leave the chainloader line as it is, grub will evaluate the (${root}) part. If you want to make extra sure, you can mount the aforementioned EFI partition, and verify that the path to bootmgfw.efi is correct. Don't forget to run grub-mkconfig -o /boot/grub.cfg after making the modification.
os-proberwill detect it then. If I recall correctly, the UEFI boot test ofos-proberonly checked mounted partitions last time I looked at it.