Fixing the Bad Sectors List After Cloning
If you use ntfsclone to copy/backup a partition from a disk with bad sectors to a new disk, Windows still reports bad sectors on the new disk. This is no surprise as ntfsclone copies everything, including the bad sector list.
Now you could use a disk editor to get rid of the wrongly reported bad sectors, or boot from a Knoppix CD and use ntfstruncate:
- Back up important data from partition just in case
- Find out size of ‘$Bad’ attribute in $Badclus using ntfsinfo with
ntfsinfo -i 8 <partition>. It will be the “Allocated size” value in the “Dumping attribute $DATA (0×80)” (there will be two 0×80 attributes. Only one has an “Allocated size” line).
ntfstruncate <partition> 8 0x80 '$Bad' 0to set $Bad’s attribute length to zero.
ntfstruncate <partition> 8 0x80 '$Bad' <ntfs_size>to set $Bad’s attribute length back to proper value which was recorded in step 2.
- Boot into Windows and run chkdsk. It will find errors and should fix them.
Via the ntfsclone FAQ.