Fixing Bad Sectors And Lost Allocation Units

There are two main tools included with Microsoft DOS 6.2x that that allow you to check for and repair bad sectors or lost allocation units. These are: Check Disk <CHKDSK> and ScanDisk <SCANDISK>. In versions of DOS prior to 6.x, the only tool available for correcting file allocation and sector problems was to run the CHKDSK program. CHKDSK by itself checks the status of your hard drive and reports errors but does not correct any problems. In order to correct possible allocation or cross-linked file problems, you need to run CHKDSK with the /f switch. To run the Check Disk program, type:

chkdsk/f

and press enter.

With the introduction of DOS 6.x, Microsoft added a new tool to aid in the repair of these problems. ScanDisk is a very powerful hard disk utility similar to some of the 3rd party programs such as Norton Disk Doctor and PC-TOOLS DiskFix. If you are using DOS 6.x, we recommend using ScanDisk instead of ChkDsk. To run the ScanDisk program, type:

scandisk

and press enter.

If there are any lost allocations or bad sectors you will have the option to fix them.

If it is determined that the hard drive needs formatting, it is always best to run one of these utilities before doing so. If you are experiencing random lock-ups or other strange problems, it is possible one of these utilities will correct the situation. It is also a good idea to run one of these utilities about once a week to ensure the best drive maintenance possible.

Another hard disk maintenance utility, called DEFRAG, defragments your hard drive. As you use files on your hard drive, the system does not always write the information back to the original spot. This results in file fragments being located across the hard drive instead of right next to each other. As fragmentation increases, the probability of lost clusters or cross-linked files occurring increases. The DEFRAG program brings all the pieces back in logical order by putting all the file pieces back together. We recommend running DEFRAG at least once a week for normal usage. You may want to do this more often if you are continuously adding, updating, or deleting files from you system. To run DEFRAG, type

defrag

and press enter at your C:\ prompt.

Each of these programs have various switches that modify the way the program works. An easy way to lean more about these programs is to use the online help supplied with DOS. To use help, type:

help

and press enter from the DOS directory. To receive help on a specific command you can add the command name after the word help. for example type:

help scandisk

and press enter. This displays the help screen for the ScanDisk utility.

You can also receive a brief summary and available switches by typing the command followed by a /?. For example, typing:

chkdsk/?

returns the following information:


C:\chkdsk/?
Checks a disk and displays a status report

CHKDSK [drive:][[path]filename] [/F] [/V]

  [drive:][path] Specifies the drive and directory to check
  filename       Specifies the file(s) to check for fragmentation.
  /F             Fixes errors on the disk.
  /V             Displays the full path and name of every file on the disk.

  Type CHKDSK without parameters to check the current disk.

  Instead of using CHKDSK, try using SCANDISK. SCANDISK can reliably detect
  and fix a much wider range of disk problems. For more information, 
  type HELP SCANDISK from the command prompt.

C:\>

If you are using DOS 6.x, the help summary recommends that you use ScanDisk instead of ChkDsk as it is better at detecting and fixing potential problems. The system displays the same recommendation when you run ChkDsk on when running under DOS 6.x.
Glossary of Terms
Bad Sectors: A bad sector is a part of a hard or floppy disk storage medium that does not hold data. Formatting generally detects and marks these areas as unusable.
Lost Allocations (clusters): An allocation unit is a group of sectors. A Lost Allocation is an allocation that has lost its place on the File Allocation Table (FAT).
FAT: File Allocation Table. Area on the hard drive that maps the sector location of each directory entry. Used by the Operating system to locate your files.
Cross-Linked Files: Cross linked files are a result of the operating system overwrites a portion of one file with another file. Potential causes of cross-linked files are shutting off or rebooting your system without exiting Windows or by not regularly defragmenting your hard drive.


The information in these articles is provided "as-is" without warranty of any kind, and all warranties are hereby disclaimed, whether express or implied, including, without limitation, the implied warranties of merchantability, fitness for a particular purpose and non-infringement. Gateway 2000 will not be liable for any damages whatsoever, whether direct, special, indirect, incidental, or consequential (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of, or related to your use of, or inability to use the information in any such article, even if advised of the possibility of such damages. Because some states and jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. You may not further distribute, reproduce, rent, sell, transfer or license these articles.

If our documentation hasn't helped you,
this might be a good time to send
an e-mail to Technical Support.

[Products] [Global Site] [Tech Support] [Corporate Information] [The Cow Zone] [What's New] [Glossary] [Search] [Home]

[Gateway 2000]
Copyright © 1996 Gateway 2000 Inc. All rights reserved.
Please see our Legal Information. Please send feedback to Webmaster Central.