Thursday, February 7, 2013

Windows 7 "autochk program not found - skipping AUTOCHECK" on cloned drive or resized partition

I cloned my Windows 7 installation using Paragon Partition Manager, Macrium Reflect, and the manufacturer's (Samsung's) bundled migration utility from an HDD to a smaller SSD. Each resulted in booting to a screen that said:
autock program not found - skipping AUTOCHECK
Sometimes I got a Windows logo, and sometimes I got to Startup Repair, but whether they launched automatically or I launched them from a Windows Installation Disc (or USB), they all failed. Sometimes a blue screen (BSoD) appeared shortly after.

It turns out attributes on an MBR disk apply to all volumes on that disk; attributes on a GPT disk apply only to the volumes selected, so this didn't help: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004505

Suspecting the cloning was problematic, I tried shrinking the Windows C volume using Easeus Partition Master, and that resulted in the original hard drive being unbootable as well.

My drive was encrypted with BitLocker, and I decrypted it prior to shrinking as well as prior to cloning. The data was always visible on the partitions. I tried deleting the BLboot partition, which appeared before my "C" partition, but that didn't help at all. It came back with Startup Repair.

Solution:

From here: http://superuser.com/questions/290612/missing-autochk-program-during-boot, specifically this post: http://superuser.com/a/547260, which I saw was posted 23 hours after my ordeal (the following is based on that post):
  • Boot into Windows Installation Disc (or USB) or WinPE
  • At "Install Windows" screen, click "Next", then press Shift+F10 to launch a command prompt
  • Type "diskpart" to launch diskpart, the Windows CLI disk manager
    • In diskpart, type "list volume" to show you what volumes the installer sees
    • You should be able to identify your real "C" volume by its size even if it bears a different letter, e.g, "D"; note this down
    • If you have a BLboot partition, it'll be 100MiB to 2GiB in size, so relatively small
  • Exit diskpart (type "exit") and launch "regedit" (if you lose your terminal, Shift+F10 will get you another)
    • Select "HKEY_LOCAL_MACHINE"
    • Click "File" > "Load Hive" and open the Windows\system32\config\SYSTEM file on your "C" drive and title it "MyOpenHive" (regardless of what letter your installer thinks your "C" drive currently is, remember what you saw in diskpart---if you don't, Alt+Tab to your command prompt and use diskpart to show you what volumes are present; in my case, the BLboot partition was seen as "C" and the "C" partition was "D" to the installer)
  • Expand "HKEY_LOCAL_MACHINE" by clicking the "+" to its left
    • Within you'll see a folder called "MyOpenHive"; another is called "SYSTEM"
    • "MyOpenHive" shows you what your OS thought it saw (not the installer!), while SYSTEM tells you what the installer sees
    • They both have a directory called MountedDevices; check what device in SYSTEM > MountedDevices corresponds to the drive letter your C partition should bear
    • Going by its ID hex letters and numbers, figure out what volume your C drive is
    • Press F2 on an entry to edit its name; if the wrong drive or partition is listed as "\DosDevices\C:", change its letter to something unused, e.g., "\DosDevices\Z:"
    • Ensure the proper volume (comparing volume IDs and whatever else you can) is named "\DosDevices\C:" (it might be named "\volume{volume_id_of_some_sort}\")
    • Click "MyOpenHive" on the left pane and "File" > "Unload Hive"
    • Exit regedit and reboot your system and go through Startup Repair (it might take a few iterations); make sure to remove the installation disc or USB stick
Some posts suggested deleting all the entries found in the "MyOpenHive" hive I opened; that definitely didn't help. Getting the volume ID from the "mountvol" command didn't work either; the correct IDs (or any semblance of a unique ID based on other columns) are best extracted from regedit.