Bootcamp installation completely messed up, unusable

Hi all,


Need some help getting Windows up and running again on my Late 2015 iMac 5K. Please note that I have a macOS backup and nothing is wrong with the macOS partition. I don't have a Windows 10 backup. There's nothing critical on Windows, just a couple games, but it would be nice to have it up and running again without a clean reinstall, if possible.


It started completely randomly. I'm pretty sure an automatic update must've messed with the boot partition or something, as one night I shut down the computer (and noticed it was updating), and the next day, I booted it and it went straight to the Windows recovery screen.


So, the first thing I did was find Loner T's steps on here on using gdisk to create a new MBR. When I did that, I still got the recovery screen, this time with error 0xc000000f "The Boot Configuration Data for your PC is missing or contains some errors. File: \EFI\Microsoft\Boot\BCD."


Now I didn't have a standalone USB drive on hand to create a Windows 10 image and boot to the installer to use Bootrec.exe, so in the impatience of the moment, did something that I now feel was extremely dumb: I mounted the EFI partition, and copied the BCD file from the Windows 10 Anniversary Update ISO that I downloaded from the MS website, and copied it into the /EFI/Microsoft/Boot folder. This didn't work. I started getting Error 0xc000000e "A required device isn't connected or can't be accessed."


Fast forward to today, I got a standalone USB flash drive and made an image using the aforementioned ISO and booted to it and used Command Prompt to attempt Bootrec.exe /RebuildBcd (and tried the other "fix" ones too). When this didn't work, I tried everything else: Startup Repair, use the USB image to recover, and even tried the MBR steps again to no avail.


In its current state, when I option-boot the iMac to EFI, there are now suddenly TWO Windows partitions that show next to macOS. They both boot to the blue Windows recovery screen showing Error code 0xc0000225, first showing the same "required device" message as above, and if I hit Enter to get it to try again, the message becomes "The application or OS couldn't be loaded because a required file is missing or contains errors." and points to \Windows\system32\winload.efi.


Is there any way out of this, or is Windows completely unrecoverable? If the former, I would appreciate any help I can get. If the latter, I wanted to make sure I can just use Boot Camp Assistant to completely get rid of Windows, cleanly.


Thank you so much in advance!

iMac with Retina 5K display, Windows 10, macOS Sierra 10.12.5

Posted on Jul 17, 2017 9:55 PM

Reply
17 replies

Jul 20, 2017 6:47 PM in response to Loner T

Thanks Loner T. Those commands executed successfully. I've attached a photo of the output of bcdedit after those.


User uploaded file


Tried to boot back into Windows and still seeing the odd two Windows partitions in option-boot (I think they both point to the same partition) and still getting "Error code 0xc0000225, 'required device missing'" message on the first try and "The application or OS couldn't be loaded because a required file is missing or contains errors." pointing to \Windows\system32\winload.efi." when I push Enter to try again.

Jul 20, 2017 10:34 PM in response to Loner T

I booted back into the recovery section of my Windows USB installer and when I run bcdedit in Command Prompt, I get this error message:

"The boot configuration data store could not be opened. The requested system device cannot be identified due to multiple indistinguishable devices potentially matching the identification criteria."


Poking around online, I see that this can happen when it sees multiple EFI partitions, which I indeed confirmed through diskpart. I found this link – Issue with a Windows 7 Boot issue - involving the BCD perhaps - Super User– but I'm not quite following.


Can you please walk me through the commands I would use here? I've attached some diskpart output that I was using as reference. My iMac has a Fusion Drive, and WINREC is the USB drive I'm booted off of.


User uploaded file


Once that is taken care of, am I understanding you correctly in that I would then want both the Boot Manager and Boot Loader sections' Device field to say partition=\Device\HarddiskVolumeN, where N is the same for both and is the volume of the EFI we are left with after solving the aforementioned issue?


I really appreciate your patience and guidance in this issue and you are being a massive help, just as you have been to so many others. Thank you so much for helping me out here in these frustratingly cascading issues.

Jul 28, 2017 8:16 PM in response to Loner T

Hi Loner T,


Thanks for your guidance.


As a reference, please note that referencing the screenshot in my post above, Volume 1 was assigned R: and Volume 2 was assigned S: using Diskpart.


It appears that I have two EFI/Microsoft partitions!


User uploaded file

I poked around a bit and it appears that R: has a Boot/BCD and S: has the Boot/BCD that I originally tampered with, that I renamed to BCDOLDER while I copied the clean one from the installation media (as I mentioned in my very first post, probably the cause of all this).


User uploaded file

User uploaded file


How would you proceed from here? I would imagine that mounting that EFI and putting BCDOLDER back probably won't help much. Additionally, it seems like we have to eliminate or at least force Windows to use only one of these EFI partitions. This would also explain why I get two Windows partitions showing when I hold option and boot.


Thanks again!

Jul 18, 2017 3:54 AM in response to benz_guy

On a 2015 Macs, MBRs should not be created since the Mac does not support legacy BIOS installation of Windows. It should be EFI. Remove the MBR using Gdisk.


Can you post the output of


bcdedit


It will list the current Boot and Recovery entries. You can use sfc (System File Checker) to correct issues with winload.efi.


Please post back if you need specific commands for any of the steps.

Jul 18, 2017 12:17 PM in response to Loner T

Hi Loner T,


To remove the MBR, do I use these commands that I found in another post of yours?


sudo gdisk /dev/disk0

x (experts menu)

n (create a new protective MBR and remove the Hybrid MBR)

o (print the new MBR)

p (print the partition table)

w (write)

y (confirm write)


Thanks for offering your assistance. I will post the output of bcdedit when I get home.

Jul 20, 2017 7:02 PM in response to benz_guy

Instead of 'partition=C:' in Windows Boot Loader section use the 'partition=\Device\Harddisk\VolumeN' syntax.


In the two screenshots you have posted, one shows Volume6, the other Volume5. I suggest you verify which is the correct value and choose 'N' as appropriate and test. Use diskpart.exe to find the correct volume as shown in the following link. See BCD System Store Settings for UEFI as an example.

Jul 21, 2017 3:41 AM in response to benz_guy

Your Fusion drive is made of up of two parts, a SSD and HDD, each of which has it's own EFI partition. Using Diskpart (DiskPart Command-Line Options) assign a unique drive letter to each EFI partition you see. Once you have unique drive letters assigned using the assign command, you can exit Diskpart and check each of the two EFI drives for a Microsoft directory. Only one of these should have a Microsoft directory. This is your ESP/EFI partition. Since you have already assigned a drive letter we can use bcdedit and dump the contents of the BCD and check what they are before we make changes. Most likely, your EFI partition is on the HDD part - disk0 - currently.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Bootcamp installation completely messed up, unusable

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.