Oct 182008
 

I was trying to fix a friends computer recently.  It was a Windows XP machine which would boot up (in both normal and safe mode) and give the error with services.exe:

This application has failed to start because MSVCP60.dll was not found.  Re-installing the application may fix this problem.

And then completely stop loading.  This appeared to begin after a botched SP3 install through automatic updates.  None of the normal tricks for getting into windows would work, so I booted to a Ubuntu live CD (7.04) and took a look at the hard drive.

All of the information was still there, that was good news.  I found a copy of MSVCP60.dll on the harddrive, but it wasn’t in the c:windowssystem32 folder, and hence the error.  So I tried to copy it, but Ubuntu 7.04 Live CD cannot write to NTFS partitions.  Bummer.

So, I copied the file from another computer to a USB key, put that into the Live CD Ubuntu desktop, copied the file to the floppy, rebooted into Windows Recovery mode (from an old Win XP CD I had) and tried to copy the file from the floppy to the hard drive, however I was getting “Permission Denied” errors.

So, I took a look at the C: and sure enough, Windows Recovery Console could not read any files there.  Another bummer.

So, I started downloading a new version of Ubuntu (8.10 beta) in order to get read/write NTFS in the live CD.  While I was waiting, I thought I’d try to fix the boot sector on the broken machine.  I poked around for a bit.  Tried chkdsk but got an error about ‘one or more unrecoverable file system errors’.  Then the fixboot command looked interesting, so I ran it.

DANGER, DANGER!!!

It said it fixed the boot sector, and threw a nice FAT16 table at the beginning, after autodetecting what it was.  Huh?  Now when I search the C:, I get a message, “No Files Found”.

So, when I finally got Ubuntu downloaded and burned, I rebooted and took a look at the partition.  Double click…and nothing.  Can’t read the media.  I opened it Gparted partition editor, and sure enough, a nice 300GB FAT16 partition that cannot be read.  Well at this point I began to get worried.

I decided to take the machine home for the night, as I had more tools available there.

I knew that there was a backup boot sector on the drive, and what I had to do was to restore that.  But with what?  I did some searching and came across TestDisk.  I had used this in the past to try and recover an ext3 partition, but with no success.  Then I started poking around at a rescue CD that included TestDisk.  Ubuntu Rescue Remix is one of the rescue disks I cam across.  I also download Knoppix, but URR finished sooner because it was a much smaller ISO, so my success was with that one. 😉

Booted on the rescue disk.  It gives you a nice console.  Ran:

sudo testdisk

And started to get to work.  The drive was detected properly, always a good start.  I then scanned for partitions, there were 3 listed (actually only one on the drive) in the table, and they overlapped, which is not possible.  The application knew something was wrong, and did a slightly deeper scan and detected one NTFS partition that took up the whole drive.  I wrote this information to the disk.

I think I actually had fixed it at this point, but I kept on poking around.  I went back to the main menu, and went to the advanced tools.  I took a look at the boot sector recovery.  The detection showed both the master and backup being the same.  Not sure if when I rewrote it, it rewrote the backup too (that would make sense), but after writing once, the backup seemed unavailable as an option.

I then scanned the MFT to rebuild it if needed, but it was identical to what the application was going to reinstall.  So nothing to do there.  I rewrote the boot sector again, and then rebooted. (Have to take the CD out at this point, the boot menu gives you the option to boot to the hard drive, but that wouldn’t work for me)

I rebooted and got this error:

This application has failed to start because MSVCP60.dll was not found.  Re-installing the application may fix this problem.

Yeah!!!  Windows lives.  So, I rebooted, went into the new Ubuntu Live CD (8.10 beta) I had burned earlier and tried to access the drive.  No go.  Windows didn’t let go of it properly when it locked up.  Which isn’t a surprise really.  Ubuntu told me what command to use to force it to mount:

sudo mount /dev/sda1 /media/testdisk -t ntfs-3g -o force

I’m pretty sure that was it (from memory now).  /media/testdisk is a directory I created in order to mount the drive.

Mount successful.  File copy successful.  Rebooted, and Windows loaded!

It looked horrible.  The graphics driver was missing, probably killed in the botched SP3 upgrade.  There were still file missing errors, but I was able to get to the desktop.  I copied the files that were missing from somewhere else on the drive, back to c:windowssystem32 to make those errors go away.  I tried to download new video drivers, but Flash was also corrupted beyond repair it crashed all of the browsers when they loaded. All the websites that had the drivers (and the default homepages) used flash.  So I uninstalled flash, download new flash, and video drivers, installed both, and all is good.

The moral of the story, NEVER USE FIXBOOT!