Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I install Linux on a box that has Windows, and I want to dual boot, I always defragment the hard drive as much as possible before resizing the partition. Is this just superstition, or is it actually a good idea?

share|improve this question

If your hard drive is already defragmented with all the data at the start of the disk, then it makes resizing the partition easier. Long ago the partition resizing tools were not able to move the data, so it was a requirement.

Today if you hard drive is not already defragmented then there is no reason to defragment it first in an attempt to move the data to the front of the drive since the resize utility will do that automatically. All you are doing is shifting the effort from the resize utility to the defrag utility. The only reason that is advantageous is if your defrag utility has a better progress indicator and gives you the ability to restart when your resize utility does not.

share|improve this answer
Windows 8's Disk Management tool doesn't seem able to move data when you try to shrink a volume. A message pops up that mentions defrag. – Drew Noakes Mar 12 '13 at 14:07

I believe it depends on disk partition software that you use as some do a better job of it than others. The vendors themselves will be able to tell you if it is necessary for their particular software and also advise on any best practises.

Ideally you would want a hard disk per operating system. That way the core OS is installed at the start of each drive which will have the quickest access time. If you have a 1.5TB drive that's got 1TB of Windows and Music on it and you for example stick Linux on the spare 0.5TB then its bound to run slower given the nature of how hard disks work. They are after all still using moving parts to read the various platters of the hard disk.

I suppose the ideal solution if money was no object would be to use solid state disks, they shouldn't in theory need de-fragging much as the seek times of some of the quicker SSD drives is about the same when full or empty.

share|improve this answer
From what I`ve heard, defragging an SSD is always BAD because it wears out the electronics inside. – NoviceUbuntuGeek Sep 13 '15 at 23:09

It depends. Some defraggers might scrunch everything at the start of the partition, but most like to spread data across the whole disk. That way, there tend to be free fields in between blocks, so extending a file to a new block will not fragment the filesystem as quickly.

share|improve this answer
Sub question. which one does windows vista disk defragmenter do? – andrewrk Jul 30 '09 at 20:37
I'm not sure about the details beyond this point. Either way, take a full backup beforehand, and you should be good--resizing doesn't take that long either way, in my experience. – koenigdmj Jul 30 '09 at 20:56

I think it depends on how the defragmenter works. There's a freeware defragger called jkdefrag that purports to optimize the drive for better access time first, but I don't know how that might interfere with a particular partitioning scheme (i.e., optimizing the position of files in a partition of size A would probably not be optimal as you're resizing it for partition size B) so you may not see much improvement.

share|improve this answer
jkdefrag is now called mydefrag. – 3dinfluence Jul 31 '09 at 0:12
You're absolutely right...I noticed it while (quickly) grabbing links to post here. Thanks for the update. – Bart Silverstrim Jul 31 '09 at 12:16

If you intend to put Linux on a new partition then like others have said you will need to get all the data as far forward as possible. GParted will only let you shrink the existing NTFS volume/partition to the last block that holds data. Perfect Disk has a 30 day demo and has the ability to compact the data to the front of the drive. I also believe that the free opensource defragger may have a script to do the same.

You'll want to use one of these as a first step.

share|improve this answer
this conflicts with what Jim McKeeth says. Who is correct? – andrewrk Jul 31 '09 at 11:42
It depends on what partition resizing tools. The most common one used for installing Linux is QParted. It will only let you resize the partition to the last used block of the drive. This may not be true if you're using a tool like Partition Magic as it may be able to move the used data blocks around on the disk though. If you want to test this yourself boot up on a LiveCD fire up QParted and have a look for yourself. It will only let you shrink the partition to the last used block. – 3dinfluence Jul 31 '09 at 13:57
I meant GParted rather than QParted...but either will work...both are just front ends for parted. – 3dinfluence Jul 31 '09 at 14:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.