Topic: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

Hello,

I have this crazy idea that needs some peer reviewing.

First some background:
My parents, aged ca. 80, have an XP-machine. This machine is mainly mum's territory despite the fact that it is my father who is the engineer and she has actually written a book on it using OpenOffice (my call). The HD of this machine has two partitions: C for system and programs and D for user data. Before I intervened, however, all user data was actually on C which became full and very, very fragmented. I have moved all data and instructed all applications to use D but C is still very fragmented and the machine is slow as h*ll. I spent many hours last weekend trying to resolve this problem. I cleaned up temporary files and un-installed applications I knew I could easily re-install (Firefox, OpenOffice...) to create as much free space for the de-fragmentation tool to work with as possible (roughly 28% if memory serves). Still, when I finally gave up there were some 3000 heavily fragmented files left and the machine is still very slow. I did look up a how-to-speed-up-XP instruction on Microsoft's web but found I had already done all I possibly could do apart from a fresh install of XP so I re-installed Firefox etc and called it a day.

Now to my crazy idea:
Back home (I live some 500 km away so there is no risk of me rushing over to that computer trying it out) it struck me I had de-fragmented the FAT-formatted memory of my media player without using Windows by making a tar-archive of its contents, clearing said memory and using tar to write the content back. Could I bring a Linux-CD and a USB-HD to my parent's computer and do the same to its C-drive and expect XP to work afterwards?

Installing Linux is tempting but not really realistic I think so any thoughts on my idea are appreciated.

/Martin

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

Don't know, if just compressing and rewriting the contents of the C-drive would work - because the mbr would probably not be copied. What might work, is to make an image of C: via partimage (included i.e. in the faboulous PartedMagic Live-Cd/USB), than format the c-drive and playback the image.

If the computer has a Seagate or Maxtor harddisk, you may download "Seagate Disc Wizard" for free from the Seagate site. On install DiscWizard asks you to make a recovery-media, which can be either a CD or an Usb-Stick. DiscWizard lets you write an image of the system right out of the running windows. That may be restored to disk again out of the running windows-system  (with an automatic reboot in between) or from recovery-disk/Usb.

Worth a try. In fact, i myself thought about this unconventional defreg-method, but haven't tried yet. I only remember that once when my Win2000 was broken, i restored to an older DiscWizard-image and afterwards found boot and shutdown times improved.

On restore DiscWizard also gives the options to resize the partition you want to restore. Thats something partimage can't do, but comes in handy, if you want clone a system to another disk. BTW, DiscWizard also reads and writes ext2 and ext3 - partitions...

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

I think the tar method should work, it's how I converted from ext4 to brtfs with compression. I don't think a disc image would work though, because it is a low level copy it would copy the fragmentation as well. Just wondering why fragmenting from within windows isn't an option? there are some good utilities to do it with.

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

^ Defraggler (Vista, 7) has some issues apparently, but if I recall correctly the defrag utility that came with XP worked swimmingly.  It had a way of putting system files at the front and other data towards the middle, leaving a big gap in between, but this supposedly improves performance.

There are several defrag utilities available in the downloads section of cnet.com.  I think at least one or two have an option to burn a bootable CD so you can defragment the *entire* drive.

while ( ! ( succeed = try() ) );

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

I have pestered some Windows-savvy colleagues today and they tell me there are some systems files on a Windows machine that for whatever reason must be located at specific locations on the disk and that will not be preserved with the method I came up with. Bad idea, in short.

BTW, the compressing ability of tar had nothing to do with the functionality of my scheme. I guess I could have used cp or mv as well.

So why does XP's defragger fail me? I can only guess: Since I run it under Windows there will be some system files locked up as being used by the system. If some of those files are big and badly fragmented they will be pretty good at blocking the process.

Other defrag utilities? I was told there are those that run at boot, before Windows fires up, which enables them to work on all system files. Sounds like deal to me. At least for now. I will check out what CNET has on offer.

/Martin

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

Try the free edition of Puran Defrag:

http://www.puransoftware.com/Puran-Defrag-Download.html

It does have boot time defrag.

Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

you could make a livecd use bartpe and do it that way, or I think you can defrag in safe mode and it is supposed to work better. The compression stuff was for btrfs, not tar. I had to copy the files back onto the partition after it was converted or they wouldn't have had the btrfs compression applied to them.

I say never be complete, I say stop being perfect, I say lets evolve, let the chips fall where they may.

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

I use Defraggler on my windows boxes from the same company who develop CCleaner.

Works well and has a few options like, Quick Defrag, individual file defrag and options to move large files around the disk. Also has a schedule option for regular maintenance.

Quite good.

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

Thanks guys,

now I have a host of new things to try next time I visit my parents. I will keep you posted but don't hold your breaths. I don't expect to go there very soon.

/Martin

Re: Crazy idea: can one de-fragment a Windows partition using Linux+tar?

MartinRF wrote:

Thanks guys,

now I have a host of new things to try next time I visit my parents. I will keep you posted but don't hold your breaths. I don't expect to go there very soon.

/Martin

Hi! You may sort out the "DiscWizard"-thingy. It's perfect for making backup-images, but as iggy said, it won't defrag. Made an image of my Win2K-Partition (which was fragmented by some 20+ %), afterwards restored and still had that 20+ % fragmentation...

Defraggler sounds good...  Otherwise: if all important stuff is on backed up on D: , a complete XP-reinstall would perhaps be faster than a defrag. Or give 'em Linux. For me - using Windows exclusively till 2 years ago - the easiest distros to convert a.t.m.  would be Mandriva KDE and ZorinOS 2.0 (Customized Ubuntu).