Windows 8.1 EFI partition rebuild not working

0

1

It all began when I deleted the partition of an old Linux that was dual-booted with Windows 8.1 UEFI. This Linux system was using the Grub2 bootloader and was installed on a secondary disk.

After rebooting grub was thrown in the rescue shell because it probably could not find it's files that were on the deleted partition.

I tired to fix the issue by booting off a Windows 8.1 CD (booted as UEFI) and attempting various things:

  • Automatic startup issue fixing from recovery options. This failed.

  • Executing bootrec with /fixboot and /fixmbr. This said that it completed, but did not change anything.

  • Executing bootrec /scanos. This said that there were 0 Windows installations found. As a result bootrec /rebuildbcb did nothing useful aswell.

  • Manually rebuilding the BCD. Assigned the EFI partition to drive letter V: and deleted the contents of it (it still contained files from grub). Then executed bcdboot C:\Windows -l de-DE /s V: /f ALL. This was successful and actually did change booting behaviour, but gave me the error below.

How do I boot into Windows again?

The bootloader error:

Your PC Needs to Be Repaired

The application or operating system couldn't be loaded because a required file is missing or contains errors.

File:\Windows\system32\winload.exe
Error code: 0xc000000e

You' ll need to use the recovery tools on your installation media. If you don't have any installation media (like a disc or USB device), contact your system administrator.

Output of diskpart list vol:

DISKPART> list vol

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     F   ESD-ISO      UDF    DVD-ROM     3182 MB  Healthy
  Volume 1     C   850 Pro      NTFS   Partition    237 GB  Healthy
  Volume 2         Recovery     NTFS   Partition    300 MB  Healthy    Hidden
  Volume 3                      FAT32  Partition    100 MB  Healthy    Hidden
  Volume 4     D   Vertex 4     NTFS   Partition    204 GB  Healthy
  Volume 5     E   Garbage      NTFS   Partition    232 GB  Healthy

Output of bcdedit:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume2
path                    \EFI\Microsoft\Boot\bootmgfw.efi
description             Windows Boot Manager
locale                  de-DE
inherit                 {globalsettings}
default                 {default}
resumeobject            {1xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
displayorder            {default}
bootsequence            {default}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {default}
device                  partition=C:
path                    \Windows\system32\winload.efi
description             Windows 8.1
locale                  de-DE
inherit                 {bootloadersettings}
isolatedcontext         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \Windows
resumeobject            {1xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
nx                      OptIn
bootmenupolicy          Standard
detecthal               Yes

typ1232

Posted 2015-06-11T14:56:34.267

Reputation: 653

Did you try running Startup Repair again after getting this latest bootloader error? – Karan – 2015-06-11T15:05:36.937

@Karan Yes I tried that, but it still fails. Looking at the logfile SrtTrail.txt it does not show any errors. Bottom line says that it succeeded starting the OS. – typ1232 – 2015-06-11T15:14:29.053

Answers

1

Using anything that will boot (an Ubuntu live CD, for instance), access your EFI System Partition (ESP) and rename or delete the directory that holds your GRUB file(s). For instance, if you installed Ubuntu, the files would be in EFI/ubuntu; if you installed Fedora, they'd be in EFI/fedora. Once you've done this, the firmware won't be able to find GRUB because the pointer in NVRAM will be to a filename that's no longer valid. The firmware should then skip that entry and move on to the next valid one, which should be for Windows.

Rod Smith

Posted 2015-06-11T14:56:34.267

Reputation: 18 427

As my last step said, I completly deleted all contents of the EFI partition before building the BCD. This results in basically just deleting the "EFI/distro" and modified BCD file, as the bcdboot tool copies all required files to the partition again. I verified this by comparing to a backup of the partition. – typ1232 – 2015-06-12T23:06:38.987

As an additional note: I'm currently able to boot to Windows after installing Debian Jessie with the installer tool on a small partition. So it seems like the BCD is fine or grub just handles it better than the Windows bootloader. – typ1232 – 2015-06-12T23:10:27.133