Site hosted by Angelfire.com: Build your free website today!
Chapter 33: Keeping Your Disk Safe

PreviousChapterContentsGlossaryNext

Testing Your Disk Structure with ChkDsk

The ChkDsk (Check Disk) program can both diagnose and repair errors on a wide variety of devices, including hard disks, floppy disks, RAM drives, removable disks, and laptop memory cards. ChkDsk can check the physical surface of disk drivers for bad sectors and possibly recover lost data, and it checks the file allocation table (FAT), the directory structure, and the long filenames associated with many files.

note If Windows crashes or you turn off the computer without shutting down, Windows typically runs ChkDsk when you restart to check your hard disk for errors resulting from the unexpected termination. There are some occasions when ChkDsk will not run.

Running ChkDsk

Certain functions, like fixing disk errors and recovering lost sectors, are not accessible while Windows is running. This is because the repairs cannot be completed while there are open files on the disk to be fixed. When you try to run ChkDsk, Windows might need to schedule the program to run the next time you restart Windows instead.

To run ChkDsk, follow these steps:

  1. Right-click the disk drive in an Explorer window and choose Properties.
  2. On the Properties dialog box for the disk, click the Tools tab and click the Check Now button. You see the Check Disk dialog box:

[image]
  1. Select both check boxes to perform a full disk check and click Start. You usually see a message saying that Windows can't run the program until the next time you start Windows.
  2. Click Yes. The next time Windows starts, you see a message that the disk check has been scheduled, and displaying the results as the program runs, which can take several minutes (depending on the size of the disk). When ChkDsk runs, you see its results before Windows displays your logon screen or desktop.

tip You can also run ChkDsk at the DOS command prompt. Choose Start | Run and type chkdsk at the command prompt. Then press ENTER. To tell ChkDsk to fix any errors it finds, type chkdsk /f instead.

Other ChkDsk Options

ChkDsk can do a number of other things if you run it at the command prompt. To see your options at the command line, type the following at the prompt in a Command Prompt window:

chkdsk /?

or type help chkdsk. When you press ENTER, you see information about ChkDsk's options, which are also listed in Table 33-1. Some switches work only on NTFS partitions, and some work only on FAT32 partitions.

Switch or Argument FAT32 Partitions NTFS Partitions
Volume Specifies the drive to be acted on. Enter the drive letter as the letter and a colon (i.e., c:, d:, x:) or as a volume name (i.e., CRUNCHY, DRV012).
Filename Specifies specific files to be checked for fragmentation. Not used.
/F Fixes errors on the specified disk. If no disk is specified, ChkDsk checks the boot disk and fixes it as needed.
/V Displays the full filename and path of every file on the disk. This is not recommended, unless you have a lot of free time. Not used.
/R Locates and attempts to recover the data in lost sectors. This command also implicitly applies an /F command.
/L:size Not used. Changes the file size of the operations log to the specified amount (in KB: 1MB = 1024KB).
/X Causes a mounted volume to be forcibly dismounted before performing the implicit /F command. This switch cannot be used on the boot volume.
/I Not used. Performs a less complete index check.
/C Not used. Skips checking directory structure cycles.
Table 1: ChkDsk Command Switches

PreviousChapterContentsGlossaryNext