Which is the command to unmap a list of sectors which have previously been identified as bad?. That will allow me to do some tests on the entire (native) user area of the disk surface. Is there a command to list the sectors which have been reallocated?

PLEASE NOTE: I am not asking for some sort of divine incantation to repair or fix damaged disks or their controller internals. I fully understand that my HDD is imperfect nad will eventually die.

closed as off-topic by Rui F Ribeiro, Isaac, Kusalananda, steve, Jeff Schaller Jun 2 '18 at 16:44

  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I really cannot understand the multiple posts of people that know their disks are beyond any hope think the Unix group with be able to do some sort of divine incantation to damaged disks and their controller internals. Data is far more valuable than any disk, buy a new one instead of gambling with a disk about to die. – Rui F Ribeiro Jun 2 '18 at 12:32
  • 4
    I'm voting to close this question as off-topic because this is a Unix group, not an hardware forum/help desk site. – Rui F Ribeiro Jun 2 '18 at 12:33
  • 1
    No, you can't disable the mapping of LBAs (logical block addresses) to good sectors - once an LBA gets reallocated, only the new physical sector is accessible, unless you either hack the firmware, or the firmware provides (undocumented) commands to access them directly. What "tests" to the "whole disk surface" did you have in mind, and how did you plan to implement them? Because you can't run "tests" either, besides reading a block via the LBA, and you already know the block is bad when it gets reallocated. – dirkt Jun 3 '18 at 3:59
  • Please search in the e2fsck manual (man e2fsck) for the -l option (add a list of badblocks to the filesystem). – Isaac Jun 3 '18 at 21:34
  • There is no way in which external tools could list or find which sectors have been re-allocated by the internal HDD driver. Once a sector has been reallocated, it is kept hidden by the internal controller. – Isaac Jun 3 '18 at 21:42

Browse other questions tagged or ask your own question.