How do I mark sectors as BAD using wi... Log Out | Topics | Search
Moderators | Edit Profile

X-Ways Support Forum » Disk Editing » How do I mark sectors as BAD using winhex? « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

John
Posted on Monday, Aug 4, 2003 - 21:57:   

I know that some of the sectors in my hard drive is really "weak", as reading from those sectors are very slow, if i mark them BAD, the system won't use them to store data. How do i mark them as BAD using winhex?

Thanks
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Monday, Aug 4, 2003 - 22:10:   

Please follow the link in the left frame of this forum to the WinHex Knowledge Base. You will find a document "Unmarking Bad Clusters with a Disk Editor", decribing the opposite of what you are trying to do (for FAT file systems only). I hope this helps. Please feel free to post here any questions that remain unanswered.
Top of pagePrevious messageNext messageBottom of page Link to this message

Anonymous
Posted on Tuesday, Aug 5, 2003 - 2:59:   

Well, this was interesting! What about including such a functionality in WinHex? Is there also a way to (un)mark sectors when using NTFS?
Top of pagePrevious messageNext messageBottom of page Link to this message

John
Posted on Tuesday, Aug 5, 2003 - 6:01:   

the article answered my question. thank you very much.
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Tuesday, Aug 5, 2003 - 10:15:   

> What about including such a functionality in WinHex?

Hmm? You can do that even with a simple disk editor, all the more with WinHex.

> Is there also a way to (un)mark sectors when using NTFS?

Yes, but that's more difficult to describe.
Top of pagePrevious messageNext messageBottom of page Link to this message

Anonymous
Posted on Tuesday, Aug 5, 2003 - 12:01:   

>Hmm? You can do that even with a simple disk editor, all the more with WinHex.

Ok, thats probably right, it can be done manually with ease. Do you know a source where it is described how to unmark at NTFS? I have not found any... If this is quite difficult, maybe an automated function (or a script?) would be handy. Once knowing what has to be done, I could also write my own.
Top of pagePrevious messageNext messageBottom of page Link to this message

Stefan Fleischmann (Admin)
Posted on Tuesday, Aug 5, 2003 - 19:56:   

You could open the NTFS drive in WinHex and use the directory browser to list the clusters allocated to the system file $BadClus. These are the bad clusters. Individual sectors are not accounted for. Usually $BadClus has a size of zero, of course (=no faulty clusters). To unmark bad clusters, you would have to edit the FILE record describing $BadClus, i.e. at least the data runs and the file size, and you would have to mark the clusters as free (unallocated) in the system file $Bitmap.
Top of pagePrevious messageNext messageBottom of page Link to this message

Anonymous
Posted on Wednesday, Feb 16, 2005 - 1:51:   

I can see where these files are but I do not understand the editing.
I need to mark some clusters as bad in NTFS.

Any scripts to automate or simplify this procedure for a neophyte?
Top of pagePrevious messageNext messageBottom of page Link to this message

StSlam
Posted on Wednesday, Feb 15, 2006 - 12:32:   

I am dramatically need to mark some clusters as bad in NTFS. Can You give sample?
Top of pagePrevious messageNext messageBottom of page Link to this message

Jens Kirschner (Admin3)
Posted on Wednesday, Feb 15, 2006 - 13:15:   

Marking sectors as bad should be no problem at all using Windows' Scandisk feature with defective sector checking option enabled. If you really mean to do this manually, be advised that NTFS is a lot more complicated than FAT! In FAT, if you manipulate the two allocation tables, you're done.

In NTFS, you would have to actually modify the file record of the $BadClus system file, which requires knowledge of data runs - I am afraid, it is very unlikely to get this straight without learning about those first. It is all the worse if the cluster in question is already used because you would also have to detach the cluster from its current file, again by modifying the respective data runs and also the file size because that file will now have one cluster less.

If the cluster is currently unallocated, the corresponding bit in the $Bitmap has to be set, otherwise it may remain so.

Add Your Message Here
Post:
Username: Posting Information:
Only registered users may post messages here, i.e. you need to have an account.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:
Forum operated by X-Ways Software Technology AG.