Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
4  
I might sound like and old granny, but if you have bad sectors and it is not an ancient drive then you need to check if your backups are up to date. Modern drives remap (and hide) bad sectors. The user should only notice bad sectors when the drive runs out of spares, and often it is close to dying at that point. –  Hennes Jul 21 '12 at 14:11
    
I 100% agree with Hennes: just throw the drive because this is a dangerous situation. –  Bertrand SCHITS Jul 21 '12 at 14:13
    
My backups are up to date. It's not a very old drive and I'm now using it as my 'clock is ticking' machine. I never noticed bad sectors up to now though to be honest. –  Haedrian Jul 21 '12 at 14:39
3  
“Clock is ticking machine”? - I think this means, "I'm waiting for it to completely and irrevocably die before I buy the next one." –  Everett Jul 24 '12 at 16:32
1  
Ah, I thought you were using it to just display a clock. –  Synetech Jul 24 '12 at 16:34

2 Answers 2

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).

share|improve this answer
1  
I don't want to change the size, I want to shift it. The problem is I'm wary of the risk of messing up my computer even more (and lets face it, resizing partitions is risky enough) –  Haedrian Jul 24 '12 at 16:30

When you said you ran chkdsk did you run it with /F or /B switches?

/F   Fixes errors on the disk.
/R   Locates bad sectors and recovers readable information (implies /F).
/B   NTFS only: Re-evaluates bad clusters on the volume (implies /R)

I agree and +1 with harrymc in that you can try SpinRite to fix the badsectors. I have used it and it works great.

Good that your backups are up to date. Ultimately though, drives are cheap, and yours is dying. It will inevitably fail. Clone the drive on to a new one like Hennes, Bertrand SCHITS, jmreicha and others are advising.

I once read a paper released by some Google engineers titled Failure Trends in a Large Disk Drive Population on research they did on hard drives in their clusters/server farms and I think the take away from that report is basically that hard drives can and will fail at any point no matter the quality or cost of the drive or the conditions it is under. Scans are not definitive to predicting drive failure and HD SMART system is less than useful despite what marketing hype says. https://www.google.com/?q=google%20paper%20on%20hard%20drives

share|improve this answer
    
I ran it with f and b switches. Didn't solve my problem. The drive is in a laptop so I'm not really planning on removing it anytime soon - since the power connector is also damaged and something will die eventually. –  Haedrian Jul 30 '12 at 15:49
    
Use spinrite, to mark the sectors as bad, and that should do it. –  Anthony Hatzopoulos Jul 30 '12 at 17:58

protected by Community Nov 29 '12 at 12:36

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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