How can I resize an NTFS partition when there are bad sectors?

I want to extend a partition, but in between the partition and the un-allocated space, there is a large NTFS partition in which Windows is installed.

When I use GParted to try and move the NTFS partition to the end, it gives me an error saying that I have bad sectors and encourages me to run chkdsk. I did this, but the bad sectors remain.

It tells me to retry the resize with some sort of --badsectors flag, but I have no idea how to do it exactly.

What/where do I use that flag and how can I move re-size the partition if there are bad sectors?


Solution 1:

The ntfsresize man page has the answer :

-b, --bad-sectors
    Support disks having hardware errors, bad sectors with those ntfsresize would refuse to work by default. 

The command you should use is :

ntfsresize -b --size <new-size> <hard-disk>

See this article for an example : Howto: Use ntfsresize+fdisk to resize a partition with bad sectors.

Another approach is to repair the bad sectors before moving. I have first-hand experience with SpinRite doing wonders (ailing laptop repaired and worked as new for 3 more years). Similar and newer is HDD Regenerator, but I have no personal experience with it. Both give a money-back guarantee (for what it's worth).