Sunday, August 17, 2014

Microsoft surface pro won't start - stuck in safe mode - solution

Just now my Microsoft Surface Pro after installing some windows updates, only to restart into safe mode.  It attempted to fix the problem but said that it had failed to do so.  Thus begun my 2 hour quest to salvage my tablet from its current paperweight state.

First I checked the error file from the command prompt in safe mode.  This was no easy task, as safe mode seems to start up in its own drive, x:\, so I had to look up how to into c:\.  Turns out you use the "cd /d c:" command.

From there I used the cd command to move to c:\windows\system32\logfiles\srt and opened srttrail.txt.
There I found that windows had found the problem, but no one had bothered to make the code that could fix it.
Root cause found:
---------------------------
A patch is preventing the system from starting.
Repair action: System files integrity check and repair
Result: Failed. Error code =  0xa
Time taken = 1453 ms
At least it tried for 1.453 seconds.  The solution would be, then, to find and remove the offending patches.  After much searching I found you can do this in the command prompt by using the following steps:

Create a text file with a list of the patches installed on your computer, displayed in a table format.
dism /image:c:\ /get-packages /format:table > patches.txt
Open the text file you just created.
patches.txt
Look for the patches with the most recent dates and uninstall them.  Well, this was my first thought, but ultimately it was the patches installed on the 14th (it is the 17th) that were the issue.  Patch names look like this:
Package_for_KB2918614~31bf3856ad364e35~amd64~~6.3.1.4
To uninstall them you use the command:
dism /image:c:\ /remove-package /packagename: /norestart
As an example:
 dism /image:c:\ /remove-package /packagename:Package_for_KB2918614~31bf3856ad364e35~amd64~~6.3.1.4 /norestart
Remove patches for the most recent update day, restart, and if the issue persists, repeat for the next most recent day until the issue goes away.


You can keep both the patches.txt file and the command window up side by side in safe mode thankfully.  I suggest you mark each patch you remove as you remove them.