Troubleshooting Operationg System
Troubleshooting Operationg System
Troubleshooting Operationg System
d:\i386\winnt32 /cmdcons
If your CD-ROM drive uses a different drive letter, substitute it for the D: drive. Then just
follow the instructions on the screen. If you are connected to the Internet, allow the Setup program
to download updated files. From now on, every time the system boots, the OS selection menu will
show your Windows OS (Windows 2000 Professional or Windows XP) and the Microsoft Windows
Recovery Console. It may also show other choices if yours is a multi-boot computer.
Diagnosing Windows
Failure to Boot
Windows boot errors take place in those short moments between the time the POST ends and the
Loading Windows screen begins. For Windows to start loading the main operating system, the
critical system files NTLDR, NTDETECT.COM, and BOOT.INI must reside in the root directory of the
-1-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
C: drive, and BOOT.INI must point to the Windows boot files. If any of these requirements aren’t in
place, the system won’t get past this step. Here are some of the common errors you see at this point:
No Boot device Present
NTLDR Bad or Missing
Invalid BOOT.INI
Note that these text errors take place very early in the startup process. That’s your big clue that you
have a boot issue. If you get to the Windows splash screen and then lock up, that’s a whole different
issue, so know the difference.
If you get one of the catastrophic error messages, you have a three-level process to get heal.
First try to repair
If repair fails try to Restore from a back up copy of windows
If restore is either not available or fails, then your only recourse is to rebuild.
N.B You will lose data at the restore and rebuild phases, so you definitely want to spend a lot of
effort on the repair effort first!
3. The Recovery Console asks you a couple of questions, the first of which is to identify the
Windows installation you would like to manage. The Recovery Console is able to manage
any Windows installation on your system, so you dual-booters (of Windows, anyway), are in
luck.
-2-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
4. To help prevent unauthorized use of the Recovery Console, you need to provide a valid
Administrator password.
5. Once the Recovery Console authenticates the credentials you provide, you're brought to a
command prompt.
From here, you can use a number of different commands that are available in the Recovery Console.
Commands available to use include:
-3-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
Enable - Enable device driver or system service.
Exit - Exit the Recovery Console and reboot your system.
Expand - Enable a Windows system service or a driver.
Fixboot - Writes a new boot sector to the system volume. Can sometimes completely repair a
non-booting system.
Fixmbr - Repairs the master boot record of the system's boot partition. Can also sometimes
completely repair a non-booting system.
Format - Formats the specified disk partition.
Help - Shows you a list of all of the commands available via the Recovery Console.
Listsvc - Shows you a list of all of the available drivers and services on your system.
Logon - If you have multiple Windows installations, this lets you switch between them and will
ask you for appropriate credentials.
Map - Display drive letter mapping.
Md - Creates a directory.
Mkdir - Creates a directory.
More - Shows the contents of a text file.
Net - Maps a drive letter to a network share.
Rd - Deletes a directory.
Ren - Renames a file.
Rename - Renames a file.
Rmdir (Rd) - Deletes a directory.
Set - Display or set environment variables for use within the Recovery Console.
Systemroot - Changes the current directory to the root of the system. (i.e. changes to
C:\Windows)
Type - Shows the contents of a text file.
The fixboot command can fix many boot sector problems, such as those created by
viruses
The fixboot command takes only a single optional parameter--the letter of the drive with the boot sector
you'd like to fix. The Below Figure shows you the simplicity of this potential fix.
-4-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
At the prompt: C:\WINDOWS>
Type: fixboot
Now press Enter.
fixmbr
Likewise, fixmbr, shown in Figure, can be used in a similar way to write a new master boot record to the
system and, like fixboot, takes only a single parameter. In this case, that parameter is the name of the
device to which you would like to write the new boot record. When omitted, the system will write the
new boot record to the default boot device.
-5-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
diskpart
Another useful command is diskpart, which allows you to manage your system's disk partitions from
within the Recovery Console. If you've installed Windows XP before, you've seen diskpart during the
installation process. A screenshot is shown below in below Figure.
Rebuilding Boot.ini
The boot.ini file is a hidden file that is used to identify in what folder on which partition and on which
hard drive Windows XP is located. Boot.ini can become damaged, corrupted or deleted for a number of
reasons and is usually brought to your attention by an error message.
Follow these easy steps to repair the damaged/corrupted boot.ini file or replace it if it has been
deleted.
1. Enter Windows XP Recovery Console. The Recovery Console is an advanced diagnostic mode of
Windows XP with special tools that will allow you to restore the boot.ini file.
2. When you reach the command line and type the following command and then press Enter.
bootcfg /rebuild
3. The bootcfg utility will scan your hard drives for any Windows XP installations and then display
the results. Follow the remaining steps to add your Windows XP installation to the boot.ini file.
4. The first prompt asks Add installation to boot list? (Yes/No/All).
Type Y in response to this question and press Enter.
5. The next prompt asks you to Enter Load Identifier:.
This is the name of the operating system. For example, type Windows XP Professional or
Windows XP Home Edition and press Enter.
6. The final prompt asks you to Enter OS Load options:.
Type /Fastdetect here and press Enter.
7. Take out the Windows XP CD, type exit and then press Enter to restart your PC.
Assuming that a missing or corrupt boot.ini file was your only issue, Windows XP should now
start normally.
-6-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
Follow these easy steps to restore the damaged/corrupted or missing NTLDR and Ntdetect.com files
from the Windows XP CD using the Recovery Console.
1. When you reach the command prompt (detailed in Step 6 in the link above), type the following
two commands, pressing Enter after each one:
In the command listed above, d represents the drive letter assigned to the optical drive that your
Windows XP CD is currently in. While this is most often d, your system could assign a different letter.
Also, c:\ represents the root folder of the partition that Windows XP is currently installed on. Again, this
is most often the case but your system could be different.
3. Take out the Windows XP CD, type exit and then press Enter to restart your PC.
Assuming that missing or corrupt versions of the NTLDR and/or Ntdetect.com files were your only
issues, Windows XP should now start normally.
The hal.dll file is a hidden file that is used by Windows XP to communicate with your computer's
hardware. Hal.dll can become damaged, corrupted or deleted for a number of reasons and is usually
brought to your attention by the "missing or corrupt hal.dll" error message.
Follow these easy steps to restore the damaged/corrupted or missing hal.dll file from the Windows XP
-7-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
1. Enter Windows XP Recovery Console.
2. When you reach the command line prompt (detailed in Step 6 in the link above), type the
following and then press Enter:
Using the expand command as shown above, d represents the drive letter assigned to the optical
drive that your Windows XP CD is currently in. While this is most often d, your system could assign
a different letter. Also, c:\windows represents the drive and folder that Windows XP is currently
installed on. Again, this is most often the case but your system could be different.
CHKDSK
1. Check Disk and this command can be used to fix file system errors and physical hard drive
problems. However it cannot actually fix a physical hard drive problem it can only mark the
damaged areas so Windows knows not to use them. Enter into the recovery console
2. Then type :
C:\chkdsk /p
3. When the CHKDSK scanning completes, it will show you the current status of your
Scanned drive. After that just type "Exit" and then press "Enter", your computer will
restart.
-8-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
3. If prompted to select the installation of Windows press 1 and press enter.
4. If prompted for a password enter your administrator password.
5. At the C:\Windows> prompt type: cd system32\config
6. Once in this directory type: ren system system.bak
7. Once the file has been renamed type: cd \
8. At the C:\> prompt type: cd system~1
* If you get an "Access Denied" error, type exit and let the system reboot and try getting into
this directory again by starting over at step number 7 after getting back to the prompt.
9. In the system~1 directory type: cd _resto~1
10. In the cd_resto~1 directory type dir
* If available this will list each of the Restore Point folders. They'll be named rpX, where X is a number.
The highest number will be the latest restore point and the lowest the oldest restore. Pick the earliest
restore point, for example, if you have RP1 through RP7 go into the RP1 directory.
Device driver problems that stop Windows GUI from loading look pretty scary. The common
symptom of this is a Stop error, better known as the Blue Screen of Death (BSoD). The BSoD
only appears when something causes an error from which Windows cannot recover. The BSoD
is not limited to device driver problems, but device drivers are one of the reasons you’ll see the
BSoD.
-9-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
Windows BSoDs tell you the name of the file that caused the problem and usually suggest a
recommended action.These are helpful—but not often.
BSoD problems due to device drivers almost always take place immediately after you’ve
installed a new device and rebooted. Take out the device and reboot. If Windows loads
properly, you are safe.
The second indication of a device problem that shows up during the GUI part of startup is a
freeze-up: the Windows startup screen just stays there and you never get a chance to log on. If
this happens, try one of the Advanced Startup Options, covered below.
Fixing Registry Problem
Your Registry files load every time the computer boots. Windows does a pretty good job of
protecting your Registry files from corruption, but from time to time something may slip by
Windows and it will attempt to load a bad Registry. These errors may show up as BSoDs that say
“Registry File Failure” or text errors that say “Windows could not start.” Whatever the case, you
need to restore a good Registry copy. The best way to do this is the Last Known Good
Configuration boot option. If that fails, then you can restore an earlier version of the Registry
through the Recovery Console. Boot to the Windows installation CD-ROM, select the repair
installation to get to the Recovery Console, and type these commands to restore a Registry. Notice
I didn’t not Registry in the previous sentence. Your Registry is corrupted and gone, so you need to
rebuild.
delete c:\windows\system32\config\system
delete c:\windows\system32\config\software
delete c:\windows\system32\config\sam
delete c:\windows\system32\config\security
-10-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
delete c:\windows\system32\config\default
Safe mode is a troubleshooting option for Windows that starts your computer in a limited state. Only
the basic files and drivers necessary to run Windows are started. The words "Safe Mode" appear in the
corners of the display to identify whichWindows mode you are using. If an existing problem does not
reappear when you start in safe mode, you can eliminate the default settings and basic device drivers as
possible causes.
If you don't know the cause of the problem, you can use the process of elimination to help you find the
problem. Try starting all of the programs you commonly use, including the programs in your Startup
folder, one by one, to see if a program might be the cause of the problem.
Starts Windows in safe mode and includes the network drivers and services needed to access the
Internet or other computers on your network.
-11-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
Enable Boot Logging
This option starts Windows normally and creates a log file of the drivers as they load into memory.
The file is named Ntbtlog.txt and is saved in the %SystemRoot% folder.
If the startup failed because of a bad driver, the last entry in this file may be the driver the OS was
initializing when it failed. Reboot and go into the Recovery Console. Use the Recovery Console
tools to read the boot log (type ntbtlog.txt) and disable or enable problematic devices or services.
Enable VGA Mode
Enable VGA Mode starts Windows normally but only loads a default VGA driver. If this mode
works, it may mean that you have a bad driver, or it may mean that you are using the correct video
driver, but it is configured incorrectly (perhaps with the wrong refresh rate and/or resolution).
Whereas Safe Mode loads a generic VGA driver, this mode loads the driver Windows is configured
to use, but starts it up in standard VGA mode rather than using the settings for which it is
configured. After successfully starting in this mode, open the Display Properties and change the
settings.
Last Known Good Configuration
It's a Windows startup option that uses the most recent system settings that worked correctly.
Every time you turn your computer off and Windows shuts down successfully, important system
settings are saved in the registry. You can use those settings to start your computer if a problem
occurs. For example, if a new driver for your video card is causing problems, or an incorrect
registry setting is preventing Windows from starting correctly, you can restart your computer using
Last Known Good Configuration.
Disable automatic restart on system failure
Sometimes a BSOD will appear at startup, causing your computer to spontaneously reboot. That’s
all well and good, but if it happens too quickly, you might not be able to read the BSOD to see what
caused the problem. Selecting Disable automatic restart on system failure from the Advanced
Startup Options menu stops the computer from rebooting on Stop errors. This gives you the
opportunity to write down the error and hopefully find a fix.
-12-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
Windows auto load some programs so they start at boot. The problem with Auto loading programs
is when one of them starts behaving badly—you need to shut off that program!
There are at least five different locations in folders, files, and the Registry that Windows accesses
to auto load programs. To help you, Windows XP includes the handy
System Configuration Utility (MSCONFIG.EXE), a one-stop spot to see and maintain every program
(and service) that auto loads at startup.
The System Configuration Utility enables you to keep individual programs and services from auto
loading, but it does not actually remove the programs/services. If you want to completely delete a
program, you’ll need to find the undelete or Add/Remove Program option.
Services
Windows loads a number of services as it starts. If any critical service fails to load, Windows will
tell you at this point with an error message. The important word here is critical. Windows will not
report all service failures at this point. If a service that is less than critical in Windows’ eyes doesn’t
start, Windows usually waits until you actually try to use a program that needs that service before
it prompts you with an error message
System Files
Windows lives on dynamic link library (DLL) files. Almost every program used by Windows—and
certainly all of the important ones—call to DLL files to do most of the heavy lifting that makes
Windows work. Windows protects all of the critical DLL files very carefully, but once in a while you
may get an error saying Windows can’t load a particular DLL. Although rare, the core system files
that make up Windows itself may become corrupted, preventing Windows from starting properly.
You usually see something like “Error loading XXXX.DLL,” or sometimes a program you need simply
won’t start when you double-click on its icon. In these cases, the tool you need is the System File
-13-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
Checker. The System File Checker is a command prompt program (SFC.EXE) that is used to check a
number of critical files, including the ever-important DLL cache. SFC takes a number of switches,
but by far the most important is /scannow. Go to a command prompt and type the following to start
the program:
SFC /scannow
SFC will automatically check all critical files and replace any it sees as corrupted. During this
process, it may ask for the Windows installation CD-ROM, so keep it handy!
The first thing you’ll need to do is boot off the install disc, and then click through until you see the
“Repair your computer” link in the lower left-hand corner.
You’ll need to choose the correct installation of Windows and then click the Next button.
-14-
Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment
Training Manual and Training Center
Basic(CRTC)
And then you’ll get to the System Recovery Options screen, where you can get to the Command Prompt.
If you want to restore the master boot record, you can simply type in the following command:
bootrec /fixmbr
You can also write a new boot sector onto the system partition with this command (which is often more
useful):
bootrec /fixboot
And of course, if you just use bootrec /? you’ll be able to see all the options.
This is the same way that we fixed the “BOOTMGR is missing” error when trying to boot up Windows 7
or Vista.
-15-