# Advanced NTFS Boot and MFT Repair

### From CGSecurity

## Repair NTFS Boot Sector

If the NTFS boot sector is damaged, data can not be accessed. Windows will prompt `The drive is not formatted, do you want to format it now?` Linux mount will display `wrong fs type, bad option, bad superblock`

TestDisk let you manipulate and fix the boot sector of NTFS partitions. Select the partition you want to modify and choose Boot.

### Recovering NTFS Boot Sector on NTFS Partitions using its backup

TestDisk can use backup boot sector to fix corrupted NTFS boot sector. The primary boot sector is sector zero of the filesystem, the backup NTFS boot sector is located near the end of the filesystem. TestDisk checks the boot sector and the backup boot sector. If the boot sector and backup boot sector mismatches, you can overwrite the NTFS boot sector with the backup boot sector (Backup BS) or vice versa (Org. BS). Dump can used to display the boot sector content in both hexadecimal and ascii.

### Rebuilding NTFS Boot Sector on NTFS Partitions

If both NTFS boot sector are corrupted, you need to rebuild NTFS boot sector, TestDisk searches the MFT (Master File Table: $MFT) and its backup ($MFTMirr). It reads the mft record size and it computes the cluster size, It reads the Size of Index Allocation Entry in the root directory index. Using all these values, TestDisk can provide a new boot sector. Finaly it lets the user list the files before writing.

## Repair NTFS MFT

The MFT (Master File Table) is sometimes corrupted. If Microsoft Check Disk (chkdsk) failed to repair the MFT, run TestDisk and in the Advanced menu, select your NTFS partition and choose Repair MFT. TestDisk will try to repair the MFT using MFT mirror, its backup.

Back to Running the TestDisk Program

Category: Data Recovery

##### Data Recovery

- TestDisk
- PhotoRec
- download