Are there any tools that I can use to defrag my Windows partition from Linux?
Yes, you can use shake. You'll first need to add a custom repository to your system:
Then you can do
There is no such a tool around, for what I know.
Some site reports the following command
but this does not work, and it is not clear where do they get it.
Update: UltraDefrag for Linux:
[I've not yet used this myself. Found it via a thread on an Arch forum. Further following the thread through to the next page leads to more on the topic. Try at your own risk.—kevjonesin—]
There is a very well know tricky cheat to archive a NTFS defragmentation (including free space)... it can be done with a Live Linux like SystemRescueCD...
But, you must have a second HDD or at least a 51% free space (that if not using compression).
The trick (very tricky) is to use tools to "clone" the partition, but not typical ones... there is a tool that can "clone" a NTFS parttion but not doing an exact "clone"... let me explain...
The tool is fsarchive (if i do not remember bad).
It makes a very big file (as clone tools does), with all files (beware of NTFS special metadata of files, streams i think they are callled), just as a "clone" tool does...
But the tricky part comes when restoring... it does not put files where they where, it puts files without any fragmentation at all.
I had used it for Windows System partition as well as for NTFS data partitions... with succed... not very easy to use / understand (read carfully the docs)... but can do the trick.
Remember... such big file it create can be compressed, so not really need to have a 51% free.
But any way, first you must Shrink NTFS partition... use GParted (if i dont remember bad).
That's it, folks... as i said very tricky and risky, of course.
Beware Key Points:
The steps are for: Use a LiveCD / LiveUSB linux to defrag a NTFS partition that uses 100% of the disk, with no other HDD connect to such PC [must have enough free space].
As long as i know GParted/fsarchiver is the most near solution (for using only a LiveCD/LiveUSB with Linux), not fast, somehow risky, but satisfing terms imposed by the person who post the question.
BE AWARE: It is very, very risky... as with any "clone" tool... and for now i do not know any other best way... and it will loose NTFS streams (if i do not remember bad)
PLEASE: Read carfully fsarchiver docs, before using it.
I have any responsability (i had used it on my own data, but allways i have a external BackUP - good partices).
In practice... all info i have, i put them on at least three different mediums (HDD, DVD, Flash Memories), with at least three copies on each medium, so i have 9 copies... if i loose 8 of them it rest one more to recover data... i am a little paranoid, i kown.
No. These are Windows filesystems so you will need to use Windows to defrag them.