i am facing a problem while installing vanilla arch on my desktop pc. whole installation process goes fine even the grub install also goes fine, but when i reboot my machine no os detected. if i boot into live usb again and change the efi partition to bios boot partition and install grub again for legacy it boots fine. while looking around for the problem i found that while installing grub for efi it did not create any file to boot from eg. /efi/EFI/GRUB/GRUBX64.EFI. also the genfstab command did not create any listing for the efi partition. i dont knw why this is happening. i have tried other distros like kubuntu linux mint manjaro arcolinuxd everything works fine with uefi its just this vanilla arch giving me problem. also i had arch installed on this pc before they changed the base package it installed fine back then with uefi.
my partition table is GPT, and partitions are -
/dev/sda1 - fat32 efi partition 512M
/dev/sda2 - swap 8192M
/dev/sda3 - root filesystem x86-64 215G
its a 240GB ssd.
i need some help figuring out this. right now im using legacy boot but i want to switch to uefi because i am dual booting windows and everytime i want to boot to linux i have manually press f11 for choosing which disk to boot from. even if i set the linux drive to boot by default in bios settings. and i want grub to be the default bootloader. im using windows just for gaming nothing else. arch is my main os.