fsck_msdosfs(8)

fsck_msdosfs8

Dos/windows (fat) file system consistency checker

Usage

fsck_msdosfs -p [-BCf] filesystem ...

fsck_msdosfs [-BCMny] filesystem ...

Overview

The fsck_msdosfs utility verifies and repairs FAT file systems (more commonly known as DOS file systems).

The first form of fsck_msdosfs preens the specified file systems. It is normally started by fsck(8) run from /etc/rc during automatic reboot, when a FAT file system is detected. When preening file systems, fsck_msdosfs will fix common inconsistencies non-interactively. If more serious problems are found, fsck_msdosfs does not try to fix them, indicates that it was not successful, and exits.

The second form of fsck_msdosfs checks the specified file systems and tries to repair all detected inconsistencies, requesting confirmation before making any changes.

The options are as follows:

-B

Ignored for fsck(8) compatibility.

-C

Ignored for fsck(8) compatibility.

-F

Compatibility with the wrapper fsck(8) which seeks to determine whether the file system needs to be cleaned immediately in foreground, or if its cleaning can be deferred to background. FAT (MS-DOS) file systems must always be cleaned in the foreground. A non-zero exit code is always returned for this option.

-M

Causes fsck_msdosfs to not use mmap(2) when checking a FAT32 file system. This option is mainly for debugging purposes and is not normally necessary. The fsck_msdosfs utility will automatically fall back to use a simple LRU cache of 4 MiB when it failed to perform mmap(2), or when -M is specified.

-f

Force fsck_msdosfs to check “clean” file systems when preening.

-n

Causes fsck_msdosfs to assume “no” as the answer to all operator questions, except “CONTINUE?”.

-p

Preen the specified file systems.

-y

Causes fsck_msdosfs to assume “yes” as the answer to all operator questions.

Releases

65 releases since FreeBSD 4.4-RELEASE; the text changed 39 times.

  1. 4.4–4.7
  2. 4.8–4.11
  3. 5.0–5.1
  4. 5.2–5.2.1
  5. 5.3–5.5
  6. 6.0–6.3
  7. 6.4
  8. 7.0
  9. 7.1
  10. 7.2
  11. 7.3
  12. 7.4
  13. 8.0
  14. 8.1
  15. 8.2
  16. 8.3
  17. 8.4
  18. 9.0
  19. 9.1
  20. 9.2
  21. 9.3
  22. 10.0
  23. 10.1
  24. 10.2
  25. 10.3
  26. 10.4
  27. 11.0
  28. 11.1
  29. 11.2
  30. 11.3
  31. 11.4
  32. 12.0
  33. 12.1
  34. 12.2
  35. 12.3
  36. 12.4
  37. 13.0–13.2
  38. 13.3–14.2
  39. 14.3–14.5
  40. 15.0–16.0

-B since FreeBSD 15.0-RELEASE; -C since FreeBSD 7.3-RELEASE; -M since FreeBSD 12.2-RELEASE.

History

The fsck_msdosfs utility appeared in NetBSD 1.2. fsck_msdosfs first appeared in FreeBSD 4.4.

Bugs

The fsck_msdosfs utility is currently under development.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.