A bad sector on a drive is a sign of permanent damage to the drive. Unless you have reason to believe that your drive marked these sectors as bad incorrectly, you cannot "fix" them.
It means that a part of your drive is damaged to the extent that it can no longer reliably be read from and/or written to.
Your system can continue to use the drive by marking that sector as unusable, but you might consider a drive replacement anyway, as a bad sector can be a sign that more sectors, or the whole drive, might fail soon.
While there may be ways to force the drive to un-mark a sector as bad, allowing you to use it again, this is likely not a good idea. The sector may stay good, but it will just as likely become bad again. Some data may be lost or corrupted depending on how it fails.
Now, as for the error message you've pasted in your question (as of my writing this), that error has nothing to do with bad sectors. It means that you don't have access to the drive. Being sudo
can give you access, so:
sudo fsck /dev/sdb
However, this is still probably not what you want, because /dev/sdb refers to the entire drive, whereas fsck
is designed to work on filesystems, which are usually (but not always, and you may have an exception here) placed in partitions. If the above didn't work, you may instead have wanted to do this to the 1st partition on that drive:
sudo fsck /dev/sdb1
You can get a list of partitions per drive with:
sudo fdisk -l
It reports 512 bytes because that is the logical sector size for backward compatibility with older OSes ( Windows ). (g)parted aligns partitions to 1 MiB, which is more than enough to work properly with drives using 4k physical sectors, so it is fine the way it is.
Best Answer
Bad Sectors on hard drive can not be recovered or ignored. i have seen such questions So please have a look at these -
Question 1
Question 2
Question 3
The Only thing you can do is Get a new Hard Drive as in future fortunately you may loose your important data saved in that.
Precautions are better than Cure.