PDA

View Full Version : Defrag in XP


FrankSG
04-30-2009, 11:42 AM
My son has a computer with XP Home as the OS. He bought a new computer since the one with XP was so slow. He gave me his old one to see if I could clean it up which I did. I than did a disk scan. The scan deleted a lot of files--I mean a lot of them--it was into the 1000s. It then replaced a lot of files. It took about 45 minutes to an hour and then it rebooted itself. I then tried to run defrag but it won't work. Do you think it's possible that the disk is so badly fragmented and that's the reason defrag won't work?

Sylvander
04-30-2009, 12:03 PM
1. Which defrag program and method are you using [or rather attempting to use]?

2. The method I MUCH prefer to use:
(a) Work within any puplet of Puppy Linux [really easy to get up and running].

(b) Make sure it has "X File Explorer" [Xfe] and/or the FREE version of SyncBack set up to work under WINE.
The dual panes in Xfe make it REALLY EASY to copy from one location [a partition] to another [a folder].

(c) You make a backup of the contents of the partition you wish to defragment, to any handy storage location. [External USB HDD?]
I do this as a matter of routine, so it's done anyway.
The Windows on its partition is of course dormant during all of this.
You do this for each partition you wish to defrag...
Except SyncBack under Wine cannot work on Linux partitions [only Windows partitions], whereas Xfe can work on Linux and Windows partitions.

(d) Use Xfe to delete the original contents of the partition.

(e) Copy back the backup from the "destination" to the "source".
i.e. From the backup folder to the original partition.
I like to make a backup image [using the Pudd included in all puplets], just for insurance, but it has never been needed.

(f) When you check the contents of the source partition, you will see that [with the small exception of some empty sectors at the beginning of the partition] all is totally orderly, and grouped toward the start of the partition, with all the empty space in one contiguous block at the end.

3. Here's the detailed thread I made when I first did this (http://www.pcguide.com/vb/showthread.php?t=67809).

PrntRhd
04-30-2009, 12:12 PM
Sylvander,
I think Frank is wondering if some needed files are now missing causing the defrag issue?
Puppy Linux won't help that.

FrankSG
04-30-2009, 01:42 PM
I'm using the regular defrag program in Windows. And, yes I am wondering if there are any files that got tossed out when I did the scan and the cleanup. By the way, it is running much faster now since I cleaned it. I'm going to give you some of the notes of what messages were being displayed as it was doing the scan. I wrote them down when it was doing the scan:
Deleted corrupt attribute records (there were many of those)
Delete an index entry (I think there were about 70,000 of those.)
Replacing invalid security ID with default security. (There were about 70,000 of those, too.) Maybe this will give you some idea of what happened.

Sylvander
04-30-2009, 02:42 PM
1. "Do you think it's possible that the disk is so badly fragmented and that's the reason defrag won't work?"
No.

2. "I'm using the regular defrag program in Windows"
That's no great loss methinks; I never liked using that, almost any defrag program seemed better to me.
Did you notice that it left LOTS of items scattered all over the end of the partition.
Other 3rd party programs tend to do that too.
Paragon Hard Disk Manager [I think] was the only program I found prior to my latest methods that would TOTALLY defrag the contents of a partition so that the free space ended up as one contiguous block.
But that began reporting that it couldn't begin defrag because of a "faulty block".
I don't believe there was or is a faulty block; other programs have no difficulty and report no faulty block[s].
I think the FREE version of the program disables full functionality after a time in use.

3. If you use the methods I suggest, you will pretty certainly be able to defrag the contents of your partition[s].

4. On the topic of having deleted vital files:
(a) You may need to repair Windows to replace those.

(b) In future it would be much preferred to have used such as the methods I described [especially SyncBack] to backup the contents of your [sons'] partitions.
Then you would have 2nd copies of ALL of the contents of your partitions.
You could either replace any files you identified as missing and necessary.
[SyncBack would (after a scan) list the ("source" & "destination" = after & before) "differences" (e.g. missing files) and thus help you identify the vital missing files]
Or else you could restore ALL of the partition contents, and begin again to eliminate only SOME files and watch for nasty consequences.
Then restore again when/if any nasties result.

Paul Komski
04-30-2009, 09:50 PM
The intrinsic problem is that there was corruption on the disk at the very start. "Fixing" such corruption can leave holes all over the place with orphaned files and so forth. Had defragging been done prior to such checking then the situation would have been even worse.

The real question that needs answering before doing anything else is whether any file-system or surface defects persist. Assuming C: is the drive in question, I would run chkdsk C: /R and allow a reboot. Then read the results of the latest winlogon value in the event viewer when windows reboots.

If the OS remains dysfunctional then have an installation CD at the ready and run sfc scannow (http://forums.majorgeeks.com/showthread.php?t=147786). A full repair installation (http://www.michaelstevenstech.com/XPrepairinstall.htm) would be my next step.

There is nothing wrong with the Windows defragmenter and I think those that want a pristine-like totally defragged and compacted partition are verging on OCD. An NTFS partition, in particular, can be significantly defragmented to the human eye without it having the least impact on normal use.

If a system is slow after defragging then the cause of the slowness is obviously something else and at the late stages of an OS that has been in use for some time a clean installation is usually the best way to get things really fresh (even if fragmented) all over again.

If chkdsk keeps finding and fixing errors then the HDD is probably in end stage failure. A HDD on the last lap typically becomes slower and slower.

FrankSG
04-30-2009, 11:10 PM
Paul--running the chkdsk as you suggested, I assume that is from a command prompt, isn't it? I'll give it a try. I thought I had already responded to Sylvander's response, but I don't see it here so I must have forgotten. But I did download a defrag utility which worked. I will do the chkdsk tomorrow as you suggested.

Paul Komski
05-01-2009, 03:11 AM
Yes - from a command prompt. The /R switch means that the file system is checked, repaired if possible and the remaining disk surface scanned for errors.

You might also consider formally testing the drive for bad sectors with the maker's utility or with HDTune (http://www.hdtune.com/).