You have a problem: you have installed an operating system and you have carelessly deleted your EFI partition!
Start up your dilapidated computer with the USB or DVD Windows 10 recovery media in the system.You want to get to the Advanced options screen so that you can open the beloved command prompt.
When the computer boots off the recovery media, pick the Troubleshoot option
Then choose Advanced Options
and head on over to the Command Prompt.
The computer should reboot and you will see a windows that prompts you to enter some statements. And then we will begin put some commands into it.
We’re going to use the built in partitioning tool called diskpart to confirm that:
We have all the right partitions
EFI partition is formatted correctly.
In the black screen that looks like a dark abyss, type:
enter this command to watch how many disks are on your drive.
choose the right using drive. e.g., I have three Drives installed and the 1TB Seagate Drive is which I am operating on and its code is 0, and enter this command:
sel disk 0
Now that the first disk is selected we need to view all the partitions
Verify that the EFI partition is using the FAT32 file system then select the volume and assign a drive letter to it.
Since i’m using Windows 8 from a VirtualBox image you won’t see the FAT32 partition on the screenshot above; but on yours you can select it by noting the Volume Number. Don’t worry, it’s quite easy to distinguish the differences between your computer and mine even if I am not showing an actually narrative picture of mine.
1. Assign the Drive Letter
Let’s say your EFI partition is on Volume 3, the next thing you would type is:
sel vol 3
Then assign an arbitrary drive letter to the parition. Let’s use v.
You should see a message saying: DiskPart successfully assigned the drive letter or mount point.
Exit the diskpart tool by typing:
You should still be in the command prompt but outside of the DISKPART> prompt.
2. Repair the Boot Record
We need to repair the boot record. We can pull that off like so:
cd /d v:\EFI\Microsoft\Boot\ bootrec /fixboot
The CD command tells the command line interpreter to change the directory to the volume label that has the EFI boot record.
Then the bootrec /fixboot command attempts to repair the selected volume.
Alright, still with me?
3. Rebuild the BCD store
Now we need to recreate the Boot Configuration Data (BCD) store, so let’s backup the existing store first
ren BCD BCD.old
Now that we backed it up, let’s recreate the BCD store:
bcdboot c:\Windows /l en-us /s v: /f ALL
BCDBoot is little tool that lets you manage the system partition files. In plain english, this command says:
Hey Windows, I’m going to use C:\Windows as the source for copying all my boot-environment files and I’m going to use the English locale and select the volume letter that begins with v:
The /f ALL thingy updates all the BIOS settings.
Now remove the recovery media and reboot and you should be all set.