Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fsck.fat: Add code for fixing first FAT cluster #155

Merged
merged 2 commits into from
Jan 27, 2021

Conversation

pali
Copy link
Member

@pali pali commented Jan 17, 2021

This patch tries to fix infamous fsck.fat error:

Both FATs appear to be corrupt. Giving up.

It just fill again FAT media type and sets other bits to one as it is
required by FAT specification. Similar thing is doing also Windows chkdsk
tool.

In the most cases corrupted first FAT cluster is fatal error which
indicates totally corrupted filesystem impossible to repair. So fixing
first FAT cluster is not done by fsck.fat automatically and needs to be
enabled by a new -F option, which forces usage of specified FAT table
(either clean or corrupted).

Fixes #22

This patch tries to fix infamous fsck.fat error:

    Both FATs appear to be corrupt. Giving up.

It just fill again FAT media type and sets other bits to one as it is
required by FAT specification. Similar thing is doing also Windows chkdsk
tool.

In the most cases corrupted first FAT cluster is fatal error which
indicates totally corrupted filesystem impossible to repair. So fixing
first FAT cluster is not done by fsck.fat automatically and needs to be
enabled by a new -F option, which forces usage of specified FAT table
(either clean or corrupted).
Extend also test-fsck script to read additional arguments from .args file.
@pali pali merged commit 82c2111 into dosfstools:master Jan 27, 2021
@pali pali deleted the fix-first-cluster branch January 27, 2021 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fsck.fat: Both FATs appear to be corrupt. Giving up.
1 participant