Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

To install Ubuntu alongside Windows 7, I have to shrink Windows 7 partition C:. But due to some unmovable files, I cannot shrink as much as I plan by using Windows own shrinking tool. I guess many of you who have both OSes on the same hard drive must have similar experience. How to solve this problem?

Any reference that can help is also appreciated!

Thanks and regards!


UPDATE:

I have identified what unmovable file currently stop further shrinking:

\ProgramData\Microsoft\Search\Data\Applications\Windows\Projects\SystemIndex\Indexer\CiFiles\00010015.wid::$DATA

If I understand correctly, the file belongs to Windows Search. Can I set up somewhere in Windows system settings to temperately eliminate the file and similar ones (because there are many similar files under the same directory which I guess will also stand in the way of shrinking and unmovable by defrag)?

share|improve this question
    
Turn off Windows Search and delete the file (and the ADS attached to it). Or use Safe Mode. The file will be created again. –  user8290 Feb 19 '11 at 16:10
add comment

5 Answers

There's a great defrag utility for Windows that can move all the files to the front of the disk, as well the little bit of space used between files (interstice problem): dirms (dirms-cl).

Running the defrag in safe mode may help with the unmovable file. Of course, what will certainly help is to make sure the filesystem is not in use before defragmenting (by booting Windows from CD/DVD or by using another computer for the defrag operation).

Does not work with Windows 7.

share|improve this answer
add comment

Just had the same problem, but the instructions in Working around Windows' "Shrink Volume" inadequacies worked well for me. (The title mentions Vista, but it worked well for Windows 7 too.)

It's a bit long to repeat here, but the main points are

  • Close every program you can (any file currently in use is treated as unmovable, including browser cache files)
  • Run the Windows Disk Cleanup Wizard
  • Disable pagefile, kernel memory dump, system restore and hibernation (the primary system level unmovable files)
  • Run a defragmenter that can move files to the start of the disk

On a 60 GB SSD with about 35 GB free space, "Shrink Volume" in Windows 7 initially freed a paltry 100 MB, but following the steps in the article it was able to free the whole 35 GB.

See also the ubuntuguide.org documentation on multiple OS installation.

share|improve this answer
add comment

Well, I've just spent a day trying to get various defraggers to move the (extremely stubborn) unmovable metadata which Win7 puts in the middle of the drive for safety. None worked (Raxco, Ultradefrag, Win7 defragger). Finally I used MiniTools Partition Wizard (free for home use) which 'knows' about Win7 and does not mess up the Win installation. From what I have read, GParted (which I know and love) seriously risks screwing things royally, and I could not take the risk. Partition Wizard seems a very slick program, BTW. I used the CD version - much safer.

share|improve this answer
add comment

if you plan to dual boot with partitions on the same physical drive I recommend you use the Windows partition method as detailed here but you should always defrag the hard drive first.

While gparted is an excellent partition tool it does not take into consideration the fragmented data on the drive.

Trust me - from past experience once you make the mistake of not defragging the Windows partition using Windows tools you will screw up the windows install and will end up having to re-install it as well.

share|improve this answer
    
THanks! But I do know defrag and I defrag everytime before attempt to shrink. I was asking about unmovable Windows system files that now stop me from further shrinking. Any idea? –  Tim Feb 8 '11 at 12:10
    
You don't say what the immovable files are and probably the question to ask how to move them should not be asked here. Try "pagedefrag" can do lots, also delete the page file and then recreate it this is one way to move it. –  robin0800 Feb 8 '11 at 12:52
    
@robin0800: I have updated my post with the file that stands in the way. Thanks! –  Tim Feb 8 '11 at 13:06
1  
The files are probably in use, so you can't move them. I think you may need to do a defrag before windows is up and running. I don't think the bundled version that comes with windows probably does not support that (in XP and older it was a defeatured commercial product), but there are some commercial ones that do. Diskkeeper and PerfectDisk come to mind, but there are others. –  jwernerny Feb 8 '11 at 15:37
1  
This is FUD. Fragmentation does not matter at all to gparted. It simply adjusts the length of the filesystem after relocating any files that are beyond the new end point ( if you are shrinking it ). –  psusi Feb 8 '11 at 19:01
show 1 more comment

The old fashioned way before Windows finally came up with their own resize tool: gparted. Best done from the live cd.

share|improve this answer
    
Defrag before shrinking –  Takkat Feb 8 '11 at 7:08
    
gparted do not move files when shrinking. @Takkat: windows defrag tools respect unmovable files, so the OP problem remains. –  enzotib Feb 8 '11 at 8:00
    
@enzotib: Thanks for telling others! You know what I was asking about! –  Tim Feb 8 '11 at 12:11
2  
@enzotib: not true. From the ntfsresize man page ( which gparted uses ): Defragmentation is NOT required prior to resizing because the program can relocate any data if needed, without risking data integrity. –  psusi Feb 8 '11 at 18:56
1  
you are right, according to man page, but this differ from my experience. –  enzotib Feb 9 '11 at 12:00
add comment

Your Answer

 
discard

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.