I reinstalled Windows 8 yesterday. My mistake was deleting the EFI partition, so the entries for Ubuntu have gone. Now, I have lost Grub and my PC boot Windows automatically. There's any way to push the ubuntu entry to the EFI partition to boot Ubuntu again?
The EFI partition just contains a FAT filesystem, so you can mount it, create a directory /EFI/ubuntu and copy /usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed into /EFI/ubuntu/grubx64.efi and /usr/lib/shim/shim.efi.signed into /EFI/ubuntu/shimx64.efi. Now if your nvram boot entry was deleted,m you will need to use efibootmgr to create another. One real benefit of UEFI is that the bootloaders are just files which may be copied around. The other file you will need is a copy of grub.cfg, either the "real" one from /boot/grub/grub.cfg, or a 3 line stub which pulls in the real one, looks like the below, adjust devices as needed:
search.fs_uuid 4e9797fa-2b51-4c8f-9a5c-37ee2cbf88ad root hd0,gpt7 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg