Fix Boot Configuration After Failed Windows Update
This is a note for myself, to help keep track of what I did to fix this problem, in case it should happen again. I've shared it in the hope that it will point someone else in the right direction. While I've been using Windows for decades, and I've been a software developer even longer, I don't claim to be an expert in system administration. If this helps even one other person, I'll be delighted!
Last night, when I tried to shut down the Shuttle I use as my media PC and catch-all file-server, I got a warning that someone else was using my computer. I chose to ignore this and shut down anyway.
This morning, I discovered the machine would no longer boot. Instead, I was faced with this dreaded message:
"The Boot Configuration Data file doesn't contain valid information for an operating system".
File: \BCD
Status: 0xc0000098
I was presented with standard Windows 10 recovery options, which allowed me to open a command prompt. Poking around, I quickly discovered that my C: and D: drives had been reversed. I ran diskpart, and the "list volume" command confirmed that D: was now pointing at my system partition.
Why would Windows automatically switch my C: and D: drives? I don't know for sure. In hindsight, I think my shutdown may have interfered with Windows Update -- in a bad way. Somewhere in the automatic recovery process, volume 0 was automatically assigned the drive letter C:, even though volume 1 is supposed to be C:, and volume 0 is supposed to be D:. Just a theory.
For starters, I wanted to fix my drive letters. In order to swap C: and D:, I opened a new diskpart session and entered the following commands to swap drive letters:
list volume <-- this will tell you which volumes to select in order to swap your drive letters
select volume 0
remove letter=C
select volume 1
assign letter=C
select volume 0
assign letter=D
I tried rebooting, but I was still faced with the same "Boot Configuration Data" error. And my drive letters were swapped again! I reran the above commands to swap my C: and D: drives, then stepped away to learn a little more about what might be happening.
Research pointed me to rebuilding my boot configuration via "bootrec /RebuildBcd", but this failed because it couldn't find "C:\boot\bcd". Further research led me to this article, and running "bcdboot c:\windows" did the trick.
After restarting my computer, I saw the usual Windows 10 update screen, with a percent-complete number to reflect progress. Back in business.
If you found this helpful, you'd like to thank me, and you enjoy reading science fiction, consider buying my book! More info here.