Number 212 - January 2001
Why and How to Defragment Your Hard Drive Under Windows 95/98
By Laura Balsam - NYPC Bytes!
    In the course of troubleshooting Windows 95/98 problems, I have found that Windows is extremely sensitive to hard disk fragmentation. Even with gigabytes of free disk space, fragmentation can slow Windows to a crawl and cause lockups, crashes, etc.

    This article will show you how to tell if your hard drive is fragmented. Windows defragmentation utility often erroneously reports that a drive is not fragmented when, in fact, it is.

    I recommend against using the Windows Task Scheduler to test and defragment your hard drive. Both SCANDISK and the Disk Defragmenter will run more quickly and reliably when Windows is not in multitasking mode. Multitasking mode is the one you normally use, the one that supports the task scheduler.

    I recommend performing this procedure once a month, or if system performance slows noticeably. If you have less than 150 MB free on your hard drive you may need to do it significantly more often.

    The following steps are provided in an attempt to help you. Neither NYPC nor I assume any responsibility for any problems including, but not limited to, data loss resulting from following them.

    Backup your data before beginning this procedure!

    Test Your Hard Drive Before Running the Defragmenter

    · Use the mouse to press the START button on the task bar

    · Select SHUTDOWN

    · Select RESTART IN MS-DOS MODE and OK, Windows will shutdown and you will see a black screen with white text

    · Type in "scandisk" and press ENTER

    · When asked, perform the full surface scan

    While the surface scan is in progress a map of your hard drive will be displayed. You need to have a large contiguous area of unused space. If you do not have enough contiguous free space, Windows will run slowly and be prone to instability. If there are a lot of partially used blocks, Windows will sometimes run more slowly. If there is almost no unused space, Windows will be extremely slow and programs will lock up a lot.

    If the surface scan finds errors, fix them. If asked, always provide SCANDISK with the backup floppy it requests in case something goes wrong.

    When SCANDISK is done, reboot normally

    Even if a visual inspection of the hard drive map does not show the need for immediate defragmentation, the hard drive should still be defragmented monthly. It will help keep the operating system stable and peppy.

Defragment Your Hard Drive

Delete Temporary Files

    When programs are installed and while they are running they create temporary files. The software is supposed to clean up after itself, but sometimes this doesn't happen. These files are placed in special directories so they can be easily located and deleted.
    Cleaning out your "temp" directories will free up space on your hard drive. Do it before defragmenting, so the space can be most efficiently reclaimed.

    Do not perform files deletions unless you are confident of your ability to safely delete and restore files from your hard drive

    · Delete the contents of c:\windows\temp

    · Delete the contents of c:\temp (if it exists)

    · Reboot.

    If there are no errors reported during reboot, empty the Recycling Bin, otherwise restore any files who absence generates error messages.

    Reboot to Safe Mode by restarting and repeatedly pressing F8 as soon as the PC recognizes the floppy drive. A menu will be displayed. Select SAFE MODE and press ENTER.

    If you are running Windows 98, you can also hold down the CTRL key.

    Once your computer has rebooted, it is a good idea to disable your screensaver: right click on the desktop, select PROPERTIES; select the SCREENSAVER tab and change the time to 0.

Defragment

    Use the mouse to press the START button on the Task Bar.

    · Select PROGRAMS, ACCESSORIES, SYSTEM TOOLS, and run the DISK DEFRAGMENTER.

    · Even if the defragmenter reports that your hard drive is 0% fragmented, continue with defragmentation

    · When the defragmenter is done, exit the program

    · Re-enable your screensaver if necessary

    · Reboot normally.

    If the hard drive is badly fragmented, defragmentation can take over an hour and a half. The longer it takes, the more improvement you will usually see. If you do this monthly, it should not take long.

    If defragmenting your hard drive regularly takes more than 1/2 hour, you do not have enough free hard disk space and it is getting fragmented almost immediately. You need to free up some space. You are probably experiencing frequent lockups and crashes.

    On a very large or badly fragmented drive, the defragmenter will often stall at 10% for a long time while it is figuring out how to move your files.

    Factors Affecting the Time Required to Defragment a Hard Drive

    · The size of the hard drive

    · The speed of the hard drive, seek time and data transfer rate

    · How badly fragmented the hard drive is

    · Even in Safe Mode, a screensaver can slow defragmentation down by forcing it to restart.

    I adhere to the procedures described above and have had fewer operating system problems as a result.
  Number 212 - January 2001