If Windows or linux does not boot or cannot install bootloader, the reason can be corrupted (mecanically) efi-partition, which mostly is /dev/sda2 fat32 partition.
The simply fix is to delete corrupted partition(s) and copy those partitions from an another computer or file using GParted. After that you need to re-install or update the booloader.