The drive where Windows is installed is locked on Windows Server 2012

bootwindows-server-2012

Long story short I'm fairly certain our Windows 2012 server lost power while installing updates, and I've now spent the last 30 hours or so trying to get it fixed.

I'm pretty sure I've narrowed the issue down to the fact that the setting of the partitions and/or a corrupted BCD are to blame but so far, nothing I have found online has fixed it and nothing I have found explains clearly enough what needs to be done.

The sequence of issue is this:

  1. Machine will not boot – there is simply an error message that the recovery disk needs to be used
  2. When using recovery disk, automatic repair doesn't work (of course). After many hours of trying many things, I decided to try for a Refresh – however, there is an error message that The drive where Windows is installed is locked. Unlock the drive and try again.
  3. Information online indicates there can be a few reason for this, and everything suggested is summed up at various points in this article:

https://neosmart.net/wiki/the-drive-where-windows-is-installed-is-locked/

  1. Method 3 on that page (using chkdsk) returns no errors and no information.
  2. Method 4 on that page (using bootrec) fails on the final command (bootrec /RebuildBcd) with the message The requested system device cannot be found.
  3. Method 5 on that page appears to work OK, however, the machine still doesn't boot with the same issues and repair options still don't work.

I should point out that method 5 is unclear to me – for example one of the steps says to look for the partition using FAT32, but none of mine are as shown by my attached photos. Another issue is that the tutorial doesn't explain what each step is doing. Am I meant to copying things from the bootable USB? Am I copying from one volume to another? I can't tell what the goal is, so I don't know which drive letters I should be using at which times.

After this, I have tried running sfc /scannow as suggested below by snayob, but when I do this I get a message saying There is a system repair pending which requires reboot to complete. Restart Windows and run sfc again.Of course, I cannot restart Windows. When I reboot, I'm back to the beginning again.

I think what's not clear to me are the following questions:

  1. Do I need to give each volume particular assigned letters? If so, what?
  2. Related to that, the volume listed as C in the image wasn't called C when the machine was running – my main volume was called C, which has the OS installed on it (the one listed in diskpart as D). Similarly, the one listed in diskpart as E was previously called D.
  3. Stupid question, but it's not 100% clear to me which volume is the system volume, though I think it's the one which is 350MB in size. Can anyone tell from the diskpart information?
  4. Is this also the one I should be making "active"?
  5. Overall, is it possible to tell exactly what I need to do here? I'm confident I'm close to getting it running again, but I've also tried everything I can find.

Any help would be greatly appreciated – I've never had to get into this before so everything I know I've learnt in the last day or so.

EDIT

As per suggestions, I tried following the steps here. However, when running the command sfc scannow. I get the error:

There is a system repair pending which requires a reboot to complete. Restart Windows and run sfc again.

Of course, I can't do that. As per the article, I change this command to sfc /scannow /offbootdir=c:\ /offwindir=d:\windows. The output here is:

Resource Protection could not start the repair service.

So I run net start trustedinstaller. This command succeeds, but when I run the sfc /scannow /offbootdir=c:\ /offwindir=d:\windows command, I again get the message about not starting the repair service.

We've now spent a week on this – ridiculous. I was speaking with a friend who manages a huge number of servers and his suggestion as an answer was "Throw away all your Windows servers". He was half joking, but I think we are now at the stage where this is actually the answer – I'll give it another day or so then post that as a solution, because that's what we are going to have to do.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Best Answer

bootrec sometimes fails, but bcdboot could succeed in this case.

see Fix - The drive where Windows is installed is locked.

Related Topic