after formating my main fedora partition by mistake i had to reinstall it but i also formatted EFI partition(by mistake again).
so now my dualboot setup is now linux only with a unbootable windows 10. so i copied my friends windows 10 efi partition files to mine and with a few cmd commands i now have my windows back.
BUT now i know that i have to boot fedora live and update grub to recognize my linux again. so since then only my windows boots up( yep i had a rough week). now that you know my story, when i mount efi partition in fedora live and try to update grub using
sudo grub2-mkconfig -o /EFI/fedora/grub.cfg
it says that grub found windows boot manager in sda1 and fedora in sda3. so it sounds right but when i reboot there is no grub. it goes straight to windows. even when i chose grub in my bootmenu manualy it only show windows boot manager as a option(which is broken and dont boot windows from there).
so my only way to boot windows is windows boot manager.
now how tf should i update grub to see my fedora again
ending advise: be careful when formatting partitions
There is a difference in the grub.cfg file locations between fedora 33 and fedora 34. You did not tell us which fedora you have installed, so here goes a guess.
If you have fedora 33 and using uefi then the command to update grub is
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
if instead you have fedora 34 and using uefi then the command to udate grub is
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
What you entered above is not the path to the grub.cfg file in either version.
yeah i have fedora 34. i meant
that was bcz of mount path. now i tested new path but still not updated
EDIT: now my windows can boot from grub but still no fedora. even though it said "found fedora on sda3"something like that. but where is the problem
Did you read what I posted about the F34 command? Your path is not right
yeah i did it bro. but still there is no fedora. im fkin angry
Hope someone else who has more in-depth knowledge of grub can chime in. I have never personally had major issues with it and only know the basics.
update: i tried Bootloading with GRUB2 :: Fedora Docs but by mistake(yeah again) i removed all broken symlinks including /boot/grub2 dir and a kernel. so even though i learned things during process but i installed new fedora using same efi partotion(so my windows wont broke again).