Jump to content

Chkdsk -> how are bad sectors handled?

asheenlevrai
Go to solution Solved by Eigenvektor,
37 minutes ago, asheenlevrai said:

Now, if the above is true, then I guess if the volume is deleted, then the list of bad sectors is deleted as well, right?

They get written to MBR/GPT, not a file on the file system. That means they should survive pretty much anything, other than (maybe) a conversion between MBR <-> GPT (no idea if the conversion would also convert this information, but it would seem logical to do so)

 

It's also possible for the controller's firmware itself to detect a physical bad sector, which would then store that information internally and remap it, so from the point of view of the OS, everything is fine with that sector and it can't see/access the bad sector.

Hey 🙂

 

I'm not very familiar with bad sectors (logical/physical) and how they are handled. If I say anything wrong please correct me (so that I'll die a little less ignorant), thanks.

 

AFAIU, in windows, we can use chkdsk to scan and potentially repair bad sectors on a volume (AFAIK chkdsk cannot do that on a blank disk with no defined volume).

The sectors that are detected as bad are either fixed (logical bad sectors) or marked as unusable (physical bad sectors) if they cannot be fixed. This information goes into a list that is stored somewhere on the volume (a hidden file, I presume).

 

Now, if the above is true, then I guess if the volume is deleted, then the list of bad sectors is deleted as well, right?

Same thing if I decide to format a windows HDD and use it in Linux, for instance, after formatting it using a different filesystem. Then all the bad sectors would potentially be used again (leading to problems), right?

 

Please let me know if this sounds right or if I misunderstood anything.

 

Thank you very much in advance for your help.

Best,

-a-

Link to comment
Share on other sites

Link to post
Share on other sites

37 minutes ago, asheenlevrai said:

Now, if the above is true, then I guess if the volume is deleted, then the list of bad sectors is deleted as well, right?

They get written to MBR/GPT, not a file on the file system. That means they should survive pretty much anything, other than (maybe) a conversion between MBR <-> GPT (no idea if the conversion would also convert this information, but it would seem logical to do so)

 

It's also possible for the controller's firmware itself to detect a physical bad sector, which would then store that information internally and remap it, so from the point of view of the OS, everything is fine with that sector and it can't see/access the bad sector.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

21 hours ago, Eigenvektor said:

They get written to MBR/GPT, not a file on the file system. That means they should survive pretty much anything, other than (maybe) a conversion between MBR <-> GPT (no idea if the conversion would also convert this information, but it would seem logical to do so)

 

It's also possible for the controller's firmware itself to detect a physical bad sector, which would then store that information internally and remap it, so from the point of view of the OS, everything is fine with that sector and it can't see/access the bad sector.

Thanks a lot 🙂

that's very useful.

Have a great 2024

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Ă—