Error Defragmenting Drive C

Hi.

My wife and I have a Pentium 75. When we bought our computer it had Windows 3.1. Since our purchase back in 1995 we have upgraded to Windows 95 Plus, added a new modem, soundcard, added RAM and added a 2G hard drive.

Currently we have a H:host for C, C drive and drive D. We use drive C exclusively.

Anyway, I have been trying to defrag and am having no success. I keep coming up with and Error Defragmenting Drive C which says: Windows could not access part of this drive. Click Help, and carry out the instructions for running ScanDisk. The message tells me to run the thorough option of ScanDisk and gives an ID No: DEFRAG006.

I have run the Thorough option of ScanDisk several times though windows and from DOS. Still, after I run the through option of ScanDisk and try to defrag, I get the same message.

Drive C is 20% fragmented so you can see the performance can be significantly increased.

Any help with this is greatly appreciated.
konradmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

konradmAuthor Commented:
Edited text of question.
0
cmcgeeCommented:
I have ran into this problem before as well. Here is the Technet article that I used to fix it.

In particular the section that refers to editing the scandisk.ini was the most helpful. ( ScanTimeOut=On NumPasses=5 )

Let me know if this helps,
Craig

PSS ID Number: Q160043
Article last modified on 05-25-1999
 
WINDOWS:95
 
WINDOWS
 

======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft Windows 95
 - Microsoft Plus! for Windows 95
 - Microsoft Windows 98
-------------------------------------------------------------------------------
 
SYMPTOMS
========
 
When you run Disk Defragmenter (Defrag.exe), you may receive the following error
message:
 
   Error Defragmenting Drive <drive>. Windows could not access part of the
   drive. Click Help and carry out the instructions for running ScanDisk.
   IMPORTANT: To fix this problem, you must run ScanDisk and choose the Thorough
   option.
   ID No: DEFRAG005
 
Note that the "ID No: DEFRAG005" portion of the error message may be replaced by
"ID No: DEFRAG006."
 
CAUSE
=====
 
This error occurs when Disk Defragmenter is unable to read from or write to one
or more bad sectors on the hard disk. The DEFRAG005 error message is displayed
when Disk Defragmenter is unable to write to a sector. The DEFRAG006 error
message is displayed when Disk Defragmenter is unable to read from a sector.
 
RESOLUTION
==========
 
Before you attempt to work around this problem, you should first make a backup
copy of any important data on your hard disk. After doing so, run ScanDisk
(Scandskw.exe) and perform a thorough test on the hard disk. To do so, follow
these steps:
 
1. Click the Start button, point to Programs, point to Accessories, point to
   System Tools, and then click ScanDisk.
 
2. Click the hard disk referenced in the error message, and then click Thorough
   in the Type Of Test area.
 
3. Click Options, verify that System And Data Areas is selected, and then click
   OK.
 
4. Click Start to begin the test.
 
If ScanDisk does not find any bad sectors, or if running ScanDisk does not
correct the problem, configure ScanDisk to detect disk timeouts and check each
cluster five times while performing a surface scan. To do so, follow these
steps:
 
1. Use any text editor (such as Notepad) to open the Scandisk.ini file in the
   Windows\Command folder.
 
2. Create an [Environment] section in the file, if the section does not already
   exist, and then add the following lines to the section:
 
   " ScanTimeOut=On NumPasses=5 " (without the quotation marks)
 
   Note that the "ScanTimeOut=" and "NumPasses=" lines may already exist, but
   with different values.
 
3. Save and then close the Scandisk.ini file.
 
4. Click the Start button, click Shut Down, click "Restart the computer in
   MS-DOS mode," and then click Yes.
 
5. Type the following line and then press ENTER to run ScanDisk
 
   " scandisk <drive>: " (without the quotation marks)
 
   where <drive> is the drive letter of the hard disk you want to check.
   Note that you should run a surface scan when ScanDisk prompts you to do so,
   repair any errors that ScanDisk finds, and view and save the log file that
   ScanDisk creates.
 
6. When ScanDisk is finished, type "exit" (without the quotation marks) and then
   press ENTER to return to Windows 95.
 
7. Run Disk Defragmenter again.
 
If you still receive the above error message, run Disk Defragmenter to
consolidate free space only, then defragment files only, and then perform a full
defragmentation (both files and free space). To do this, follow these steps:
 
1. Click Start, point to Programs, point to Accessories, point to System Tools,
   and then click Disk Defragmenter.
 
2. Click the hard disk referenced in the error message, and then click OK.
 
3. Click Advanced, click Consolidate Free Space Only, and then click OK.
 
4. Click No when you are prompted to quit Disk Defragmenter.
 
5. Click the hard disk referenced in the error message, and then click OK.
 
6. Click Advanced, click Defragment Files Only, and then click OK.
 
7. Click No when you are prompted to quit Disk Defragmenter.
 
8. Click the hard disk referenced in the error message, and then click OK.
 
9. Click Advanced, click "Full defragmentation (both files and free space)", and
   then click OK.
 
10. Click Yes when you are prompted to exit Disk Defragmenter.
 
If ScanDisk does not find any bad sectors, or if running ScanDisk does not
correct the problem, contact the manufacturer of your computer or hard disk to
inquire about additional workarounds that may correct the problem.
 
MORE INFORMATION
================
 
Many hard disks have sectors that are unusable. If the sectors have been marked
as bad by ScanDisk or another disk tool, Disk Defragmenter displays the sector
as a white box with a red line through it. This indicates that the cluster has
been marked as bad and cannot be used to store data.
 
If the disk tool you use is unable to detect bad sectors on your hard disk, or if
you do not run a disk tool on a regular basis, unusable sectors that are not
marked as bad may exist on the disk. When this occurs, you may not realize that
the bad sectors exist until Windows 95 attempts to store data in them.
Therefore, it is possible for bad sectors to appear while you are using the
drive normally. If bad sectors begin to appear on a regular basis, your hard
disk may need to be repaired or replaced.
 
Note that you may be able to prevent the error message from being displayed by
deleting some files on your hard disk, but doing so does not fix the problem
that is causing the error message to appear. Disk Defragmenter does not read
from unused sectors while defragmenting a drive. Therefore, if an unusable
sector that does not contain any data exists on your hard disk, the problem
described in this article may not occur.
 
Additional query words: osr1 osr2
 
======================================================================
Keywords          : kbenv kberrmsg kbtool winplus scandisk win95 defrag
Version           : WINDOWS:95
Platform          : WINDOWS
=============================================================================
Copyright Microsoft Corporation 1999.


 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
j_powersCommented:
That is a lot of information, but it is very valuable. If the scans do not work, then the best thing to do is go to the company of your hard drive, and see if they have diagnostic software. Most do, and that will give you some help. I have even heard of these programs fixing the problem.

There is a possibility that your partitions are also the cause. There are a couple things you can try like cleaning the Master Boot record. I will show you how if the scans do not work.

The biggest thing to do right now, though, is back up your hard drive. If this is remnants of errors, then you do not want to loose your data.

Let me know.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Asta CuTechnical consultant & graphic designCommented:
MAKE SURE YOU'RE NOT USING OR RUNNING FASTOPEN; also check if you're running quickfinder or fastfind; sometimes interfere.
alt-ctrl-del should confirm
---
These may also help

http://support.microsoft.com/support/kb/articles/Q128/9/60.asp
Disk Defragmenter Err Msg: Error Defragmenting Drive C
---http://support.microsoft.com/support/kb/articles/Q93/4/54.ASP
Microsoft Windows for Workgroups version 3.1
---
Defrag005 and 005 as commented earlier, has this link

http://support.microsoft.com/support/kb/articles/Q160/0/43.asp

 
0
Asta CuTechnical consultant & graphic designCommented:
First, prior to running DEFRAG, ALT-CTRL-DEL and end task on all but systray and explorer.  Make sure nothing is running in the background; viruscan, web page updates, task scheduler, etc. etc. etc....  Stop any TSRs, screen savers, fastfind, quickfinder, etc. ANYTHING ELSE THAT ISN'T NEEDED (you might need to check your startup files as to what else may be loading/running in the background to interfere with your scandisk/defrag processes.  Win3.1 upgrade to 95, etc... has residual problems and roadblocks, but first things first.  You might want to try:

To reboot your system and at the sentence, Starting W95, hit the F8 key on the keyboard and go into SafeMode from the menu that you see. Run Defrag again while you are in SafeMode where just a bare minimum of drivers, etc. are loaded. Don't forget to disable your virus program before you run Defrag.

Additional resources in your research may help:

http://support.microsoft.com/support/kb/articles/Q159/5/60.asp

Friend advised this helped him with defrag006 error on WIN95.

Defrag choose advanced options and run the consolidate free space only, 3rd option; reboot, back to defrag 2nd option defrag only, then reboot; then full defrag; after which another reboot caused the error message to disappear.  Since I've upgraded to Win98, can't test for validity, but he said it helped him.

---

Hope you don't have to FDISK and start all over with Win95/98 to rid yourself of 3.1 residuals and problems, but that may be an ultimate need.
0
bolixCommented:
It looks like you've doublespaced/drivespaced the hd. Make sure to read the maintenance portion of the drive/doublespace compression help before you do any of the above...

Good luck!
0
Asta CuTechnical consultant & graphic designCommented:
Good point, Bolix; given the H host drive as noted.
0
gerrymcdCommented:
run a full surface scan on your harddisk thi will wlimate all the bad sectors. then run scandisk see does this doi it!
0
konradmAuthor Commented:
Thanks to everyone that has tried to help. I have had to this point, no success. I'm not going to give up.

When we had the new hard drive installed, the guy that installed it set the new hard drive as drive C and kept a copy of it on drive D incase anything went would possible go wrong. Also, I believe he double-spaced drive C. When he did this work he also upgraded Win95 to Windows 95 Plus!

 Here is what I have done so far:

I went into the Scandisk.ini file and set ScanTimeOut=On and NumPasses=5

I restarted the computer in DOS mode and ran a Scandisk on Host for C and drive C.

I then restarted the windows in SafeMode and tried to defrag again. When it gets 10% complete I get the same error message. I tried to consolidate free space only with no luck.

Again, all suggestions are greatly appreciated.
0
bolixCommented:
Scan drive H first then scan C ?
0
Asta CuTechnical consultant & graphic designCommented:
Listening for more; don't want to add yet other recommendations until we know actual status after trying as posted.  H vs. C key; then, of course, following incremental steps on the recommendations posted.  Nothing new from me here that others haven't already posted, except to say that when we're in troubleshooting mode, we benefit most when we actually print the process and ensure that each step is methodically followed.  Sometimes something as simple as the order of things we do (executions), make all the difference.

Asta
0
konradmAuthor Commented:
CMCGEE,

Thank you very much for you help. It took a lot of time, but it finally worked!!

I followed your instuctions verbatim several times and it still wouldn't defrag. As I was running scandisk in DOS, I noticed that it would take forever to scan one particular file - it was a file in C:\Windows\Tempor~1\. I got into explorer to view the file and it contained what appeared to be tempory internet files so I deleted them. This confused me because I clear out our temporary Internet files regularly. It took an extremly long time to delete these files, but when I was finised and ran the process all over again........it worked!

My knowledge of PC's is very limited (obviously), but with a website like this I'm learning more and more.

Thanks for your help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.