Transferring Vista
Friday, April 25th, 2008When I installed Vista to try it out, I only created a 20GB partition for it. Now completely out of free space for that system drive, I wanted to copy the installation over to a 30GB hard drive (Wow, I know). A search on Google turned up a very promising result; Howto: Duplicate any Windows installation to a new hard disk using only a Vista DVD (!)
This was excellent because all the tools you need to copy a Vista (or XP I’m guessing) installation to another hard drive is included in the Vista install DVD. First, I booted up the Vista DVD and selected English for the language, then clicked Install (one reason this took so long is because it takes at least 5 minutes to go between these screens). Then Shift+F10 brought up a command prompt. Another way to do this is to click repair instead of install and go to the advanced tools.
A quick use of Diskpart allowed me to identify the correct hard drive. I followed the instructions and created a new active partition on the 30GB. I then ran the command
ROBOCOPY C:\ I:\ /e /efsraw /copyall /dcopy:t /r:0 /XJ
which proceeded to copy the whole contents of C drive, including hidden and system files to my bigger hard drive, I. I didn’t pay much attention to what the switches meant, but XJ helps by not copying certain Unix like shortcut/links present in user data.
When the copying finished, I restarted and made sure to boot from the 30GB. At first, a black screen the with word GRUB was all that happened. The hard drive had previously been used for Fedora 8, and the damn thing was still on there. So I booted back into the Vista DVD command prompt and ran the command ‘bootrec /fixmbr’ which had the Vista bootloader working again.
I restarted again. It had worked! But wait – not really. My 30GB had now been assigned drive H, while my original C drive had kept it’s original letter assignment. Hmm. My computer showed that C drive was still the system drive, so I had still booted into the old hard drive, and I was still out of free space.
Not having a very good knowledge of Windows’ startup processes then led me to miss the actual problem, and I proceeded to try and fix the problem with the registry. Disk management was not letting me change the drive letter assignment of the system drive, so I swapped around C and H drive in the registry key HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices.
Rebooting the system, I how had my bigger hard drive assigned drive C, but it was still not the drive that Vista was running on, as shown by a Windows icon now on drive H. I then tried changing system variables like SystemDrive, SystemRoot, etc. I had successfully changed these values back to C drive, but still Vista would boot from the old hard drive.
Then it occurred to me that it was a boot problem (finally). First I tried disconnecting my original drive. But then it wouldn’t boot at all! There was an error about Winload.exe being missing. I figured this was from all my registry fiddling. OK, so I plugged it back in and booted up, and found a free tool for editing the Vista boot loader (the name of the tool escapes me, but one I didn’t use is VistaBootPRO) The boot entry was set to drive H, so I changed it to C. Simple enough. But when doing this and disconnecting the old hard drive, I got the same boot failure due to missing system files.
I knew of a program to fix missing system files, SFC (system file checker). Running ’sfc /scannow’ in the Vista DVD command prompt yielded some strange error which lead me to believe you could only run the tool in an actual installation of Windows.
After some more googling, my hopes to get this working had been extended by a couple more ideas. I started the process again. I loaded the Vista DVD command prompt without my old SATA drive connected, so that the 30GB would appear as C drive to diskpart. Then I plugged the SATA drive in (hotplugging them works, but keep the power connected the whole time) and ran the ROBOCOPY tool again. This process took about an hour. Then I restarted the computer without the old hard drive plugged in as described by the link provided on that blog.
Unfortunately, this didn’t work either. I was still missing system files apparently. But my last idea was still untested. I went back into the Vista DVD command prompt, and typed the command ‘bootrec /fixboot’ and restarted again without the old hard drive.
Eureka! These many hours and I had accomplished an extra 10GB of system drive storage. But I think the learning experience was worth it.