Skip to main content
fixed some typos. and swapped flag definitions
Source Link

CHKDSK does quite a few things behind the scenes. They are represented in the different phases of CHKDSK.

NTFS has something called an MFT (or Master File Table). This MFT is a list of all files on the hard drive. To check for file consistency, CHKDSK reads the MFT entry by entry, and then it goes up and looks up the corresponding file in the HDD.

For example CHKDSK finds MyPhoto1.jpg in the MFT. The MFT says it is located in sector 230, and is 30 sectors long. CHKDSK then goes and reads sector 230 to 260, and sees that it is in fact populated by data, and is one file. This is how CHKDSK checks for file system consistency. Files inconsistency doesn't necessarily mean a bad sector, it could mean the computer was powered off during a write to the HDD.

With the /fr flag (recover), CHKDSK also checks for bad sectors. This means CHKDSK reads the whole HDD, and reportsfile inconsistencies and read failuresattempts to repair them. When a bad sector is found it is registered as a bad sectorWithout this flag, and the data is moved tochkdsk performs a different sector and remapped in the MFT."dry run"

With the /rf flag (fix), CHKDSK attempts to repair the bad sector. In other words, it erasesattempts to recover the data on the bad sector, and attempts to rewrite to that sector. If CHKDSK reads what it wrote the sector in question, then it can mark the sectors as repaired.

CHKDSK does quite a few things behind the scenes. They are represented in the different phases of CHKDSK.

NTFS has something called an MFT (or Master File Table). This MFT is a list of all files on the hard drive. To check for file consistency, CHKDSK reads the MFT entry by entry, and then it goes up and looks up the corresponding file in the HDD.

For example CHKDSK finds MyPhoto1.jpg in the MFT. The MFT says it is located in sector 230, and is 30 sectors long. CHKDSK then goes and reads sector 230 to 260, and sees that it is in fact populated by data, and is one file. This is how CHKDSK checks for file system consistency. Files inconsistency doesn't necessarily mean a bad sector, it could mean the computer was powered off during a write to the HDD.

With the /f flag, CHKDSK also checks for bad sectors. This means CHKDSK reads the whole HDD, and reports and read failures. When a bad sector is found it is registered as a bad sector, and the data is moved to a different sector and remapped in the MFT.

With the /r flag, CHKDSK attempts to repair the bad sector. In other words, it erases the data on the bad sector, and attempts to rewrite to that sector. If CHKDSK reads what it wrote the sector in question, then it can mark the sectors as repaired.

CHKDSK does quite a few things behind the scenes. They are represented in the different phases of CHKDSK.

NTFS has something called an MFT (or Master File Table). This MFT is a list of all files on the hard drive. To check for file consistency, CHKDSK reads the MFT entry by entry, and then it goes up and looks up the corresponding file in the HDD.

For example CHKDSK finds MyPhoto1.jpg in the MFT. The MFT says it is located in sector 230, and is 30 sectors long. CHKDSK then goes and reads sector 230 to 260, and sees that it is in fact populated by data, and is one file. This is how CHKDSK checks for file system consistency. Files inconsistency doesn't necessarily mean a bad sector, it could mean the computer was powered off during a write to the HDD.

With the /r flag (recover), CHKDSK checks for file inconsistencies and attempts to repair them. Without this flag, chkdsk performs a "dry run"

With the /f flag (fix), CHKDSK attempts to repair the bad sector. In other words, it attempts to recover the data on the bad sector, and attempts to rewrite to that sector. If CHKDSK reads what it wrote the sector in question, then it can mark the sectors as repaired.

Source Link

CHKDSK does quite a few things behind the scenes. They are represented in the different phases of CHKDSK.

NTFS has something called an MFT (or Master File Table). This MFT is a list of all files on the hard drive. To check for file consistency, CHKDSK reads the MFT entry by entry, and then it goes up and looks up the corresponding file in the HDD.

For example CHKDSK finds MyPhoto1.jpg in the MFT. The MFT says it is located in sector 230, and is 30 sectors long. CHKDSK then goes and reads sector 230 to 260, and sees that it is in fact populated by data, and is one file. This is how CHKDSK checks for file system consistency. Files inconsistency doesn't necessarily mean a bad sector, it could mean the computer was powered off during a write to the HDD.

With the /f flag, CHKDSK also checks for bad sectors. This means CHKDSK reads the whole HDD, and reports and read failures. When a bad sector is found it is registered as a bad sector, and the data is moved to a different sector and remapped in the MFT.

With the /r flag, CHKDSK attempts to repair the bad sector. In other words, it erases the data on the bad sector, and attempts to rewrite to that sector. If CHKDSK reads what it wrote the sector in question, then it can mark the sectors as repaired.