How to repair / isolate bad hard drive blocks

Over the past month, Ubuntu has begun to experience some problems: it shuts down unexpectedly for no apparent reason. I realized that there was a problem on the hard drive if I ran this command:

$ sudo badblocks -sv -b 512 /dev/sda 

I get 24 bad blocks all in the Linux partition (I have Windows in a different one and it doesn't have the same problem). The question is whether there is a way (other than changing the disk) to avoid this closure. Maybe isolate bad blocks?

+7
disk
source share
3 answers

Labeling bad blocks of software / file system is largely a thing of the past; recent disks automatically transfer bad blocks in a transparent way.

If you start to get bad blocks β€œvisible” to the software, this probably means that the hard drive is running out of spare spare blocks, so it probably doesn't work. You must check the status of SMART on the drive to make sure that it is validated by other SMART attributes, back up and get ready to replace your drive.

+2
source share

I found a good tutorial that can help you: http://www.ehow.com/how_6864409_fix-bad-sectors-ubuntu.html

Open a terminal> enter mount command and do the following:

Select the file system to restore. For example, you can select a file system named "/ home" if the output of the "mount" command includes this line: / dev / mapper / vg 0-home on / home type ext3 (rw)

Enter the umount command to unmount the file system. To unmount the file system "/ home", for example, run the command " sudo umount /home ".

Enter the fsck command to restore the file system. The fsck command means file system check; it scans the disk for bad sectors and names those that do not work. To run fsck on the / home file system, run the command "sudo fsck / dev / mapper / vg0-home". Replace "/ dev / mapper / vg0-home" with the output from your "mount" command, if necessary.

Enter the mount command to remount the restored file system. If you have restored the "/ home" file system, use the " sudo mount /home " command.

+1
source share

Spinrite (grc.com) is the best tool I know for repairing bad sectors and getting a disk for using backup sectors instead. It is not cheap, but it works. If any of your friends have a copy, you are allowed to borrow it. I have been using it for 7 years. It is also useful for periodic maintenance.

0
source share

All Articles