Problem with partitioning Bootcamp

I was trying to use a program on Windows for my GIS project but it seems to me that the memory wouldn’t  allocate well enough on virtual machine. So I have to try on the bootcamp instead. This was when I faced another problem!!! Bootcamp assistant couldn’t partition my harddrive. Here was the error that I’ve got.

The disk cannot be partitioned because some files cannot be moved. Back up the disk and use Disk Utility to format it as a single Mac OS Extended (Journaled) volume. Restore your information to the disk and try using Boot Camp Assistant again.

This is very annoying since I don’t want to spend a whole day installing everything all over again. Here are some possible fixes:

  • Use iDefrag to defrag your harddrive (this works for many people)
  • Delete big file on your system (Bigger than 1 GB)

However, none of those work for me (Don’t know why it works for some people). Here is what I did

  1. Backup everything with Time Machine to external HD
  2. Boot with OSX DVD (press C while rebooting)
  3. Go into Disk Utilities and then format a whole disk
  4. Go into Timemacine and restore to previous Timemachine backup
  5. After restoring, now I can be able to partition using Bootcamp assistant again