0

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.

2
  • Try mounting the EFI System Partition of Windows somewhere and seeing if os-prober will detect it then. If I recall correctly, the UEFI boot test of os-prober only checked mounted partitions last time I looked at it. Commented May 29, 2021 at 13:31
  • You are not supposed to have more than one EFI System Partition per disk. The firmware expects only one, and picks one at random. The ESP is intended to be shared between operating systems. Commented May 29, 2021 at 16:36

1 Answer 1

0

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.