Installed a new SSD, Windows still boots from the old one
I finally got it working. The missing piece was modifying HKEY_LOCAL_MACHINE\System\MountedDevices in Windows registry to swap the drive letters of the two disks. Here's the full process:
First, as I mentioned in the question, create a new boot menu entry pointing to the new disk. I used EasyBCD for that, but it could have also been done (with some more work) using BCDEDIT - just
/copy
the{current}
entry and set itsdevice
andosdevice
topartition=D:
Launch regedit, select HKEY_LOCAL_MACHINE, then go to File - Load Hive and load
D:\Windows\System32\config\SYSTEM
. It will ask you a name, type anything. Now you can edit the HKLM\SYSTEM section of the Windows install in the other disk.Make sure that you are in the key with the name you provided (otherwise you would be modifying the registry for the current Windows install!) and go to the
MountedDevices
subkey.Swap the contents of the
\DosDevices\C:
and\DosDevices\D:
values. The easiest way to do that is perhaps a three-way rename (...\C: to X, ...\D: to C:, X to ...\D:).File - Unload Hive, close regedit. Reboot.
Select the new entry in the boot menu, verify that you are indeed from the new disk, and party!
At this point you probably want to either set the boot entry for the new disk as the default one, or simply delete the original entry pointing to the old disk.