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.

Possible Duplicate:
External Hard Drive bad sectors recover/mark utility in linux

I suspect my laptop's harddisk has a bad sector. Could anyone tell me what is the most reliable way to fix the harddisk?

I am using badblocks but as I understood from the man page, it only points the bad sectors, after that how do I suppose to fix the bad sector?

share|improve this question

migrated from stackoverflow.com Oct 20 '12 at 9:10

This question came from our site for professional and enthusiast programmers.

marked as duplicate by slhck Oct 20 '12 at 9:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Defective hard drives aren't fixable. If your drive's developing bad blocks, try to back it up and replace it. –  Mat Oct 20 '12 at 9:06
add comment

1 Answer

up vote 0 down vote accepted

If you only have one bad sector, you can force the drive's controller to remap it to a spare sector. Do so by manually trying to read it and write it back again.

Useful tools are badblocks or smartctl for identifying and dd or hdparm --write-sector.

share|improve this answer
    
I am using "badblocks -nvm /dev/sda" which has been performing 17 hours already and completed only 15%. Would you recommend me to do low level formatting as it is explained here dedoimedo.com/computers/low-level-formatting.html? –  user166571 Oct 20 '12 at 9:21
    
@johan If you have a safe backup (better: more), you can try to "reformat" your disk (I put it in quotes because it is not a formatting in the original sense of the word). Here every bad block should be replaced with a spare one. Are you getting any output from y our currently running badblocks process? –  glglgl Oct 20 '12 at 9:28
    
I get the following output: Checking for bad blocks in non-destructive read-write mode From block 0 to 312571223 Checking for bad blocks (non-destructive read-write test) Testing with random pattern: 11.50% done, 16:30:38 elapsed. (0/0/0 errors). I have not got any error yet. I format my laptop by a recover disk but I did not solve the problem. I guess it just loaded windows 7 image. Do you think it would help to follow the instruction above to perform low level formatting? –  user166571 Oct 20 '12 at 9:48
    
Nowadays, low level formatting doesn't do anything beyond writing to disk and, if needed, remapping. So I don't think it gets you any more benefit. –  glglgl Oct 24 '12 at 11:35
add comment