How to fix being unable to login to Windows XP after you image it
You just copied your Windows XP partition from one drive to another. When you reboot into the new partition, you reach the login screen, but when you try to login, it logs you straight out again with no error.
This happens when the copy of XP you’re imaging sees the new partition before you start the imaging operation. XP assigns a drive letter to each new partition it finds, and stores them in the registry. The drives are identified by the starting sector number of the partition, and the partition’s DiskID, which comprises 4 bytes starting at
0x1B8 in the partition’s boot sector. This means that, even if you move the drive to another controller, or another port on the same controller, it will retain the same drive letter between reboots as the signature will be recognised by Windows and the partition’s existing drive letter will be re-used on startup.
Normally this is the wanted behaviour. When you image a copy of Windows that has already seen the new partition though, you get undesired side effects. If your original drive is C:, then you prepare a partition on a new drive, it will be assigned a letter, say D:. Now when you image the drive, you image the registry as well with both assigned drive letters. When you reboot into the new partition, it still has the letter D: and the original installation still has the letter C:. Unfortunately, all your application and Windows settings still point to C:, because you cloned your C: drive (like the location of the swapfile for example), so having your system drive letter changed to D: will cause the failed login symptom described at the start as Windows fails to find the things it needs to log you in.
The solution is to force Windows to reset the drive letter of the new partition to C:, which you can do by removing the old drive/partition from the system (so it doesn’t get re-assigned to C:), and making it think that the new partition (currently D:) doesn’t exist anymore, so that it will be assigned to C: on the next reboot instead. You can do this by changing the partition signature of the drive so Windows thinks it’s looking at a new drive it hasn’t seen before.
Michal Kawecki has devised an easy trick to corrupt the DiskID of a drive (note: this ONLY works when you want to reset the drive letter to C: – for assigning other drive letters, see the article below). Make a Windows 98 boot disk (here’s a program that will make one for you), boot from your floppy drive and type:
This will overwrite the DiskID, Windows will then forget the old drive letter (thinking the disk no longer exists on the system) and assign the first available letter – C: – to it on the next reboot.
What about Recovery Console?
You might be wondering why you need a Windows 98 boot disk for this. Unfortunately you can’t use
fixmbr from XP Recovery Console, because it doesn’t overwrite the DiskID currently stored, therefore the partition signature stays the same. The version of
fdisk that ships with Windows 98 does.
Multi-Booting with Windows in an Extended Partition gives three solutions to the problem (using Savepart to modify the drive letters, editing the registry and the method described above)