I installed Ubuntu alongside windows but it still booted into the windows loader. Then I created an ESP partition and marked it as boot through GPARTED and ran boot repair which got me into Ubuntu.. which was nice..
The records created for windows gave the invalid efi file error so added records to custom_40 but trying these either (a) do nothing for a second and returns to grub or (b) the bootmgfw.efi file is the grub menu after boot repair?
Please find the full information here
There are no backups of bootmgfw.efi or bootx64.efi just a .grb file for each and all files are the same size. Is there a way of creating a correct bootmgfw.efi (what is mentioned as bootmgfw.efi.bak in other threads) instead of what I think is just a copy of /boot/efi/EFI/ubuntu/grub64.efi? I would prefer not to look into restoring the machine to it original state (if possible) and trying to install Ubuntu again correctly.