How to restore windows 10 boot after Microsoft folder has been deleted from the EFI partition?

7

5

I had to resize my EFI partition and formated it, it deleted the Microsoft folder in it and I am no longer able to boot on windows 10. I'd like to restore the boot ability on windows 10.

I went into the recovery mode command line in the windows 10 disk and typed bootrec /rebuildbcd it found my windows 10 install and said the reconstruction was successful, however I can't boot on the entry it creates in the efi boot menu (nothing happens when I select it). Any idea on how to repair windows 10 boot ?

ChiseledAbs

Posted 2016-01-27T19:03:16.183

Reputation: 715

Answers

8

You CANNOT fix a EFI boot with /fixmbr. That will screw up your GPT disk and return it to MBR two different beasts.

To fix EFI boot load your Windows USB using the function key to get to setup menu click allow EFI USB.

A box comes up wanting to upgrade click NO.

The Windows install window then comes up, click NEXT Repair Computer > Troubleshoot... > Advanced > Command Prompt

At the command prompt:

diskpart
list disk  /* rem with a USB and HDD you will only have two selections
sel disk 0 
list vol
sel vol    /* rem look for SYSTEM FAT32 hidden ~100 MB mine was sel vol 3 yours maybe different
format fs=fat32 quick label=(optional)
list vol   /*rem look for and remember which Volume Windows is C or D ?
exit
/* then...
bcdboot C:\Windows

Now here if it hangs up after a minute hit CTRL + c. (I don't know why it does this sometimes but you will get a message boot files successfully created and it will boot just fine into Windows.)

exit

Click on Turn Off Computer, Remove USB and restart.

knotheu

Posted 2016-01-27T19:03:16.183

Reputation: 81

5

(This is an update on knotheu's excellent answer.)

An EFI boot must be repaired with the proper tool. (The mostly-legacy MBR-BIOS disk setups would use the fixmbr tool.)

To fix an EFI boot either boot into the Windows Recovery Environment by:

  • using the UEFI-defined function key too boot the Win RE partition (if your computer has one)
  • using a USB recovery drive to boot Win RE (hopefully the reader had the foreknowledge to create this) [additionally an UEFI setting may have to be edited to allow a USB device boot priority]

When Win RE has booted, get to the command prompt by something akin to: Troubleshoot…Advanced OptionsCommand Prompt. From there:

diskpart               # disk-partition editor/formatter…
list disk
select disk [0-9]      # the EFI System partition is usually on disk 0
list partition
sel partition [0-9]    # the EFI _System_ partition is usually the first [1]
detail partition       # details if formatted, healthy, _System_ partition
  ! the next command nullifies any current data on the partition !
  I had to do this because my partition showed RAW, `chkdsk` lacked success,
  zero files were on it; though this method did work for me to restore
  Windows booting, I would recommend try to fix the boot partition first.
format fs=fat32 quick label=System
list vol               # disk label "Windows" to determine disk letter
exit

With the System partition formatted and the knowledge of the Windows directory disk letter, the next step is to copy the the boot files to the EFI System partition and I believe the NVRAM gets updated:

mountvol S: /S                       # the System partition mount to S:
bcdboot c:\windows /s s: /f UEFI /v  # `bcdboot c:\windows` may be enough
                                       /s for mountpoint, /f for firmwaretype
                                       /v for verbose
exit                                 # then rm USB is used, reboot

Todd Partridge

Posted 2016-01-27T19:03:16.183

Reputation: 235

One thing you forgot was to label the partition like so: assign letter=S – Dr. Tyrell – 2017-12-10T19:47:54.450

-2

Did you do the rebuildbcd in the following order? (press enter after each one)

  1. BOOTREC /SCANOS
  2. BOOTREC /FIXMBR
  3. BOOTREC /FIXBOOT
  4. BOOTREC /REBUILDBCD

if the bootrec /rebuildbcd results in

Successfully scanned Windows installations. Total identified Windows installations: 1

[1] D:\Windows Add installation to boot list? Yes/No/All:

And it's not working after, try the following:

  • chkdsk /r

After the check disk is completed, you may try booting the computer and check if that resolves the issue. If not,

  • SFC /SCANNOW command to rebuild or recover the corrupted system files on the computer.

Reboot & Check

HydroxCookieHoax

Posted 2016-01-27T19:03:16.183

Reputation: 125

1FIXMBR is likely to screw everything on GPT disks. – mirh – 2017-03-19T14:48:04.287