Monday, March 27, 2017

Solid State Drive (SSD) Upgrade - Part 2 of 2

A journey from Windows .vhd to .img to SSD to HDD to .mrimg to SSD to Windows.

"If you have it, then you won't be in need of it." Preparedness can keep bad situations from turning catastrophic. Along with preventative maintenance, routine backups are two important but neglected tasks for users. Most personal computers no longer come with operating system installation disks. A rescue partition with a recovery utility is all you get, now. That might be okay for some situations. However, if the entire disk is replaced, then there's no recovery utility to boot.

Fortunately, Windows 7 (and higher) has a native backup utility called Recovery. It's accessible through Control Panel as Backup and Restore. It can make a repair disk (CD) and a full system image.

While in the OS, you can even choose to reinstall Windows. The recovery disk alone can't do that (it's just a bootstrap environment with some disk check utilities). You'll also need a source of installation files, such as a complete recovery partition or existing installation of Windows. That's great, unless you've replaced your system's HDD (including its recovery partition) with a blank SSD. I'm a fairly responsible user, so I keep system images (backup copies of the entire disk) ready. After the swap, I launched the System Recovery disk and plugged in my external storage with my backup image.

And, that's when this all went south. The first Google hits for this error were a bunch of dead ends. Most people were just encountering a USB 3.0 driver issue. I knew Recovery could access my backup image on the external drive:

The .vhd is clearly there. Unfortunately, Recovery has no means of manually selecting a particular image. It must be doing integrity checks to decide which backups are "valid" and can be "found." After some deep searching, I found a post by Schneider on Super User:
The following changes will cause the backup not to be recognized...
  1. If you delete or modify the MediaId file from the root
  2. Delete or modify the Catalog/GlobalCatalog file (deleting the BackupGlobalCatalog seems to have no effect)
  3. Rename the Backup <Date> folder to anything else (such as changing it by 1 second)
  4. If its not inside D:\WindowsImageBackup\<PC-NAME>\ folder
Whatever the case, Recovery wasn't going to let me copy my image using the native Windows utility. So, I busted out my copy of Hiren's Boot CD and tried to find something that could help.

Clonezilla looked promising. It had a built-in .vhd to disk utility. Unfortunately, it wrote the data but the system wasn't bootable. It also had a .vhd to .img, which I then copied to the SSD. Still didn't work.

Some forum guys recommended Macrium Reflect. I gave up on my Windows-made .vhd and opted to image my old HDD using Reflect. I swapped the HDD back in and made an .mrimg. I swapped the SSD back in (my USFF tower only has one SATA connector). I partitioned the SSD to match, and used Macrium to write the .mrimg. That kind of worked.

Windows wasn't bootable, but I could see all the right files in the right places. So I put the Windows Recovery disk back in, and managed to convince it that I had an existing installation that just needed fixing. So, it offered to reinstall. Let's do it!

I buttoned everything up, spent hours installing software, and copied personal files from my backup-backup location. I have to say, SSD is remarkably faster. It only took VeraCrypt about an hour to encrypt the entire drive. The old HDD took overnight for less storage.

This got me wondering about two things. First, why did my Windows image fail? Second, was this re-installation method legal?

To study my first question, I made a fresh Windows Recovery image on the newly finished system and immediately rebooted into the Windows Rescue Disk. No joy--Windows still "cannot find a system image." I didn't change anything, so there's no good reason for that to happen. I won't be relying on Recovery, anymore. Maybe I'll switch to Reflect since it really pulled through for me.

The second question reminds me of an existential thought exercise. If a broom's worn head is replaced with a new one, is it still the same broom? What if the repaired broom then has its handle replaced? How much of the original system can we swap before it is no longer the original? Does a new hard drive make a new computer? The OEM Windows license is for a single computer. I wonder if some of the imaging failures are meant to prevent unauthorized copying. Anyway, I'm not a lawyer. As far as I'm concerned, my Windows license is still on the same computer it was originally installed on... merely faster.