Tuesday, 17 September 2013
Last week I decided to upgrade my systems to Windows 8.1.
I started by first upgrading a test Virtual Machine and that proceeded without any fuss. With that successful test I moved onto my Asus tablet, as if that went wrong there would be no serious harm done and it wouldn't take very long to get it back to it's current state. But again that went well and after about an hour it was happily running Windows 8.1, and so I got my first taste of the new OS using touch.
The next machine to upgrade was my desktop, given that it's got a lot of software installed on it and is my main workstation I decided to wait until the weekend to upgrade it. Saturday duly rolled in and so I started the machine and kicked off the upgrade, half an hour later it stopped rolled back to the previous state (I'm impressed with how well it does that by the way) and reported an error.
Unfortunately all the error said was code 0x8007002c, not very helpful and after a little search on the internet I soon found that all it means is that the setup failed and you should try again. I looked in the log file and that was the only error I could find. So I did what was suggested and tried again, with the same result.
There was obviously something deeper wrong and so I looked again at the log file and when that didn't proved helpful I looked for anything else and found a second log file called setuperr.log. This one proved more helpful as it gave a different error code 0x8000045d which searches soon showed was an I/O device error, but the log also gave the name of the file that it failed on.
The file was a private key file created by the Microsoft Crypto Api in a folder called c:\program data\microsoft\crypto\rsa\s-1-5-18. The Microsoft Crypto Api is used by different programs and services to encrypt data, in this case this was the private key of a public/private key pair.
My first thought was to delete the file, so once I'd reassured myself that it would be safe to do so (in this case I think all the files in the folder were probably created by my own development activities) I proceeded. But after a pause I got the same error, so there was no doubt that there was some sort of corruption.
With further investigation I discovered that I couldn't delete it, rename it or copy it and so I was basically stuck with this corrupt file that caused the upgrade to fail. But there was something I could do, I deleted all the other files in the folder and then renamed that folder to S-1-5-18.OLD, this worked and then as a further precaution I moved the folder to c:\temp. Moving the folder worked because all that changed in this case were indexes to the 'virtual' location of the file, the file itself remained at the same address on the disk.
I then thought I'd try the upgrade again, and with that file no longer being 'in' the crypto directory it worked!
So now I have Windows 8.1 installed and a file on my disk that I can't do anything with, which is acting as a marker to and is occupying a corrupt area of the disk. Now chkdsk should take care of that, but this is an SSD and even though I did try chkdsk when it started reporting that it would take 15 hours to analyse the disk I gave up. Some time I'm going to look for a tool that's specific to SSDs which might help, but at the moment I'm not too worried, my system is working and that corrupt file is out of harms way.