Can’t log on after adding a hard drive or breaking a mirror

Your system boots, you specify a valid username and password, and you receive messages indicating a logon in process. But then Windows 2000 displays the logon dialog again rather than displaying the desktop. This behavior can occur if the Windows 2000 boot partition drive letter does not match the drive letter assigned during Windows 2000 Setup. This situation can arise in the following circumstances:

  • You install a new drive, which implicitly changes drive order.

  • You change drive order in the BIOS.

  • You break a system/boot mirror and try to boot from the old former shadow drive with the old primary drive missing or unavailable.

Windows 2000 records drive letters in the registry and reassigns drive letters on the basis of a Globally Unique Identifier (GUID) that it records for each volume. If the GUID changes, it’s possible the original drive letter might not be reassigned to the boot volume. The solution to the problem depends on the cause.

Restoring the original drive configuration

If you added a new drive to the system or changed the order of drives through the BIOS, the immediate solution is to restore the original configuration by undoing what you did. For example, remove the new drive or change its configuration (as in restoring the original SCSI IDs), or restore the original BIOS order. Try these tasks as appropriate to fix the problem:

  • If you’ve added any cloned hard disks to the system, remove them and restart, then try to log on.

  • Restore the BIOS order of drives if you’ve modified the BIOS configuration.

  • Remove any newly added hard drives.

  • For SCSI drives, restore the SCSI ID of the boot/system disk to what it was when you installed Windows 2000.

If you can’t restore the original configuration, you need to modify the registry, as explained next.

Restoring drive ID assignments remotely through the registry

In situations where you can’t make changes in the BIOS or change physical drive configuration to restore the original GUIDs, you must modify the registry to restore the original settings. Since you can’t log on locally through the Windows 2000 GUI, you’ll have to either connect to the system’s registry from another computer on the network or use the Recovery Console locally to accomplish the change.

This option relies on the problem computer being networked and you having the ability to modify the problem computer’s registry from another computer on the network. This example assumes you need to swap drive IDs C and D:

  1. Log on to a Windows 2000 or Windows NT system on the network.

  2. If the problem computer is not part of a domain, map a connection to the computer’s IPC$ share using that computer’s local administrator account, using the following command (include the asterisk at the end):

                         NET USE \\problem_computer_name\IPC$ /user:administrator *
  3. Open Regedt32. Choose Registry Select Computer, then enter the name of or browse to the problem computer to open its registry.

  4. Open the registry key HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices.

  5. In Regedt32, select the MountedDevices key and choose Security Permissions. Verify that the Administrators group has full control.

  6. Close Regedt32 and open Regedit, then locate and open the HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices key.

  7. Locate the drive currently assigned as the boot drive ID (in this example assume \DosDevices\C:). Right-click \DosDevices\C: and choose Rename. Rename the entry to \DosDevices\Z: to make C: available for the correct boot drive.

  8. Rename the correct boot drive to \DosDevices\C: substituting the appropriate drive ID if your installation originally booted from a drive other than C.

  9. Rename \DosDevices\Z: to whatever drive letter is appropriate for your installation, such as \DosDevices\D:.

  10. Quit Regedit and start Regedt32, then set the permissions on the MountedDevices key back to its original settings for Administrators.

  11. Close Regedt32 and restart the problem computer to verify that you can now log on.

Restoring drive ID assignments locally through the registry

If you prefer to do the majority of the registry editing locally rather than across the network, you can make one change from across the network, then make the remaining changes locally:

  1. Log on to a Windows 2000 or Windows NT system on the network.

  2. If the problem computer is not part of a domain, map a connection to the computer’s IPC$ share using that computer’s local administrator account. Use the following command (include the asterisk at the end):

                         NET USE \\problem_computer_name\IPC$ /user:administrator *
  3. Open Regedt32. Choose Registry Select Computer, then enter the name of or browse to the problem computer to open its registry.

  4. Open the key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\Current Version\Winlogon.

  5. Change the value of Userinit:Reg_SZ:C:\WINNT\System32\userinit.exe to Userinit:Reg_SZ:userinit.exe, changing the absolute path to a relative path.

  6. You should now be able to log on locally to the computer. Follow steps 5 through 11 in the previous section to modify the drive IDs in the registry.

Restoring drive ID assignments with a duplicate System32 folder using the Recovery Console

You can still recover the system to enable you to log on and change drive IDs even if the problem computer isn’t on a network or doesn’t allow remote registry modification:

  1. Boot the system using the Recovery Console, either through the installed console or through the Setup boot disks.

  2. At the console prompt, issue the following commands:

                         set allowwildcards = true
    set allowallpaths = true
  3. If you receive an error in step 2 indicating that the set command is disabled, you need to enable the command. Use one of the following tools to modify the policies in Local Policies\Security Options to include the two policies Allow Automatic Administrative Logon and Allow Floppy Copy And Access To All Drives And All Folders:

    • Security Configuration and Analysis MMC console

    • Domain Controller Security Policy

    • Domain Security Policy

    • Local Security Policy

  4. In the Recovery Console, create a \Winnt\System32 folder on the drive that is being incorrectly assigned as the boot drive.

  5. Expand and copy the file userinit.exe from the Windows 2000 CD to this folder using the expand command.

  6. Restart the system and log on as administrator.

  7. Follow steps 5 through 11 in the procedure Section 1.13.2, earlier in this chapter, to change the drive assignments.

Get Windows 2000 Quick Fixes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.