Abstract
This chapter presents tips and techniques you can use to diagnose problems. The chapter covers diagnostic and repair utilities included with Windows NT, preventive maintenance, Windows NT Service Pack updates, the Windows NT registry and the registry editors, and restoring damaged configurations.
All but the most infrequent users of personal computers are familiar with error messages and system lockups. Even an operating system as stable and reliable as Windows NT can occasionally experience problems. These problems can range from benign error messages to major system failures that render your system inoperative. Fortunately, familiarity with basic troubleshooting skills can help you overcome many of the problems that might otherwise cripple your system.
In this chapter, well present tips and techniques that you can use to diagnose problems. Well also acquaint you with preventive measures that will help eliminate problems before they reach the critical stage. Well cover the following key topics:
Diagnostic and repair utilities included with Windows NT
Preventive maintenance
Windows NT Service Pack updates
The Windows NT Registry and the Registry Editors
Restoring damaged configurations
RUNNING DISK DIAGNOSTICS
All the information vital to the computers operation including the operating system, user applications, and data is stored on the hard disk, so its health and well-being are of the utmost importance. To help you maintain your disk volumes, Windows NT contains a disk diagnostic utility, called Chkdsk, that you can run from the Explorer interface or at a command prompt (youll learn how to run this utility in the following section).
You should run the Chkdsk utility on all of your hard disks on a regular basis (at least once a week in a heavy-use environment, once every two weeks for systems that are used less frequently). Regularly scheduled disk checks will help you catch minor problems before they mushroom. In addition to using the disk check utility as a preventive maintenance measure, you should use it whenever you suspect a disk or its files have been damaged. The following section describes how to check your disks in Windows NT.
Chkdsk, Windows NT Style
If you have used an MS-DOS-based computer, you are probably familiar with the DOS Chkdsk command. The Chkdsk utility is a disk diagnostic program that identifies and repairs several basic types of problems, including lost clusters (orphaned pieces of file data), cross-linked files, and invalid file size allocations.
Although DOS Chkdsk is better than nothing at all, the utility has its limitations. The ScanDisk utility included with DOS versions 6.x and Windows 95 is a much better program. Scandisk provides a wider array of tests and repair capabilities, including the ability to perform a thorough surface scan to identify and lock out bad disk sectors. Many users also run third-party disk diagnostic utilities in the DOS and Windows 3.x/Windows 95 environments, and these programs often contain features superior to those in Chkdsk and ScanDisk.
Windows NT also includes a Chkdsk command, but its version is far more powerful than the DOS/Windows 95 Chkdsk utility. Despite its DOS-evoking name, Windows NTs Chkdsk has capabilities and features similar to ScanDisk. As with ScanDisk, Windows NTs Chkdsk detects many disk-corrupting problems and runs surface scans that detect bad sectors, lock them out, and relocate affected data.
Tip for Windows 95 Users: Although Windows NTs Chkdsk should be powerful enough for most users needs and is the recommended choice for NT disk diagnostics, you also have the option of booting Windows 95 (if this is a dual-boot 95/NT system) and running the ScanDisk utility on File Allocation Table (FAT)-based Windows NT volumes. Windows 95s version of ScanDisk is compatible with the Windows NT environment, so it can analyze and repair Windows NT FAT volumes without damaging data. This utility should not be run from inside Windows NT, however.
In previous versions of Windows NT, Chkdsk had to be run from a Windows NT Command Prompt. Windows NT 4.0, however, has a graphical version of Chkdsk that can be launched from several places within Windows NT.
Special Note: Windows NT automatically runs Chkdsk when it detects that the system was abnormally restarted (was reset or lost power) or that there is disk corruption on a volume.
To check a disk volume in Windows NT, you can use the following methods:
Locate the drives icon in My Computer, right-click it (or open the File menu), and choose Properties. From the Tools tab of the drives Properties window, choose Check Now (shown in Figure 7.1).
Run the Windows NT Disk Administrator utility, located in the Start menu/Programs/Administrative Tools folder. Select the drive to be examined, and select Check for Errors from Disk Administrators Tools menu (shown in Figure 7.2).
Run the Chkdsk command manually from a Windows NT command prompt.
The Chkdsk command, run from a command prompt window, has the following command format:
filename is the file(s) being checked for fragmentation (used only with FAT volumes)
/F fixes errors on the disk
/V displays the full path and name of every file on the disk
/R locates bad sectors and recovers readable information
/L:size changes the log file size to the specified number of kilobytes (used only with NT File System (NTFS) volumes). If size is not specified, this will display the current log file size.
When you run one of the graphical versions of check disk, you have the option to automatically fix errors (/F) and locate bad sectors (/R). You can enable these options in the dialog box, shown in Figure 7.3, that appears immediately after you instruct Windows NT to check the drive.
If the drive you are checking is in use by Windows NT or any running process, such as the Windows NT paging file or a user application with open files on the drive, you will be informed that the check cannot be performed immediately and asked if you want the check to occur the next time the system is restarted (see Figure 7.4). Answer Yes to this question to schedule the drive check during the next system boot. You can schedule checks for multiple drives by repeating this process for each drive you want checked.
Currently, no third-party NTFS or Windows NT-specific disk diagnostic utilities are available. Even the recently released Norton NT Tools product from Symantec Corporation (makers of The Norton Utilities and Central Point Deluxe, two highly popular DOS and Windows 3.x/95 utilities) doesnt include a Windows NT disk repair utility.
Special Note: The current lack of Windows NT disk utilities is not all that strange. Windows NTs robust design makes disk corruption an infrequent occurrence compared to DOS, Windows 3.x, and Windows 95, so no acute need exists for such packages. Another, perhaps more important, reason for the lack of NT-based disk utilities is that NT doesnt provide the direct access to hardware required by these utilities.
Caution: As mentioned in Chapter 6, Managing Memory and Disks, be careful when using older versions of DOS disk utility software on Windows NT FAT volumes. These utilities might not recognize Windows NTs boot sector and damage or replace it. Also, if the utility is unaware of long file names, any repairs made to long file name files may result in the files being truncated to their short 8.3 MS-DOS file names. Check with the utilitys developer regarding Windows NT compatibility before attempting to run it on your hard disk(s).
REPAIRING WINDOWS NT WITH THE EMERGENCY REPAIR DISK
You may remember that during installation, Windows NT Setup asked if you wanted to create something called the Emergency Repair Disk (ERD). This disk is used to store vital information about your Windows NT configuration, including the startup/boot files, startup environment variables, and general system configuration information (i.e., Windows NT Registry data). The ERD can also be a lifesaver if your Windows NT installation should ever become damaged or unstartable. In these situations, the ERD can often be used in conjunction with the Repair a Damaged Windows NT Installation feature of the Windows NT Setup program to repair the damaged installation. This feature of Windows NT Setup inspects various aspects of your systems configuration for corruption. If corruption is detected, Windows NT can use the information on the ERD to recover the damaged portion of the configuration. Although Windows NT can also attempt to repair a damaged installation without the ERD, this method is not as likely to produce a successful recovery.
Creating/Updating the Emergency Repair Disk
Because the information referenced by the ERD changes when you change your Windows NT system, you should update the disk frequently to keep it in sync with your current system configuration. As a rule, the ERD should be updated whenever you make any significant changes to your Windows NT Environment, such as changing your disk configuration (via Disk Administrator), installing a Windows NT Service Pack update, or installing new devices such as SCSI or video cards that have new Windows NT device drivers or services associated with them. All of these changes produce significant modifications in your Windows NT system configuration and warrant an update of the ERD.
For More Information: For more information on Windows NT Service Packs, see Updating Windows NT with Service Packs.
Windows NT creates and maintains the ERD using a special utility called the Repair Disk Utility (Rdisk.exe). Unfortunately, this utility has no shortcut icon on the desktop or in the Start menu. To run the Repair Disk Utility, you must either run it manually using the Start menus Run command or create a shortcut to it that can be placed on the desktop or in a Start menu program folder.
The ERD contains a copy of the system configuration information stored on your hard disk. This information is stored in the %SYSTEMROOT%\repair folder (e.g., C:\winnt\repair). Therefore, before creating the ERD, you should first update the repair information stored in this directory. The Repair Disk Utility lets you accomplish these tasks using the following options:
Update Repair Info: Updates the Windows NT repair information stored in the %SYSTEMROOT%\repair folder. You should use this option before you create the repair diskette.
Create Repair Disk: this option formats and copies the repair information stored on the hard disk to a floppy diskette (the ERD).
Special Note: The Windows NT ERD is not a bootable diskette and cannot be used to start Windows NT in the event of a boot/system failure. It must be used in conjunction with the Windows NT Setup program to recover information on the hard disk.
To provide even better protection against disasters, you should really create two ERDs: one before you make a major system change and one after you make the change. The pre-update version could come in very handy were anything to go wrong during the modification. The other updates the repair disk you keep for needed repairs.
To update your ERD or create it if you skipped this process during Windows NT Setup, follow these steps:
Open the Start menu and choose Run.
Type rdisk to run the Repair Disk Utility (shown in Figure 7.5).
Choose Update Repair Info to update the repair information saved on your hard disk. Windows NT will confirm that you want to replace the old repair information; choose Yes to update the information.
After the repair information has been updated, Windows NT will prompt you to label and insert a disk in your A: floppy drive. The disk should be a high-density (i.e., 1.44 MB 3.5" or 1.2 MB 5") floppy disk. It can be formatted or unformatted; Windows NT will always format it regardless. Insert a disk and click OK or press Enter.
The current repair information is copied to the disk. Remember to store the ERD in a safe place.
WinConnections Conference Fall 2008 Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).
Master SharePoint with 3 eLearning Seminars Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!
SharePointConnections Conference Fall 2008 Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).
VMworld 2008 - Sign Up Today! Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.
Microsoft® Tech•Ed EMEA 2008 IT Professionals Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.
Order Your Fundamentals CD Today! Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.
Are You Really Compliant with Software Regulations? View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.
Virtualization Congress Oct. 14-16 in London Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16 in London.