Windows XP Logs Off Immediately after clone

November 9, 2010 at 00:17:27
Specs: Windows XP
Here is a problem previously discussed here, but one possible cause was never identified.

I prepared a pristine installation of XP on a backup hard drive, and then cloned it onto my main working drive which is newer and faster.
When booting into the new clone, XP presents the login screen, but after I log in, it logs me off immediately.
The problem lies in the way XP's registry keeps track of what volumes get what drive allocation, stored in the System registry at
There are a buch of keys that look like \DosDevices\{Drive letter}:, and they store a binary value represented by 24 HEX characters, which stores mounting location and LBA location for each partition. The problem is that this information was relevant for when I booted from the master image partition, but no longer relevant for the clone on the target partition. In other words, the logging in couldn't proceed because the computer couldn't find C:\

I think it's a good idea to delete the \DosDevices\C: key prior to cloning. XP *should* figure it out retrospectively. But presumably you're reading this now because you didn't do this. so what you have to do is edit the SYSTEM HIVE on the new target partition remotely from another installation of XP:

Firstly, you need an alternative installation of XP to boot from that can directly access the partition that you're trying to boot into (such as the master image partition). Once this is done:

Then, you can discover the correct HEX code for this partition:
1. Open diskmgmt.msc and make a note of the drive letter allocation of the target partition. (it won't be C:\)
2. Start REGEDT32
3. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\Mounted Devices
4. Search the list for \DosDevices\{The current drive letter allocation}: and make a note of the 24 HEX characters with pen and paper.

Now you can mount the SYSTEM HIVE from the target partition and correct the HEX code:
1. Select the HKEY_LOCAL_MACHINE key in the left hand pane in Regedit.
2. In the File menu select "Registry" -> "Load Hive"
3. Select the wanted registry database file: {The current drive letter allocation}:\%windir%\system32\config\system
4. When prompted for a name, call it SYSTEM-TARGET. The name will be used to create a new node in the tree so one can browse the offline registry.
5. Navigate to HKEY_LOCAL_MACHINE\SYSTEM-TARGET\Mounted Devices
6. Compare the \DosDevices\C: key value to the HEX code you wrote down. If they are different, search through the list of drive letter allocations for the 24 digit HEX code that you wrote down - it will probably be recorded against an alternative drive letter mounting - the cause of the problem. If this is the case:
7. Rename the \DosDevices\C: key to something else, an unallocated drive letter perhaps.
8. Rename the key with the correct HEX code to \DosDevices\C: (You could swap the key names)
(The changes are written immediately to the offline registry database).
9. When finished editing select SYSTEM-TARGET and in the File menu select "Registry" -> "Unload Hive"

Now you should be able to reboot from the partition and login.

See More: Windows XP Logs Off Immediately after clone

Report •

November 9, 2010 at 20:31:29

Thank you very much for sharing the solution since I have the same exact problem. I could use some help with that since I have some valuable info in the newly cloned drive, however, as neat as your post/fix is i'm afraid the language is VERY technical for me to understand. Could you please give it another attempt with an easier terminology so I can benefit from it?

Thanks again


Report •

November 10, 2010 at 06:58:58
I need to make a correction.
I said "I think it's a good idea to delete the \DosDevices\C: key prior to cloning."
But this is not enough because the HEX code for the clone-target partition is already registered against another drive letter allocation, so you need to delete this key too prior to cloning. (You can't just swap the key names prior to cloning as it would prevent you from booting into the master or clone-source image the next time)

Report •

February 1, 2011 at 06:03:31
This worked perfectly. The key is to follow his directions step by step. I used UBCD for Windows. Thanks!

Report •

Related Solutions

Ask Question