Detecting and Repairing Disk Errors


NTFS was introduced and billed as a "robust and self-healing" file system, as opposed to FAT, which is not. All in all, I would have to agree with Microsoft on this one. I have yet to have an NTFS partition go "sour" on me in any way, shape, or form. I've had NTFS partitions that would not boot and key system files that would not run, but for the most part, these errors were self-inflicted and usually brought on by playing with fire.

Some other versions of Windows have the ScanDisk program whose job it is to detect and repair the file allocation table (FAT) when you shut down improperly. You also can run it manually from time to time. This program hearkens back to DOS days. From within the Windows XP GUI, the replacement program for ScanDisk is called Error Checking.

TIP

If you dig a little deeper, you'll find command-line hard disk volume checkers in the %SystemRoot%\System32 directory. They are not called ScanDisk, as they were in some previous versions of Windows. Look for chkntfs.exe (for NTFS partitions) and chkdsk.exe (for FAT/FAT32 partitions). For a description of how each works, just add the normal /? switch, or see Windows online help. The available commands enable you to turn on or off automatic checking and repair a "dirty" (improperly shut down) drive at bootup.


Error Checking checks the file system for errors and the drive for bad sectors (bad spots). To run the program, do the following:

1.

In My Computer or the Explorer, right-click the drive you want to check.

2.

On the context menu, choose Properties.

3.

Click the Tools tab.

4.

In the Error-Checking section, click Check Now. A dialog box appears, as shown in Figure 29.7.

Figure 29.7. Checking a disk for errors in the file system and bad spots on the disk.


You can run the error check with neither of the option boxes turned on. You are not required to close all open files and programs. However, if you check either of the boxes, you are told that all files must be closed for this process to run. You are given the option of deferring the check until the time you restart your system, however.

The meaning of the options is as follows:

  • Automatically Fix File System Errors If file directory errors (for example, lost clusters, files without end-of-file markers, and so on) are found, this option specifies whether the program should fix them.

  • Scan for and Attempt Recovery of Bad Sectors This option specifies whether the program should attempt to locate bad sectors, mark them as bad, and recover data from them, writing it in a known good area of the disk. If you select this option, you do not need to select Automatically Fix File System Errors; Windows fixes any errors on the disk.

TIP

If your volume is formatted as NTFS, Windows automatically logs all file transactions, replaces bad clusters automatically, and stores copies of key information for all files on the NTFS volume.




Special Edition Using Microsoft Windows XP Professional
Special Edition Using Microsoft Windows XP Professional (3rd Edition)
ISBN: 0789732807
EAN: 2147483647
Year: 2003
Pages: 450

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net