Removing a bad sector from an NTFS partition. Badblocks gave me an output. now what?
Solution 1:
...well now gparted says it's clean!! AT LAST!! ...anyways I'm not sure what exactly solved the problem but I'll list what I've done backwards:
sudo ntfsfix -b /dev/sda6
which gave out:
Mounting volume... OK
Processing of $MFT and $MFTMirr completed successfully.
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
Going to un-mark the bad clusters ($BadClus)... OK
NTFS partition /dev/sda6 was processed successfully.
but before that I did:
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975848
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975849
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975850
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975851
and before that I did
sudo badblocks -nvs /dev/sda6
... which took 2 whole days to finish!
anyways, lastly, before the last command, I opened windows 7 and used the chkdsk
utility (right click the partition, properties, "tools"(or something like that), check for errors)
I hope this helps anyone.
Solution 2:
Try writing to those blocks:
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975848
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975849
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975850
sudo dd if=/dev/zero of=/dev/sda6 bs=1024 count=1 seek=303975851
(or in your case, you could collapse that to a single dd
call with count=4
)
Then run badblocks
again.
On a modern hard drive, the controller already knows the blocks are bad, and will remap them, but still cannot provide the data from the previous location (since it's bad). Writing to the blocks will cause everything to look good again, and then you don't have any need for the filesystem to take care of it.
If this does work, then the second run of badblocks
should find no bad blocks.