Mark bad blocks as unusable on NTFS using linux

10,558

Solution 1

I'm afraid that won't help you get it to boot anyway. Most likely there are critical system files in those damaged blocks, and you cannot access those.

Your HD cannot be used anymore. The best you can do is to use ddrescue or similar tool to make a complete copy of the hard disk or what can be accessed from it to a file on another hard disk, and then use data recovery software on that hard disk image file.

Solution 2

I'm not aware of any publicly available Linux tool that supports this. It's in the plans for ntfsck from ntfsprogs, the most advanced publicly available package for NTFS (see ntfsprogs\ntfsck.c in its source), but that's about it. (You might be able to contract the developers to implement this for you. This isn't so hard technically, just time and effort.)

So, your best bet for now is to boot from a Windows live media (MS DaRT is the official one for repair tasks) and run chkdsk /r.

I also succeeded in booting from a Linux Live CD, sharing the block device with Samba, then mounting and checking it over the network from a Windows machine with ImDisk.

Alternatively, How to unmark an NTFS cluster as bad? outlines how to do this by hand. Basically, it's editing NTFS metadata in a hex editor.

Share:
10,558

Related videos on Youtube

Ben
Author by

Ben

Updated on September 18, 2022

Comments

  • Ben
    Ben over 1 year

    one of my laptops are using windows and after a certain impact it doesn't boots up anymore, I figured the disk might've been damaged. So I've launced live Kali linux and scanned it with badblocks (like in this article) and found ten thousand of them (bad blocks). Now, how can I mark those blocks as unusable, because it seems that fsck doesn't work on NTFS.

    badblocks /dev/sda > ~/bad_blocks
    
    • Hastur
      Hastur over 8 years
      Thousands of bad block means with all the probability that your HDD is gone (or is running away really well). BTW it seems there is a solution in this question or better in the answer, as said in one answer here below too...
  • Ben
    Ben about 10 years
    What I meant to do is to fix the bad blocks and then reinstall the windows there. Why my HDD cannot be used? I once had another disk with bad sectors, i wiped out them and the disk was functioning normally.
  • Ben
    Ben about 10 years
    how to know the range of disk to be quarantined?
  • ivan_pozdeev
    ivan_pozdeev over 8 years
    @user305645 Untrue. This is far from being the only cause for bad blocks.