My laptop has Windows and Ubuntu on it. I reinstalled Ubuntu and then my grub stopped working. Firstly I was in grub-rescue console and loaded my ubuntu with "set root, set prefix, insmod normal, normal" scheme. Then I tried boot-repair tool and it gave me this result:
https://paste.ubuntu.com/p/bn7hVGT5YC/
Now when I turn on my PC in both UEFI and Legacy mode, I see grub 2.02 (without rescue) console. The plan with "insmod normal" does not work here. I tried to follow the advices from similar discussions in web and finally don't know how to proceed. For now i have three grub folders:

  1. (hd0,7)/boot/grub
  2. (hd0,8)/boot/grub
  3. (hd0,8)/grub

(hd0,7) was responsible for boot in the previous partition scheme. It is marked by a star when i do fdisk -l in live mode. New ubuntu, as i understand, placed grub and corresponding things in (hd0,8). I tried to update grub in live mode both for (hd0,7) and for (hd0,8) mounted, but with no result. My last action which led me to unavoidable "Grub 2.02" was the usage of Boot Repair in live mode. There was suspect warning before the start:
"LegacyWindows detected. The boot of your PC is in EFI mode. You may want to retry after changing it in BIOS-compatibility/CSM/Legacy mode. Are you sure you want to continue anyway?" I clicked "Yes".
Boot Repair in the end of its work gave GI exit code: 1.


"LegacyWindows detected. The boot of your PC is in EFI mode. You may want to retry after changing it in BIOS-compatibility/CSM/Legacy mode. Are you sure you want to continue anyway?"

All Os's must be installed in same mode. If windows is installed in BIOS mode, Ubuntu must be too. Apparently you have installed your Ubuntu in UEFI mode.