Add windows to grub

  1. Files
  2. Install OS-Prober
  3. Enable os-prober in grub
  4. Update grub

Files

I't write DO NOT EDIT THIS FILE
But I've done it, it was useless, I think I had to do it only if I was on MBR.
I added this content in this file Techbrown
/boot/grub/grub.cfg

This file was used to enable os-prober
/etc/default/grub

Install OS-Prober

sudo pacman -S os-prober

Run it:
sudo os-prober

Output:
/dev/sda2@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi

Enable os-prober in grub

edit /etc/default/grub
add GRUB_DISABLE_OS_PROBER=false

Update grub

sudo grub-mkconfig -o /boot/grub/grub.cfg