Troubleshooting Operationg System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

Advanced Hardware Operation Sheet : Using Recovery Console Computer Refurbishment

Training Manual and Training Center


Basic(CRTC)

Operation Title: Troubleshooting Operating System


Windows troubleshooting

Overview of Recovery Console


When things get really bad on a Windows system, you need to turn to the Recovery
Console. The Recovery Console is a text-based startup of Windows that gets you to a
command prompt similar to the Windows command prompt.
If you have the Windows 2000/XP CD-ROM, you can start the Recovery Console by running
Setup, selecting Repair, and then selecting Recovery Console. If you like to be proactive,
however, you can install the Recovery Console on your hard drive so that it is one of your
startup options and does not require the Windows 2000 or XP CD-ROM to run. The steps to
do this in Windows 2000 and Windows XP are very nearly identical.

Installing Recovery Console


1. you need to log into the system with the Administrator account.
2. Insert Windows 2000 or XP installation CD-ROM in your system. If the Autorun
function kicks in, just click the No button.
3. To install the Recovery Console and make it a part of your startup options, click the
Start button, select Run, and type the following:

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!

The Recovery Console provides system repair


and recovery functionality.

To start windows Recovery Console


1. Boot from windows XP-CD /if you are currently installed recover console choose it
recovery console from boot up menu that support Recovery console
2. On the first screen of the Windows XP setup, choose the "R" option to start the Recovery
Console, as shown below in Figure

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:

 Attrib - Change the attributes of a file or directory.


 Batch - Runs commands from a batch file. You can output the results either to the screen or to an
output file.
 Bootcfg - Change the configuration of your system's boot process. This modifies the boot.ini file.
 Cd - Changes the current directory.
 ChDir - Changes the current directory.
 Chkdsk - Checks a disk for errors.
 Cls - Clears the screen.
 Copy - Copies a file. Useful if you're having boot problems and need to replace a corrupt file with
a good one.
 Del - Deletes a file.
 Delete - Deletes a file.
 Dir - Shows a list of files in the current or specified directory.
 Disable - Disable a Windows system service or a driver. Good when you can pinpoint a problem
with a specific driver or service.
 Diskpart - Manage partitions using a text-based interface.

-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.

Common recovery commands


fixboot
Probably the two most useful commands in the Recovery Console are fixboot and fixmbr as they can
quickly correct many boot issues with your system.

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. 

Type: y and then press Enter.

A new boot sector will then be written to the C: partition.

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)

How to Restore NTLDR and Ntdetect.com


From the Windows XP CD
The NTLDR and Ntdetect.com files are important system files that are used by your computer to start
the Windows XP operating system. These files can become damaged, corrupted or deleted for a number
of reasons and are usually brought to your attention by the "NTLDR is Missing" error message.

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.

Enter Windows XP 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:

copy d:\i386\ntldr c:\

copy d:\i386\ntdetect.com c:\

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.

2. If you're prompted to overwrite either of the two files, press Y.

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.

How to Restore Hal.dll From the Windows XP CD

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:

expand d:\i386\hal.dll c:\windows\system32

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.

3. If you're prompted to overwrite the file, press Y.


4. Take out the Windows XP CD, type exit and then press Enter to restart your PC.
Assuming that a missing or corrupt hal.dll file was your only issue, Windows XP should now start
normally.

The BSoD(Blue screen of Death)


Sometimes The BSoD appears due to Harddisk sector Problem so to fix such problems use
the following commands
Chkdsk /p

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.

Restore Windows system settings from the


recovery console
Note: If you're able to get into Normal Windows or Safe Mode Windows we suggest restoring
the system to an earlier version before trying the below steps.

1. Boot from the Windows XP CD or Windows Recovery CD.


2. Press 'R' to enter the Recovery Console.

-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.

11. Go into the RP directory you wish to restore, by typing: cd rpX


*where X is the number of the RP you saw in step 10.
12. In the RP directory type: cd snapshot
13. Finally type: Copy _registry_machine_system C:\Windows\system32\config\system
14. After the file has copied successfully type exit and let the computer reboot normally to see if
this resolves you issue.

Device Drivers Problems

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

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

Advanced Startup Options


If Windows fails to start up, use the Windows Advanced Startup Options menu to discover the
cause. To get to this menu, restart the computer and press F8 after the POST messages, but
before the Windows logo screen appears.
Safe Mode

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.

Safe Mode with Networking

Starts Windows in safe mode and includes the network drivers and services needed to access the
Internet or other computers on your network.

Safe Mode with Command Prompt


When you start Windows in this mode, after you log on, rather than loading the GUI desktop, it
loads the command prompt (CMD.EXE) as the shell to the operating system. This is a handy option
to remember if the desktop does not display at all, which, after you have eliminated video drivers,
can be caused by the corruption of the EXPLORER.EXE program. From the command prompt you
can delete the corrupted version of EXPLORER.EXE and copy in an undamaged version. This
requires knowing the command-line commands for navigating the directory structure, as well as
knowing the location of the file that you are replacing. Although Explorer is not loaded, you can
load other GUI tools that don’t depend on Explorer. All you have to do is enter the correct
command.

-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.

Start Windows Normally


This choice will simply start Windows normally, without rebooting. You already rebooted to get to
this menu. Select this if you changed your mind about using any of the other exotic choices.

Auto loading Programs

-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

To work with your system’s services,


Go to the Control Panel | Administrative Tools | Services and verify that the Service you need is
running.
If not, turn it on. Also notice that each service has a Startup Type—Automatic, Manual, or
Disabled—that defines when it starts. It’s very common to find that a service has been set to
Manual when it needs to be set to Automatic so that it starts when Windows boots

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!

Manually Repair Windows 7 Boot Loader Problems


Boot From the Windows Install Disc

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.

Repairing the Master Boot Record

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-

You might also like