Chapter 35: Troubleshooting Windows XP
What Diagnostic Tools Does Windows XP Provide? Windows provides a wide range of diagnostic tools that you can use for different kinds of problems. In addition to the tools listed here, see "Configuring Windows Using the System Configuration Utility" in Chapter 37.
Startup Modes The worst problems prevent Windows from starting up at all. If the Windows installation on your hard disk is intact, you can start Windows in one of several special startup modes that provide limited function and help diagnose problems. Windows XP, however, brings its legacy from Windows 2000 and Windows NT, decidedly more complicated operating systems than Windows 98 and Me. Because of this sophisticated lineage, Windows XP has a number of more challenging options than Windows 98/Me. Nearly every mode has a purpose and the added options give you more recourse when disaster strikes.
Press F8 during Windows startup (when you see the boot menu, if you have a dual-boot system) to see a menu of startup modes:
- Safe Mode Windows starts by using the simplest possible set of drivers and hardware devices. If Windows still doesn't start, try Safe Mode With Command Prompt or the Recovery Console.
- Safe Mode With Networking Windows starts by using the simplest possible set of drivers and hardware devices but also includes simple networking components. If Safe Mode works and you need information from a network, try this mode.
- Safe Mode With Command Prompt Windows starts by using the simplest possible set of drivers and hardware devices. It further reduces the overhead by not loading the Graphical User Interface--you communicate with it by typing DOS-style commands. This mode works the same way as the Recovery Console.
- Enable Boot Logging Windows starts normally but logs all the drivers it loads in the file Ntbtlog.txt (usually stored in C:\Windows). Use this mode if you think that a device driver might be the problem.
- Enable VGA Mode Windows loads the standard, super-compatible Microsoft VGA driver, which can often assist in reducing conflicts until you can fix the problem. Use this mode if your video driver isn't working.
- Last Known Good Configuration Windows starts using the last configuration that did not to have any known problems. It uses backup copies of your Registry and device driver files.
- Directory Services Restore Mode This mode is not used in either Windows XP Home Edition or Professional: it is used on Windows servers.
- Debugging Mode Windows starts normally but sends debugging information through a serial cable to another computer (rarely used except by Windows system programmers).
- Selective Startup This mode isn't displayed on the Windows startup menu that appears when you press F8. Instead, you enable it by using the System Configuration Utility. Windows prompts before loading or running each driver or program.
- Normal Mode Windows starts normally.
Windows XP does not support DOS, with the exception of a DOS Virtual Machine, to run legacy applications. Because of this, Windows can not start up in DOS mode. Of course, you can still start up DOS from a floppy disk, Zip drive (if your BIOS supports it), or bootable CD-ROM. When running DOS, you can't read disks formatted with NTFS.
Safe Mode Safe Mode is a limited operating mode used to diagnose problems. All of Windows' basic functions are available, but the screen runs in basic VGA mode (640 × 480, 16 colors) and no devices are available beyond the screen, keyboard, and disks. See "Booting in Safe Mode" in Chapter 13 for more information.
Safe Mode With Networking Safe Mode With Networking is the same as Safe Mode, but with some simple networking components installed. This mode is helpful if you have an immediate need to access files over a network before you can fix your computer, if the tools you need to fix your computer are located on a remote machine, or you would like to be able to take advantage of the new Remote Assistance feature.
Safe Mode With Command Prompt or Recovery Console Safe Mode With Command Prompt is nothing like the modes described in the previous two sections. Instead of emerging into a pygmy version of the Windows desktop, this mode ejects you into a dark world with no comforting menus or OK buttons. This place is called the Command Prompt or Command Line Interface (CLI). In order to issue commands you must know an arcane language that consists of only words and some symbols. Most DOS commands will work here, but this is not DOS.
The Command Prompt also doubles as the Recovery Console that you can start from the Windows XP CD-ROM. All of these commands apply there as well. You can enter the Recover Console by booting from the Windows XP CD-ROM (as described in section "Booting off the Windows XP CD-ROM" in the Appendix), and pressing R when the text mode part of the setup begins. You can install the Recovery Console as a startup option by putting the Windows XP CD-ROM in the CD drive, choosing Start | Run, typing d:\i386\winnt32.exe /cmdcons (replacing d: with your CD-ROM drive letter if it's not D:) and clicking OK. Recovery Console appears as an option on the boot menu that Windows XP uses for dual-boot systems, which is described in the Appendix. The Safe Mode With Command Prompt asks you to enter your Administrator password. If you didn't enter one when you installed Windows, you don't need one here. If you wrote down any names of files that were indicated as being corrupted or the cause of your systems recent demise, that's good. Its even better if you note any files that may be causing your system not to start up properly. Using the command prompt you can often go in and fish out these culprit files, though it's best to do this with a qualified technician (or at least the proven local nerd).
To get a listing of all commands in the Recovery Console, simply type HELP at the prompt and press ENTER.
- When you see the command prompt (usually C:&ra;), type a command and press ENTER. Here are a few useful commands:DIR (Directory) Displays a listing of the files in the directory you are currently in. Items that have a &la;DIR&ra; legend next to them are directories (folders). Type DIR /P to tell Windows to pause if there are more than a screenful of items. Type DIR /W to cause the listing to be shown in several columns. Better yet, type DIR /P/W for a multicolumn listing that pauses before scrolling.
You can use an asterisk to represent part of the filename. For example, to list all text files, type this:
DIR *.txtCD (Change Directory) To move to a different directory (folder), type CD and a space and the name of the folder. For example, to move to the Windows folder that is contained in the current folder, type:
CD windowsIf you want to go deeper in one go, you add directory names, like so:
CD windows\system32If you want to back out of a directory and return to what is called the "parent" directory of the one you are in, type the following:
CD ..The two periods indicate one level up.
- DEL Deletes the indicated file or files. Type DEL followed by a space and the name of the file to delete. You must indicate a file by name and extension. This can be dangerous, so be very cautious and always triple-check whatever it is you plan on deleting. For example:
DEL filename.txtYou can use an asterisk to represent part of the filename. For example, to delete all Word documents, type this:
DEL *.doc
- CHKDSK The Microsoft Check Disk utility has been upstaged by ScanDisk since Windows 95 first shipped, but no more. CHKDSK is far more capable these days and can even work with NTFS-based systems. To get basic info and run a simple test, type CHKDSK and press ENTER. Windows checks the integrity of the current partition and lists the current space usage. In order for the utility to do all of its magic, however, it must do so before Windows starts. Type this:
CHKDSK /FFirst, CHKDSK displays an error, and then it asks whether you'd like to run it the next time Windows restarts. Press Y and ENTER. CHKDSK will run when you next boot up Windows.
The Boot Floppy Disk Historically, one of the steps in the Windows installation process created a startup floppy disk, or boot floppy disk. The general idea was that if the file system on your hard disk was damaged, you could often start your computer from the startup floppy disk and repair the damage enough to make the hard disk bootable.
You can still make a boot floppy in Windows XP, but Windows now includes System Restore, a sort of time traveling utility that can take your Windows machine back in time to when it actually worked.
To make a boot floppy in Windows XP, you need a single 1.44MB floppy disk. Follow these steps:
- Write-enable the disk and put it in the disk drive.
- Choose Start | My Computer.
- Right-click the 3 1/2 Floppy (A:) icon and choose Format from the shortcut menu that appears. You see the Format 3 1/2 Floppy (A:) dialog box.
- Select the Create An MS-DOS Startup Disk check box.
- Click Start. Windows creates a bootable startup disk.
- Remove the disk from the drive, write-protect it, label it, and put it in a safe place.
If you use this floppy disk to start your system, you see the DOS command prompt, described in Chapter 39. No drivers are loaded, so you can't use your CD-ROM or other hardware, and you can't see your NTFS disks, only disks formatted as FAT or FAT32.
System Information You can display the System Information window by choosing Start | All Programs | Accessories | System Tools | System Information. This window (shown in Figure 35-1) displays detailed information about all the devices and hardware drivers configured into your copy of Windows, and is a good place to check to see whether system components are correctly are configured. We find it more efficient than poking around the various dialog boxes that the Control Panel displays. Its Tools menu lists a number of other useful diagnostic programs you can run.
Figure 35-1: The System Information window displays the state of your hardware and software.
The Windows XP Setup Wizard The Windows XP Setup Wizard may be able to repair a corrupted Windows XP installation. Follow these steps:
- Start the Setup Wizard from the Windows XP CD-ROM by putting the CD-ROM into your CD drive and choosing Install Windows XP. After the first reboot, the Setup Wizard should find the existing installation of Windows XP and ask whether you want to repair it.
- Press R to attempt the repair. The Setup Wizard tries to repair the installation, and then prompts you to reboot.
- Press F3 to restart. After you reboot back into the Windows XP Setup, you can quit the Setup Wizard without reinstalling Windows by pressing F3.