Hopefully someone might find this useful. I searched many forums and could never find a solution to this problem, apart from “run chkdsk /r”. Hopefully this might help you, but be warned its very dangerous, make sure you have a backup of everything on your disk!
While trying to shrink an NTFS partition on my laptop, to make room for Ubuntu, I discovered that GParted (running from Ubuntu cd) will not let you shrink the partition if it has a bad sector. It has a exclamation mark in a triangle next to the disk, and you can’t get proper information about the usage in the partition. Because of this, you can only move it, or increase its size (operations that don’t require knowledge of whats already in there).
I tried fixing any errors on the disk using CHKDSK from Windows, but it never seemed to actually solve the problem. I believe the reason was that the problem was something that CHKDSK refuses to touch, or there was never really a problem.
The interesting thing is that the ntfsresize program (part of ntfsprogs package) will let you re-size the partition if you use the –bad-sectors option. However when I did this manually, it doesn’t seem to do everything correctly and the partition is not actually reduced in size.
Turns out that gparted actually calls ntfsresize to get information about the drive, and then do the resizing. The problem is ntfsresize keeps reporting there are errors on the disk, so gparted gives up. Gparted itself does not provide an equivalent to the –bad-sectors option.
[WARNING: Only try this if you have backed up all your data. Since its essentially bypassing a fail-safe feature of gparted, its inherently dangerous
[EDIT: See Miguel's comment below about moving the partition aswell]]
Trick Gparted :)
I just moved /usr/bin/ntfsresize to /usr/bin/ntfsresize.orig
I then created (and chmod’d to be executable) /usr/bin/ntfsresize and put the following in it:
#!/bin/bash exec ntfsresize.orig --bad-sectors "$@"
I was then able to run gparted without any problems.