If You will remove your windows EFI partition by mistake, this method could help You. It will work only, if rest of Windows partitions are OK.
You will need:
- another Windows machine
- USB drive
Go to another windows machine and copy EFI folder (contains Microsoft folder and rest of important files inside). Around 20 MB. Probably you will need to temporary assign letter to that partition.
Copy mentioned files to your /boot/efi partition.
In my case it looks like that:
Add Windows boot entry - edit /etc/grub.d/40_custom and add:
insmod part_gpt
insmod fat
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint- efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 UUID
else
search --no-floppy --fs-uuid --set=root UUID
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
hd0,gpt2 - it is your efi partition UUID of your efi partition
You need to prepare Windows recovery usb, Windows installation usb is also OK if you have one. Go to another windows machine, open control panel and type "recovery". Chose upper option and prepare usb drive.
Boot using your new USB and choose:
- Advanced Options
- Command prompt and type: bootrec /rebuildbcd
Scanning all disks for Windows installations.
Please wait, since this may take a while...
Successfully scanned Windows installations.
Total identified Windows installations: 1
[1] D:\Windows
Add installation to boot list? Yes<Y>/No<N>/All<A>:
Confirm and you are done.