Boot Repair – Restore Backup of WinEFI or UEFI

boot-repairbootloadergrub-efiwindows 8

I have a laptop that supports EFI/UEFI. I have Windows 8.1 and Ubuntu 12.04 on it. The way I installed my OSes was like this:

I installed Win 8.1 in the required partitions then Installed ubuntu and installed the boot loader in the same partition that I installed ubuntu. The previous time I did so, I used boot-repair to fix my grub so it would show both windows and ubuntu OSes and it worked. That way Windows were intact and in the case that ubuntu screw up (upgrades) or I screw up (messing with it) I wouldn't have to install Windows all over again. This time tho, boot-repair showed me a message like the following one:

WinEFI or WinUEFI (I'm not sure which one) detected, do you want to backup and rename the files

And like a noob that I am, I clicked yes. Now grub replaced both boot loaders, and no matter which efi entry I select from bios, I get the same grub screen. That didn't happen before, If I had ubuntu efi as primary boot entry I was getting grub and was able to select linux or windows. If I had win 8 boot entry as the primary one. I was getting pure windows.

And FINALLY (I know) the question… boot-repair said that it backed up WinEFI loader or whatever. Does anyone know how I can restore it?

Thanks in advance.

Best Answer

To undo & to rename files to their original names, you just need to tick the "Restore EFI backups" option of Boot-Repair.

I also suggest a full backup of your efi partition.

It looks like boot repair ran its "buggy" UEFI rename function. I am not sure it is always required, but it is for those UEFI that internally hard code UEFI to only boot the Windows efi file. So Boot-Repair renames the Windows file and makes grub2's shim be the Windows file. The UEFI thinks it is booting Windows but is really booting grub2 and then from grub2 menu you can boot Windows.

Then renamed /EFI/microsoft/boot/shimx64.efi to bootmgfw.efi Actual Windows boot file, originally bootmgfw.efi. /EFI/Microsoft/Boot/bkpbootmgfw.efi

With the renamed file you cannot directly boot Windows from UEFI menu as it really is shim. So that is why both UEFI entries boot grub. If you can directly boot Ubuntu entry you do not need the rename.

You can also manually rename files by changing the bkpbootmgfw.efi back to its bootmgfw.efi name.

And you should have another copy: Windows UEFI install should have backup of bootmgfw.efi here: C:\Windows\Boot\EFI\bootmgfw.efi from a working Windows x86_64 installation.

Related Question