# Question about fsck

## alex6

I hope my topic is at the right place...

If I use ntfsck or fsck to write the badblocks informations on a NTFS Disk, will a computer on Windows be able to read these informations ?

In other words : is it usefull to do a fsck on a drive someone will use on windows ?

----------

## ferreirafm

Hi alex6,

Don't know why you want  to do this, but for sure such information is useless for Windows.

However, you can try ntfsfix to repair some stuff and schedules an NTFS consistency check for the first boot into Windows.

Hope it helps.

EDIT: have a look on ntfs3g

----------

## NeddySeagoon

alex6,

If you can detect bad blocks on a HDD < 10 years old, its end of life, throw it away.

The reason is that the drive works hard to hide bad blocks from the operating system by changing the mapping between logical blocks and physical blocks on the drive surface. (Hopefully), data is moved around while it can still be read, if not the data is lost and the next write to that location will force the remap to happen.

Anyway, to answer your question as asked, some filesystems can take a bad blocks list file and mark these blocks as unusable.

Others, read the drive surface as a part of the mkfs operation to discover bad blocks, some, like extX can be forced to do a write test. Others like FAT, trust to luck.  NTFS does a full read  test.

----------

## alex6

Thank you for your reply...but does it means a windows can read informations about badblock written by fsck ?

 *Quote:*   

> NTFS does a full read test

 

This is a "yes" ?

Sorry, english is not my native language

----------

## Navar

Hi alex6,

I'm going to re-answer you by going off your original post.

 *alex6 wrote:*   

> If I use ntfsck or fsck to write the badblocks informations on a NTFS Disk, will a computer on Windows be able to read these informations ?

 

No.  Use a windows pre-boot chkdsk environment for that.  Feel free to stop here if you like.  :Wink: 

There is ntfsfix with a corresponding man page and ntfsck with no man page.  The fsck you mention is Linux specific not NTFS (the distinction is important), usually with links to a common specialized filesystem variant like ext2+, e.g., e2fsck.  Some distributions make an fsck.ntfs link to ntfsck, some other distributions avoid including ntfsck at all and for good reason.

ntfsfix and ntfsck are part of the ntfsprogs package.  Other than ntfsfix flipping the dirty bit flag on an NTFS volume and some basic consistency checks, I would not count on this to handle more low level and possibly unknown details versus a native Windows pre-boot chkdsk environment.  I would strongly suggest not touching ntfsck especially if the volume in question is not your own to muck about with.  I believe development on it, particularly details on what it even does, were abandoned years ago.  Just avoid.

 *Quote:*   

> In other words : is it usefull to do a fsck on a drive someone will use on windows ?

 

No.

If you do not care about pre-existing data on the drive and wanted linux to re-map any bad block information before it was re-formatted as NTFS for use in Windows, maybe, but modern firmware on hard drives has handled any re-mapping transparently to the OS and filesystems used for quite awhile now.  I question if you'd even have any success accessing firmware re-mapped blocks.

Is it useful to turn on the dirty bit for an NTFS volume you've modified in some way under Linux for ensuring consistency and being fully OK via a Windows pre-boot chkdsk forced to run?  Yes.

----------

## NeddySeagoon

alex6,

 *Quote:*   

> NTFS does a full read test

 , means that it is not required.

NTFS does its own thing to detect bad blocks during a format operation.

----------

