web analytics

Fixing a Corrupted UEFI Partition in Windows 8 or 8.1 We get this question often lately. Here’s the scenario: I was trying to re-size or copy my UEFI (Unified Extensible Firmware Interface) for one reason or another and now I can’t boot my Windows 8 or 8.1 PC. There are some free software solutions out there some seem to work some don’t. Most often when we receive this question the user has tried to use the Windows Copy command and the Windows Disk Management Tool (WDMT) to copy the UEFI partitions contents to larger partition, then uses the WDMT to delete the old UEFI partition then re-size the new one, set the new UEFI partition to active and then re-boot. This is were the trouble starts. At this point the BCD store is corrupted and the system will not boot. Here is a fix that I hope will help. Firstly, boot from a Windows 8 recovery drive (CD/DVD/USB). If you don’t have a recovery drive (and this is likely because most new machines don’t come with one), then you will either have to install the drive into another Windows 8 machine or obtain a Windows 8 recovery drive, or boot from the recovery partition of the boot drive (If this option works at this point). Don’t even bother with the automated recovery process, it will not work as it cannot find a Windows partition. You will need to choose the language and time settings. Choose ‘Repair Your Computer’. Choose ‘Troubleshooting’. Choose “Advanced Options’. Next choose ‘Command Prompt’. Next, we’re going to use the DISKPART tool to verify that the UEFI partition has a drive letter assignment. Enter ‘DISKPART’ (Enter) (In this test case we removed all other drives except the boot HDD and DVD, so we know the disk 0 is our boot HDD) DISKPART> sel disk 0 Disk 0 is now the selected disk. DISKPART> list vol There was no drive letter assignment to our UEFI partition (volume 3) so we need to assign a drive letter. DISKPART> sel vol 3 Volume 3 is the selected volume. DISKPART> assign letter=E: DiskPart successfully assigned the drive letter or mount point. Exit DiskPart tool (Enter EXIT) Next, we need to change to the boot folder on the UEFI volume. Change to the UEFI volume into the boot folder. Depending on the way Windows was installed this path maybe one of the following. cd /d E:\Boot\ cd /d E:\EFI\Microsoft\Boot\ cd /d E:\ESD\Windows\EFI\Microsoft\Boot\ Now we will need to enter three command lines to repair the BCD store. Again depending on the way Windows was installed these may not all be necessary, however command lines are are unnecessary will not affect the outcome. bootrec /fixboot bootrec /fixmbr bootrec /rebuildmbr That’s it, if all went well the BCD store should be repaired, and the system will once again boot.

We get this question often lately. Here's the scenario: I was trying to re-size or copy my UEFI (Unified Extensible Firmware Interface) for one reason or another and now I can't boot my Windows 8 or 8.1 PC. There are some free software solutions out there some seem to work some don't. Most often when we receive this question the user has tried to use the Windows Copy command and the Windows Disk Management Tool (WDMT) to copy the UEFI partitions contents to larger partition, then uses the WDMT to delete the old UEFI partition then re-size the new one, set the new UEFI partition to active and then re-boot. This is were the trouble starts. At this point the BCD store is corrupted and the system will not boot. Here is a fix that I hope will help. Firstly, boot from a Windows 8 recovery drive (CD/DVD/USB). If you don't have a recovery drive (and this is likely because most new machines don't come with one), then you will either have to install the drive into another Windows 8 machine or obtain a Windows 8 recovery drive, or boot from the recovery partition of the boot drive (If this option works at this point). Don't even bother with the automated recovery process, it will not work as it cannot find a Windows partition.
  1. You will need to choose the language and time settings.
  2. Choose 'Repair Your Computer'.
  3. Choose 'Troubleshooting'.
  4. Choose "Advanced Options'.
  5. Next choose 'Command Prompt'.
Next, we're going to use the DISKPART tool to verify that the UEFI partition has a drive letter assignment. Enter 'DISKPART' (Enter) (In this test case we removed all other drives except the boot HDD and DVD, so we know the disk 0 is our boot HDD) DISKPART> sel disk 0 Disk 0 is now the selected disk. DISKPART> list vol There was no drive letter assignment to our UEFI partition (volume 3) so we need to assign a drive letter. DISKPART> sel vol 3 Volume 3 is the selected volume. DISKPART> assign letter=E: DiskPart successfully assigned the drive letter or mount point. Exit DiskPart tool (Enter EXIT) Next, we need to change to the boot folder on the UEFI volume. Change to the UEFI volume into the boot folder. Depending on the way Windows was installed this path maybe one of the following. cd /d E:\Boot\ cd /d E:\EFI\Microsoft\Boot\ cd /d E:\ESD\Windows\EFI\Microsoft\Boot\ Now we will need to enter three command lines to repair the BCD store. Again depending on the way Windows was installed these may not all be necessary, however command lines are are unnecessary will not affect the outcome.
  1. bootrec /fixboot
  2. bootrec /fixmbm
That's it, if all went well the BCD store should be repaired, and the system will once again boot.  

How can I repair the Windows 8 EFI Bootloader?

Firstly, boot from a UEFI Windows 8 recovery disk (CD/DVD/USB) - I found that the automated recovery process didn't find the correct Windows partition, nor when I managed to add it to BCD settings would it make it reliably bootable e.g. using BCDEDIT I got it to find and launch the Windows partition but it refused to cold boot or would not "keep" the settings after a 2nd reboot or power off. Go into the Advanced options and run the Command Prompt. Enter diskpart to use the DiskPart tool to ensure you have all the right partitions and to identify your EFI partition - the key thing here is that your EFI partition is formatted as FAT32:
DISKPART> sel disk 0

Disk 0 is now the selected disk.

DISKPART> list vol

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     E                       DVD-ROM         0 B  No Media
  Volume 1     C                NTFS   Partition    195 GB  Healthy    Boot
  Volume 2         WINRE        NTFS   Partition    400 MB  Healthy    Hidden
  Volume 3                      FAT32  Partition    260 MB  Healthy    System
Then assign a drive letter to the EFI partition:
DISKPART> sel vol 3

Volume 3 is the selected volume.

DISKPART> assign letter=b:

DiskPart successfully assigned the drive letter or mount point.
Exit DiskPart tool by entering exit and at the command prompt run the following:
cd /d b:\EFI\Microsoft\Boot\

bootrec /fixboot
Delete or rename the BCD file:
ren BCD BCD.bak
Use bcdboot.exe to recreate BCD store:
bcdboot c:\Windows /l en-gb /s b: /f ALL
The /f ALL parameter updates the BIOS settings including UEFI firmware/NVRAM, /l en-gb is to localise for UK/GB locale. The localisation defaults to US English, or use en-US. Reboot and cross your fingers. This gave me headaches. I was going in circles for a long while. There isn't a lot of reliable info about fixing UEFI/Windows 8 at the time of writing. To re-enable Hyper-V, I also had to run the following from an Administrator Command Prompt within Windows after rebooting:
bcdedit /set {default} hypervisorlaunchtype Auto
bcdedit /set {default} nx OptIn