I have a newer Toshiba hard drive with bad sectors... I don't hear anything loose, so I think maybe there is just a scratch in the disk somewhere... I heard of products that can "buff" out those scratches and restore the hard drive into good condition, but I have yet to find one. Is this even possible?
closed as off topic by Eliah Kagan, Seth♦, Basharat Sialvi, Eric Carvalho, Nathan Osman Apr 10 '13 at 0:31
Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.
I don't see how software can do anything about physical damage, and have never heard of anything that claims to. I have seen programs that test a disk and block bad sectors for use, but the ones I am familiar with are all Windows things that would surely barf on an EXT3 partition if you could get them to run at all. I suspect there is something already in Ubuntu or available that can do this, but I don't know what it would be.
As @user148064 wrote, software can not repair a hardware problem.
However, any SCSI hard drives and modern SATA drives have spare sectors. (You do not ask them for a specific track, sector and cylinder. You asked them for a sector number. The drive will report itself as "I have X sectors of size Y". Usually the drive actually has a few more.)
When a sector fails to get read or written successfully it will copy that sector to a spare sector and substitute that on all subsequent accesses.
Think of it as a book stating I have X pages with Y chars per page.
Now you spill coffee on page 3. It replaces the index for page 3 with spare page 1.
You can trigger this rereading and remapping process on a drive. That will help if you have any previously undetected corrupted pages (sectors).
However the number of spare pages (sectors) is limited. If you have a groove over the platter then this will not suffice (and that is assuming the head are undamaged, and those are the only likely candidates to make such a groove).
If the source of the failed sectors is something else, then please consider this as a sign of imminent disc failure.
tl;dr: No software will not repair hardware, though in some cases it can work around the defect.