System File Checker (SFC) - Win XP Repair Inbuilt Tool

NOTE: Need windows xp (ver ex: sp2) CD to be inserted in CD DRIVE


How to use the scannow sfc tool in Windows XP

Windows XP has the ability to protect itself from system instability caused by 3rd party software overwriting important system files. This used to be (and still is in fact), a problem with Windows 95 and Windows 98.

With the introduction of Windows Millennium Edition, Microsoft made a real effort to stop this from happening.


Now in Windows XP we have a much more refined protection of these important files....

This system is called:

Windows File Protection

By default, Windows File Protection is always enabled and allows Windows
digitally signed files to replace existing files safely. Currently, signed files are distributed
through:

# Windows Service Packs

# Hotfix distributions

# Operating system upgrades

# Windows Update

# Windows Device Manager

If you introduce a file replacement in any other way, Windows File protection will overwrite your file!

An important part of Windows File Protection is the command line utility:

System File Checker (sfc.exe)

You will often see references to scannow sfc in online newsgroups etc. This is a great tool for troubleshooting Windows XP problems.

How to use scannow sfc...

The main reason for using this utility is when you suspect there may be a problem with a Windows XP system file.

Perhaps you get a dialog box appear informing you of a problem with a .dll file, or your program will just not load! It is therefore worth checking to see if there are any corrupt system files using scannow sfc.

To do this simply go to the Run box on the Start Menu and type in:


System File Checker Utility (Scan Immediately)
sfc /scannow

This command will immediately initiate the Windows File Protection service to scan all protected files and verify their integrity, replacing any files with which it finds a problem.

The following should appear to give an indication of how long the process is taking.

scannow sfc

In an ideal world that would be the end of the story... Any corrupt, missing or incorrect files would be replaced by this process.

However, things can go wrong and the following guide should help!

The #1 complaint with scannow sfc is the following dialog box appearing:

scannow sfc image

Why does this happen?

Well, in your computer's registry, are several settings that are checked when you run scannow sfc.

As mentioned earlier in this article, the Windows File Protection service constantly monitors for any changes to the main system files. Well Windows XP keeps a cache (copy) of these essential files at the following location:

C:WINDOWS\System32\Dllcache (assuming C: is your system root which it probably is.)

NB - The dllcache folder is extremely important so Windows XP hides it from you! To view it go to: My Computer > Tools > Folder Options > View > "uncheck" Hide protected operating system files.

If that's the case on your computer then there is normally no need for the original XP CD to be inserted as your computer has a "copy" it can get hold of in this cache...

But, if the Dllcache folder, or part of it, has become corrupted for some reason then you will be prompted for the XP CD - so your computer can get a clean copy!

Having said that not ALL installations of Windows XP have ALL the system files cached into this folder! You may only have around 50MB of files in this folder under Windows XP depending on the quota settings in the registry. (Under Windows 2003 Server the default is 300MB of system files!)

Annoying, YES!

Is there a workaround YES!

As well as having a cache of all the system files on your PC, I like to have the I386 folder from the XP CD installed on the computer as well. After doing this I then modify the registry to tell it the source path for these files... Why? Well not only does this prevent 99% of request for the the XP CD with Windows File Protection. But the I386 folder also contains many other files that are sometimes needed by the operating system and this stops those requests for the XP CD too!

NB - With today's large hard drives you are not going to notice this 475 MB folder on your computer, but older systems may not have the space for this...

Step 1

You will need to get your XP CD and locate the folder called:

I386

This is a major folder and should be one of the first you see, now copy this onto your hard drive into the system root. For most of you that is going to be C:\ so you should end up with a folder that looks like: C:\I386

-----------------------------

Step 2

Now you will need to tell your computer you now have the files on your PC. We do this is the registry (type regedit in the Run box on the start menu) by navigating to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Setup

You will see various entries here on the right hand side. The one we want is called:

SourcePath

It probably has an entry pointing to your CD-ROM drive, and that is why it is asking for the XP CD. All we need to do is change it to:

C:\

Simply double click the SourcePatch setting and a new box will pop up allowing you to make the change.

Now restart your computer and try scannow sfc again!

------------------------------

When you run scannow at logon you do not get a progress bar... This can easily be remedied by adding a new DWORD: SFCShowProgress to the registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

the values available are: 0 = disabled, 1 = enabled

------------------------------------


System File Checker Utility (Scan Once At Next Boot)
sfc /scanonce

System File Checker Utility (Scan On Every Boot)
sfc /scanboot

System File Checker Utility (Return to Default Setting)
sfc /revert

System File Checker Utility (Purge File Cache)
sfc /purgecache

System File Checker Utility (Set Cache Size to size x)
sfc /cachesize=x

\WINDOWS\SYSTEM32\CONFIG\SYSTEM file is missing or corrupt:

When you are prompted to do so, type the Administrator password. If the administrator password is blank, just press ENTER.


At the Recovery Console command prompt, type the following lines, pressing ENTER after you type each line:

md tmp
copy c:\windows\system32\config\system c:\windows\tmp\system.bak
copy c:\windows\system32\config\software c:\windows\tmp\software.bak
copy c:\windows\system32\config\sam c:\windows\tmp\sam.bak
copy c:\windows\system32\config\security c:\windows\tmp\security.bak
copy c:\windows\system32\config\default c:\windows\tmp\default.bak

delete c:\windows\system32\config\system
delete c:\windows\system32\config\software
delete c:\windows\system32\config\sam
delete c:\windows\system32\config\security
delete c:\windows\system32\config\default

copy c:\windows\repair\system c:\windows\system32\config\system
copy c:\windows\repair\software c:\windows\system32\config\software
copy c:\windows\repair\sam c:\windows\system32\config\sam
copy c:\windows\repair\security c:\windows\system32\config\security
copy c:\windows\repair\default c:\windows\system32\config\default

Type exit to quit Recovery Console. Your computer will restart.

NTOSKRNL.EXE is missing or corrupt.

startup environment.

Missing or corrupt ntoskrnl.exe file

If the ntoskrnl.exe file is corrupt or missing this can also generate the error. To restore this file follow the below steps.

  1. Insert the Microsoft Windows XP CD. Note: If you have a recovery CD or a restore CD and not a Microsoft Windows XP CD it is likely the below steps will not resolve your issue.
  2. Reboot the computer, as the computer is starting you should see a message to press any key to boot from the CD. When you see this message press any key.
  3. In the Microsoft Windows XP setup menu press the R key to enter the recovery console.
  4. Select the operating system you wish to fix, and then enter the administrator password.
  5. Type expand d:\i386\ntoskrnl.ex_ c:\windows\system32
  6. You will then be prompted if you wish to overwrite the file type Y and press enter to overwrite the file.
  7. Type exit to reboot the computer.

Windows NT installed on a partition bigger then 7.8GB

If you are running Microsoft windows NT 4.0 on a partition larger than 7.8GB this issue can occur if the boot files are located outside this limitation. When this error occurs your computer will have the error message as shown below.

OS Loader v4.01
Disk I/O error status=00000001
Windows NT could not start because the below file is missing or corrupt: winnt\system32\Ntoskrnl.exe
Please reinstall a copy of the above file.

If your system partition is larger than 7.8GB you will need to delete the partition and recreate the partition to 7.8GB or less. Additional information about this issue can be found on Microsoft KB Q224526.

Corrupted hard disk drive or severely corrupted Windows

Attempt to check the hard disk drive for any errors by running the chkdsk error. To do this follow the below steps.

  1. Insert the Microsoft Windows XP CD. Note: If you have a recovery CD or a restore CD and not a Microsoft Windows XP CD it is likely the below steps will not resolve your issue.
  2. Reboot the computer, as the computer is starting you should see a message to press any key to boot from the CD. When you see this message press any key.
  3. In the Microsoft Windows XP setup menu press the R key to enter the recovery console.
  4. Select the operating system you wish to fix, and then enter the administrator password.
  5. Once at the recovery console type chkdsk /r
  6. Once completed type exit and see if issue is resolved.

If after trying all of the above steps you are still encountering the same issue it's likely that Windows is severely corrupted and it is recommended you attempt to reinstall Windows. Additional information about erasing the computer and starting over can be found on document CH000186.

Finally, if during the Windows installation you encounter errors it's likely that your hard disk drive is bad.

Windows XP- Missing HAL.DLL

Error Message: Cannot Find \Windows\System32\hal.dll

One possible fix. So far, this has been traced to an incorrect BOOT.INI file. To gain access to the Boot.ini:

Go to Start/Run and type in: msconfig. Then go to the Boot.ini Tab. Or…Right click the My Computer icon/Properties/
Advanced/Startup and Recovery/Settings/System Startup/Edit.

How to Edit the BOOT.INI File in Windows XP
http://support.microsoft.com/support/kb/articles/Q289/0/22.asp

This user had 1 hard drive, partitioned into C and D drives. His BOOT.INI file looked like this: (the erroneous lines are in “blue”)

[boot loader]
timeout=1
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS=”Microsoft Windows XP Professional” /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINNT=”Microsoft Windows 2000 Professional” /fastdetect

The 3 in the erroneous lines, above, points to the 3rd partition on the first physical hard disk. Since this user only had 2 partitions, this value was incorrect. Changing the value to 2, in both lines, allowed the user to complete Windows XP’s setup.

The corrected BOOT.INI looked like this:

[boot loader]
timeout=1
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Microsoft Windows XP Professional” /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINNT=”Microsoft Windows 2000 Professional” /fastdetect

HAL - Hardware Abstraction Layer (hal.dll)

HAL is Microsoft’s abbreviation for the Hardware Abstraction Layer, the technology and drivers that let the Windows NT, 2000, and XP operating systems communicate with your PC’s hardware. HAL is one of several features–along with the NT file system (NTFS) that replaced the much less secure MS-DOS–that make NT-based operating systems more secure and reliable than Windows 95, 98, and Me.

HAL.dll prevents applications from directly accessing your PC’s system memory, CPU, or hardware devices (such as video and sound cards)–a method that can prevent many device conflicts and crashes. Unfortunately, HAL.dll sometimes also slows or stops DOS games and programs, which need to load their own memory managers or control hardware directly for better performance.

With HAL.dll in the way, developers must rewrite or even abandon their older software in favor of newer, HAL-compatible versions. Microsoft has pressured hardware makers to provide or support technologies such as MMX, DirectX, and 3D graphics language OpenGL, all of which allow fast but indirect access to the advanced high-performance features of video, sound, and CPU hardware. Such access also makes for a better visual experience when using Windows for Web and productivity applications; improved graphics performance is evident all over Windows XP’s new user interface.

XP also offers some new compatibility-mode features that let you run programs meant to run under earlier operating systems, but, frankly, most DOS-based and even some Windows-based games simply won’t work with the new OS.

Tip: To see which HAL.dll is currently installed, open Device Manager, and expand the Computer branch. The entry that
appears in this branch corresponds to the currently installed HAL.

Situations in Which Windows May Not Start in Safe Mode
How to Troubleshoot Hardware Abstraction Layer Issues
How to Move a Windows XP Installation to Different Hardware

Setup Error Msg: Cannot find file: \Windows\System32\hal.dll

HAL.DLL is Missing - Updated by MVP Alex Nichol

Option 1:

Boot from your CD and follow the directions to start Recovery Console. Then:

Attrib -H -R -S C:\Boot.ini
DEL C:\Boot.ini
BootCfg /Rebuild
Fixboot

Option 2:

Boot from your CD and follow the directions below to start Recovery Console.

Insert the Setup compact disc (CD) and restart the computer. If prompted, select any options required to boot from the CD.
When the text-based part of Setup begins, follow the prompts; choose the repair or recover option by pressing R.

If you have a dual-boot or multiple-boot system, choose the installation that you need to access from the Recovery Console.
When prompted, type the Administrator password. (if you didn’t create one try pressing enter).

At the system prompt, type Recovery Console commands; type help for a list of commands, or help commandname for help on a specific command.

Most likely you will need to expand the file from the CD. The command would be expand d:\i386\hal.dl_ c:\windows\system32\hal.dll. Substitute d: for the drive letter of your CD. Once you have expanded the file type “exit” to exit the Recovery Console and restart the computer.

TIP: Recovering Windows XP using the Recovery Console

Update:

Shaun Gray (3/2005) states:

Let me review my experience / problem with hal.DLL with you all:

I Received a computer with win XP home sp2 that after uninstalling IML4, and Installing IML5, and rebooting. (IML being Imesh light)
Computer displayed windows root\system32\hal.dll is missing or corrupt, please re-install.

NO MODES would boot from advanced boot options
Only bootable option was from CD
Repair console would not EDIT system from OEM XP HOME CD
FixMBR did not solve anything
Bootcfg /list, bootcfg /rebuild did not solve anything
Fixboot did not solve anything

Solution Option 1 wouldn’t work with multi attributes with out “|” in between them. ******
Solution Option 1 didn’t solve anything, except inadvertently adding a second OS to boot.ini
Solution Option 2 was unusable with OEM XP HOME SP2 CD.
Solution Opt 2 with XP PRO SP2 Integrated CD “Functioned”, but was “unable to expand file”

REINSTALLING WINDOWS IS NOT AN OPTION.

Final Solution:

Removed hard drive from system.
Added Hard drive to a 2nd WORKING XP PRO System. As Slave on Cable select.

***(all references to “D:\” are the Slave Hard drive damaged windows)***

Booted system and enabled - Explorer\tools\folder options

Display contents of system folders.
Show Hidden Files and Folders.
UN-check Hide Protected OS Files.

Go to “D:\” open Boot.ini in NOTEPAD, remove the Extra OS’s added with option 1.
Close and Save changes to Boot.ini

Go to “My Computer” Right click on “D:\” select SEARCH “D:\”

Search “All or Part of the File Name” = “hal”

Hal.dll may or may not be found in “D:\WINDOWS\System32” either way it’s no good.
A working copy of hal.dll WILL be found in “C:\WINDOWS\ServicePackFiles\i386”
COPY THAT FILE “D:\WINDOWS\ServicePackFiles\i386\hal.dll”
And Paste it to “D:\WINDOWS\System32” folder; if it asks to overwrite say YES.

You may now un-do the changes made to Explorer\tools\folder options to RE-Hide files.
Shut Down the computer.

Remove the 2nd Drive and reinstall it to its own tower as Master.

You should Now be able to boot the computer up as if nothing ever happened.

With the exception that it will prompt you to reinstall some drivers, Just say YES and let it auto detect …THEY ARE ALREADY THERE. And will setup fine.

This “FIX” assumes that the computer in question HAS at ther very least service pack1, if not service pack 2.

If these patches have NOT been installed , I dont belive any such Reserve copy of hal.dll will wxist on the drive!

IP Configuration Problem

IP Configuration (Display Connection Configuration)
ipconfig /all

IP Configuration (Display DNS Cache Contents)
ipconfig /displaydns

IP Configuration (Delete DNS Cache Contents)
ipconfig /flushdns

IP Configuration (Release All Connections)
ipconfig /release

IP Configuration (Renew All Connections)
ipconfig /renew

IP Configuration (Refreshes DHCP & Re-Registers DNS)
ipconfig /registerdns

IP Configuration (Display DHCP Class ID)
ipconfig /showclassid

IP Configuration (Modifies DHCP Class ID)
ipconfig /setclassi

System Has Recovered from a Serious Error

You receive a "System Has Recovered from a Serious Error" message after every restart

WORKAROUND

You can solve this problem by recreating the pagefile. To re-create the pagefile, follow these steps:

1.

Click Start.

2.

Right-click My Computer.

3.

Click Properties.

4.

On the Advanced tab, in the Performance section, click Settings.

5.

In the Virtual Memory section, click Change.

6.

For Paging file size for selected drive, click No Paging File, and then click Set.

7.

Click Yes after the following warning appears:

If the paging file on volume X: has an initial size of less than xx megabytes, then the system may not be able to create a debugging information file if a STOP error occurs. Continue anyway?

(X is the drive letter and xx is the amount of RAM installed on your computer minus 1 megabyte.)

8.

Click System Managed Size.

9.

Click OK four times, and then restart the computer when you are prompted.

The computer does not start after you change the active partition by using the Disk Management tool


NTLDR is missing.

Press Ctrl+Alt+Del to restart.

RESOLUTION

IMPORTANT Before performing the steps listed below, make sure that you have a good backup of your critical data files.

To resolve this behavior, use one of the following procedures:

Try changing the active partition by booting to a floppy disk and then using disk utilities to manually change the active partition:

1.

Boot to a command prompt by using a Microsoft Windows 95, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me) boot floppy disk.

2.

At the command prompt, type fdisk, and then press ENTER.

3.

When you are prompted to enable large disk support, click Yes.

4.

Click Set active partition, press the number of the partition that you want to make active, and then press ENTER.

5.

Press ESC.

6.

Remove the boot floppy disk, and then restart the computer.

Boot the computer by using a Windows XP boot disk. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

305595 (http://support.microsoft.com/kb/305595/) How to create a bootable floppy disk for an NTFS or FAT partition in Windows XP

If the partition that has been incorrectly marked as active is formatted in the FAT file system, the FAT32 file system, or the NTFS file system, you may be able to use the Windows Recovery Console to correct the behavior. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

314058 (http://support.microsoft.com/kb/314058/EN-US/) Description of the Windows XP Recovery Console

NOTE: The system partition refers to the disk volume that contains the files that are needed to start Windows (for example, Ntldr,Boot.ini, and Ntdetect.com). On Intel x86-based computers, the system partition must be a primary partition that is marked active. On Intel x86 computers, this is always drive 0, the drive that the system BIOS searches when the operating system starts.

Using the Recovery Console, copy the Ntldr file from the Windows XP CD-ROM to the root directory of the current active partition. Follow these steps:

1.

Start your computer by using the Windows XP Setup floppy disks or by using the Windows XP CD-ROM.

2.

At the "Welcome to Setup" screen, press F10, or press R to repair.

3.

Press C to start the Recovery Console.

4.

Copy the Ntldr file from the Windows XP CD-ROM to the root of your system partition by using the following commands, pressing ENTER after each command:

a.

Type cd .. to go to the root of drive C.

Note that there is a space between the d and the two periods (..).

b.

Type the letter of the CD-ROM drive.

c.

Type cd i386.

d.

Type Copy ntldr c:.

e.

Type Copy ntdetect.com c:.

f.

Type Bootcfg /add.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

291980 (http://support.microsoft.com/kb/291980/) A discussion about the Bootcfg command and its uses

g.

Type Exit.

If the partition was not formatted by using Windows, you might also need to run the Recovery Console fixboot command to make the active partition bootable.

After you can boot into Windows, it is recommended that you use the Windows Disk Management snap-in tool to reset the original system partition as the active partition, and then restart the computer.

Windows could not start because of a computer disk hardware configuration problem

Error message: "Windows could not start because of a computer disk hardware configuration problem"

Error message 1

Windows could not start because of a computer disk hardware configuration problem.

Could not read from the selected boot disk. Check boot path and disk hardware.

Please check the Windows documentation about hardware disk configuration and your hardware reference manuals for additional information.

Error message 2

Windows NT could not start because the following file is missing or corrupt:

Winnt_root\System32\Ntoskrnl.exe

Please re-install a copy of the above file.

Error message 3

Winnt_root\System32\Hal.dll missing or corrupt:

Please re-install a copy of the above file.

Method 1

Edit the Boot.ini file to restore or correct the Default entry and to ensure that the other entries in the [Operating Systems] section of the Boot.ini file point to the appropriate directories.

Method 2

Use the Bootcfg utility in the Recovery Console to correct the Boot.ini file:

1.

Use the Windows XP CD-ROM to start your computer.

2.

When you receive the message to press R to repair Windows by using the Recovery Console, press the R key.

3.

Select the Windows installation that you want, and then type the administrator password when prompted.

4.

Type bootcfg /rebuild, and then press ENTER.

5.

When the Windows installation is located, the following instructions are displayed:

Add installation to boot list? (Yes/No/All)
[Type Y in response to this message.]

Enter Load Identifier:
[This is the name of the operating system. Type Windows XP Professional or Windows XP Home Edition.]

Enter OS Load options:
[Leave this field blank, and then press ENTER].

After you perform the preceding steps, restart the computer, and then select the first item on the boot menu. This should allow Windows XP to start normally.

After Windows XP has successfully loaded, the Boot.ini can be modified to remove the incorrect entry.

Method 3

1.

Start the computer by using your Windows XP CD-ROM. Press any key to boot from the CD.

2.

After the setup files are finished loading press R to repair using Recovery Console.

3.

When you are in the recovery console, select the installation to log on to (usually number 1), and then press ENTER.

4.

Login to the Administrator account by typing the password for this account, and then press ENTER.

5.

At the recovery console command prompt, type the following command, and then press ENTER:

For Uni-Processor systems:

expand :\i386\ntoskrnl.ex_ :\Windows\system32\ntoskrnl.exe

For Multi-Processor systems:

expand :\i386\ntkrnlmp.ex_ :\Windows\system32\ntoskrnl.exe

Note In these two commands, the placeholder represents the drive letter of your CD drive, and the placeholder represents the drive letter of the hard disk on which windows is installed.

6.

If you receive a prompt to overwrite the file, press Y.

7.

Type exit, and press ENTER at the command prompt.

Back to the top

Method 4

Start the computer by using the Recovery Console, and then run theCHKDSK /rcommand.

Note You do not have to include the /p switch in the Chkdsk command-line because the /r switch causes the Chkdsk utility to locate bad sectors and recover readable information. This command implies the /p switch..

Black startup screen is briefly displayed and your computer restarts repeatedly when you try to start Windows XP

Black startup screen is briefly displayed and your computer restarts repeatedly when you try to start Windows XP

A fatal system error (STOP error) causes the computer to stop.

The Automatically restart option is selected under System failure in the Startup and Recovery dialog box in System Properties.

The Windows XP paging file is smaller than the amount of physical memory that is installed on the computer, or there is insufficient free space on the hard disk to write the error dump file (Memory.dmp).

Method 1

1.

Try to replace the registry hives from the repair directory by using the Recovery Console, and then restore the system to a current state with System Restore.

For additional information about how to restore the registry, click the article number below to view the article in the Microsoft Knowledge Base:

307545 (http://support.microsoft.com/kb/307545/EN-US/) How to Recover from a Corrupted Registry that Prevents Windows XP from Starting

Back to the top

Method 2

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

322756 (http://support.microsoft.com/kb/322756/) How to back up and restore the registry in Windows

1.

Install Windows XP to a different folder.

2.

Click Start, and then click Run.

3.

In the Open box, type regedit, and then click OK.

4.

Browse to the following registry subkey:

HKEY_LOCAL_MACHINE

5.

On the File menu, click Load Hive.

6.

Navigate to the System file in the original Windows XP installation location.

By default, the System file is stored in the following location:

%SystemRoot%\System32\Config\System

7.

Type an arbitrary name when you are prompted for a key name in the Load Hive dialog box.

The original HKEY_LOCAL_MACHINE hive is loaded as a subkey of the current key.

8.

In the arbitrary name key (where arbitrary name is the name that you assigned the HKEY_LOCAL_MACHINE registry key from the original Windows installation), browse to the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CrashControl

9.

In the right pane of the Registry Editor window, double-click AutoReboot.

10.

In the Value data box, type 0 (zero), and then click OK.

11.

Click the minus sign to collapse the HKEY_LOCAL_MACHINE registry subkey.

12.

On the File menu, click Unload Hive.

13.

On the File menu, click Exit.

This disables the Automatically restart option in the original Windows XP installation. After you follow these steps, you may be able to gather information from the STOP error message and resolve the problem that prevents the computer from starting.

Back to the top

Method 3

Another workaround may be necessary if the minimum size of the paging file is set to a value less than the amount of physical memory. Windows XP requires a paging file on the system drive large enough to hold all physical memory plus 1 megabyte (MB), in order to write debugging information. You can modify the PagingFiles value of the original installation so that the dump file can be created by the STOP error message. Enough free disk space must be available on the system drive for the paging file.

To change the PagingFiles value in the System file in the original Windows XP installation location, follow these steps:

1.

Click Start, and then click Run.

2.

In the Open box, type regedit, and then click OK.

3.

Browse to the following registry subkey:

HKEY_LOCAL_MACHINE

4.

On the File menu, click Load Hive.

5.

Navigate to the System file in the original Windows XP installation location. By default, this is stored in the following location:

%SystemRoot%\System32\Config\System

6.

Type an arbitrary name when you are prompted for a key name in the Load Hive dialog box.

This loads the original HKEY_LOCAL_MACHINE hive as a subkey of the current key.

7.

In the arbitrary name key (where arbitrary name is the name that you assigned the HKEY_LOCAL_MACHINE registry key from the original Windows installation), browse to the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management

8.

In the right pane of the Registry Editor window, double-click PagingFiles.

9.

In the Value data box, edit the first numeric value after c:\pagefile.sys (where c: is the drive on which the pagefile is stored) to increase it to a number that is at least 1 MB greater than the amount of physical memory in the computer.

NOTE: Do not type a number that is greater than the amount of free hard disk space on the computer.

For example, the following value displays a minimum paging file size of 130 MB and a maximum paging file size of 256 MB.

c:\pagefile.sys 130 256

10.

Click OK.

11.

Browse to the following location in the registry hive that you loaded from the original Windows installation:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\CrashControl

12.

In the right pane of the Registry Editor window, double-click CrashDumpEnabled.

13.

Type 1 (one) in the Value data box if it is not already present, and then click OK.

14.

Click the minus sign to collapse the HKEY_LOCAL_MACHINE registry subkey.

15.

On the File menu, click Unload Hive.

16.

On the File menu, click Exit.

17.

Attempt to start the original Windows XP installation. When the STOP error occurs, the memory dump information will be stored in the paging file.

18.

Restart the computer and select the parallel installation of Windows XP. This allows the dump file to be created and you may be able to use the information to resolve the problem that causes the STOP error message in the original installation.

NOTE: The dump file is saved in the %SystemRoot%\Memory.dmp file, where %SystemRoot% is the parallel installation system folder.

19.

Click Start, right click My Computer, and then click Properties.

20.

Click the Advanced tab, click Settings under Startup and Recovery.

21.

Click to clear the Automatically restart check box, click OK, and then click OK again.

22.

Restart the computer. When you attempt to shut down the computer, the exact message should be displayed.

Back to the top

Method 4

Upon restart, use the new boot option Disable automatic restart on system failure. If this option is selected, you can get the STOP error codes and then continue accordingly.

Missing or Damaged User32.dll File

Missing or Damaged User32.dll File

Use Recovery Console to replace the corrupted or damaged User32.dll file, then, if needed, perform an in-place upgrade (also called a repair install) of Windows XP. To do so follow these steps:

1.

Insert the Windows XP CD-ROM into the CD-ROM or DVD-ROM drive, and then restart the computer. Select any options that are required to start the computer from the CD-ROM or DVD-ROM drive if you are prompted to do so.

2.

When the "Welcome to Setup" screen appears, press R to start Recovery Console.

3.

If your computer is configured for dual booting or multiple booting, select the relevant Windows XP installation.

4.

When you are prompted to do so, type the administrator password, and then press ENTER.

NOTE: In Windows XP Home Edition, the administrator password is\ blank by default.

5.

At the command prompt, type the following command, and then press ENTER:

cd windows\system32

6.

To rename the User32.dll file, type the following command, and then press ENTER:

ren user32.dll user32.bak

7.

To expand a new copy of the User32.dll file from the Windows XP CD-ROM to the System32 folder, type the following command, and then press ENTER:

expand cd-rom:\i386\user32.dl_ c:\windows\system32

where cd-rom is the drive letter for the drive that contains the Windows XP CD-ROM, and c:\windows is the drive letter and folder in which Windows XP is installed.

8.

Type exit, press ENTER, and then restart the computer.

If Windows XP still fails to start, you may need to perform an in-place upgrade (also called a repair install)

Unable to Load Device Driver" Error

A Stop: 0xc000026C or Stop: 0xc0000221 "Unable to Load Device Driver" Error Occurs When You Start Windows XP

When you start Windows XP, you may receive one of the following error messages:

STOP: 0xc000026C [Unable to load device driver] DriverName

-or-

STOP: 0xc0000221 [Unable to load device driver] DriverName

-or-

STOP: 0xc0000221. Bad image check sum, the image user32.dll is possibly corrupt. The header check sum does not match the computed check sum.

Missing or Damaged Driver File

Use Recovery Console to replace the missing or damaged driver file. To do so, follow these steps:

1.

Insert the Windows XP CD-ROM into the CD-ROM or DVD-ROM drive, and then restart the computer. Select any options that are required to start the computer from the CD-ROM or DVD-ROM drive if you are prompted to do so.

2.

When the "Welcome to Setup" screen appears, press R to start Recovery Console.

3.

If your computer is configured for dual booting or multiple booting, select the relevant Windows XP installation.

4.

When you are prompted to do so, type the administrator password, and then press ENTER.

Note In Windows XP Home Edition, the administrator password is\ blank by default.

5.

At the command prompt, type the following command, and then press ENTER:

cd windows\system32\drivers

6.

To rename the damaged driver file, type the following command, and then press ENTER

ren drivername.sys drivername.bak

where drivername is the name of the damaged driver file.

7.

To copy the driver from the Windows XP CD-ROM to the Drivers folder, type the following command, and then press ENTER

copy cd-rom:\i386 drivername

where cd-rom is the drive letter for the drive that contains the Windows XP CD-ROM.

8.

Type exit, press ENTER, and then restart the computer.

FIXBOOT

FIXBOOT

fixboot drive name:

Use this command to write the new Windows boot sector code on the system partition. In the command syntax, drive name is the drive letter where the boot sector will be written. This command fixes damage in the Windows boot sector. This command overrides the default setting, which writes to the system boot partition. The fixboot command is supported only on x86-based computers.

FIXMBR

fixmbr device name

Use this command to repair the MBR of the boot partition. In the command syntax, device name is an optional device name that specifies the device that requires a new MBR. Use this command if a virus has damaged the MBR and Windows cannot start.

Warning This command can damage your partition tables if a virus is present or if a hardware problem exists. If you use this command, you may create inaccessible partitions. We recommend that you run antivirus software before you use this command.

You can obtain the device name from the output of the map command. If you do not specify a device name, the MBR of the boot device is repaired, for example:

fixmbr \device\harddisk2

If the fixmbr command detects an invalid or non-standard partition table signature, fixmbr command prompts you for permission before rewriting the MBR. The fixmbr command is supported only on x86-based computers.

Method 2: System restore


You can use the System Configuration utility to perform a system restore. There are three possible restore points:

System checkpoints that Windows schedules

Manual restore points that you specify with the System Configuration utility

Installation restore points that occur before you install a program or a service

You can use the system checkpoints or the installation restore points to restore your computer's settings to a date when it operated correctly. This may also help determine the cause of the configuration error.

To perform a system restore, follow these steps:

1.

Click Start, click Run, type msconfig, and then click OK.

2.

On the General tab, click Launch System Restore.

3.

Select Restore my computer to an earlier time, and then click Next.

4.

Calendar dates in bold are possible restore points. Click the most recent one to view system restore information.

5.

Select a system checkpoint or an installation restore point, and then click Next.

6.

Close all other programs.

7.

To start the system restore, click Next.

8.

Your computer restarts.

9.

Repeat steps 1 through 8 until you fix your configuration issue.

How to troubleshoot configuration errors by using the System Configuration utility in Windows XP

Advanced troubleshooting

These methods are intended for advanced computer users. If you are not comfortable with advanced troubleshooting, you might want to ask someone for help or contact support. For information about how to contact support, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/ (http://support.microsoft.com/contactus/)

The System Configuration utility automates the routine troubleshooting steps that Microsoft Customer Support Services professionals use when they diagnose system configuration issues. When you use this utility to modify the system configuration, you can select check boxes to eliminate issues that do not apply to your configuration. This process reduces the risk of typing errors that you may make when you use any text editor, such as Notepad. You must be logged on as an administrator or as a member of the Administrators group to use the System Configuration utility.

When you use the System Configuration utility, you can easily reset or change the configuration settings in Windows to include preferences for the following files and settings:

The System.ini file

The Win.ini file

The Boot.ini file

Programs that are set to load during the startup process (these programs are specified in the Startup folder and in the registry)

Environment settings

International settings

There are two methods for troubleshooting configuration issues by using the System Configuration utility. Read each method carefully to understand the consequences of each method.

Back to the top

Method 1: Diagnostic and Selection startup modes

Diagnostic startup

Diagnostic startup enables Windows to determine the basic device drivers and software to load when you start Windows. When you use this method, the system temporarily disables Microsoft services such as Networking, Plug and Play, Event Logging, and Error Reporting. Also, you permanently delete all restore points for the System Restore utility.

Note Do not use this method if you want to save your restore points for System Restore or if you must use a Microsoft service to test a problem.

To perform a diagnostic startup, follow these steps:

1.

Click Start, click Run, type msconfig, and then click OK.

2.

On the General tab, click Diagnostic Startup, and then click OK.

3.

Restart your computer.

If the problem does not occur, use Selective startup mode to try to find the problem by turning individual services and startup programs on or off.

Selective startup

Selective startup enables you to select the files and the settings that you want the computer to load when you restart the computer. Select from the following options:

Process System.ini File

Process Win.ini file

Load System Services

Load Startup Items

By default, no options are selected. The following actions apply to these options:

When you select the check box, the configuration file is processed when you restart the computer.

When you clear the check box, the configuration file is not processed when you restart the computer.

When the check box is selected, and you cannot select the check box because it appears dimmed, some items are still loading from that configuration file when you restart the computer.

When the check box is not selected, and you cannot select the check box because it appears dimmed, the configuration file is not present on the computer.

You cannot change the Use Original BOOT.INI option button.

Note When you clear the Load System Services check box, you disable Microsoft services such as Networking, Plug and Play, Event Logging, and Error Reporting. You also permanently delete all restore points for the System Restore utility. Do not clear this check box if you want to keep your restore points for System Restore, or if you have to use a Microsoft service to test a problem.

To perform a selective startup, follow these steps:

1.

Click Start, click Run, type msconfig, and then click OK.

2.

On the General tab, click Selective Startup.

3.

Select or clear the available settings.

4.

Click OK.

5.

Restart your computer.

6.

Repeat steps 1 through 5 until you find the problem.

Change individual file settings

If you know the different settings in each configuration file, you can enable or disable individual settings in the file that has the tab for that file in the System Configuration utility. To prevent individual items in a configuration file from loading when you restart your computer, follow these steps:

1.

Click Start, click Run, type msconfig, and then click OK.

2.

Click a tab: System.ini, Win.ini, Boot.ini, Services, or Startup.

3.

Select or clear the available settings.

4.

Click OK.

5.

Restart your computer.

6.

Repeat steps 1 through 5 until you find the problem.

System.ini and Win.ini options

The SYSTEM.INI and WIN.INI tabs in the System Configuration utility have the following options:

Check boxes enable you to enable or to disable an option. To enable an option so that it loads at startup, select the check box or select the option, and then click the Select button. To disable an option so that it does not load at startup, clear the check box or select the option, and then click the Disable button.

Move Up and Move Down buttons enable you to move through the different options when you do not have a mouse.

The New button enables you to create a new entry in the System.ini or in the Win.ini file. Click the button, and type your entry.

The Edit button enables you to edit an existing line in the System.ini or in the Win.ini file. Click the button, and edit the line.

When a check box is unavailable on the SYSTEM.INI and WIN.INI tabs, the System Configuration utility temporarily removed the lines.

Note When you click to clear a check box for an item or a line, the Selective Startup option on the General tab is automatically selected.

Manually extract a file

If you have to fix a corrupted file, extract the individual Windows file from the CAB files. To do this, follow these steps:

1.

Click Start, click Run, type msconfig, and then click OK.

2.

On the General tab, click Expand File.

3.

In the File to restore box, type the name of the file that you want to restore.

4.

In the Restore from box, type the path of the Windows XP .cab file from which you want to restore the file. Or, click Browse From to locate the Windows XP .cab file.

Note The Windows XP .cab files are stored in the I386 folder on the Windows XP installation CD.

5.

In the Save file in box, type the path of the folder to which you want to extract the new file. Or, click Browse To to locate the folder that you want.

6.

Click Expand.

7.

In the System Configuration Utility dialog box, click OK. If you are prompted to restart the computer, click Restart.

Return to normal startup

After you complete your troubleshooting and fix your configuration, return to a normal startup. Follow these steps:

1.

Click Start, click Run, type msconfig, and then click OK.

2.

On the General tab, click Normal startup.

3.

Click OK.

4.

Restart your computer.

Back to the top