Windows 7 SFC Errors in Recovery Console CLI

So I decided to fire up the desktop machine today and it went straight into a blue screen,  its running Windows 7 so I decided to reboot and load up the Recovery Console by pressing F8 as the PC was loading to try and run the system file checker (SFC).

What happened next was a little odd and looking around the net it isn’t particularly well documented, its out there in bits and bobs but I thought it might be helpful to tie it all together in one place.

So the scenario here is that I’ve loaded the recovery console and chosen to go into the command line, my end game is that I want to run the SFC.

So your first step might be to run;

X:\sfc /SCANNOW

If you’re hitting the same issues as me there are two things you should notice at this point, firstly that the command prompt is set to some random hard drive letter. Secondly that it throws this error when you try to run that command;

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

In my case its because the X drive is just where the recovery partition has been mounted, obviously its not the boot partition. Next you might try the following command;

X:\sfc /SCANNOW /OFFBOOTDIR=C:\ /OFFWINDIR=C:\Windows

It seems reasonable to assume that this would force SFC to run on the C drive, however you may get this error;

Windows Resource Protection could not start the repair service

Well, thats actually because you’re assuming that the recovery console has mounted the boot drive onto the same drive letter that you normally use, in fact its probably put it somewhere else, to find out you can just run the next command.

X:\bcdedit | find "osdevice"

Nice and simple, this will return where the OS is installed, in my case it returned the following.

osdevice            partition=E:

So now I know where my partition is hiding I can re-run the SFC command above with the correct detail and this time you should find it runs successfully 🙂 Hope this helps someone!

x:\sfc /SCANNOW /OFFBOOTDIR=E:\ /OFFWINDIR=E:\Windows

2 thoughts on “Windows 7 SFC Errors in Recovery Console CLI

Leave a Reply

Your email address will not be published. Required fields are marked *