---
name: "fsck_msdosfs"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/fsck_msdosfs"
---

# fsck\_msdosfs(8)

DOS/Windows (FAT) file system consistency checker

## NAME

**fsck\_msdosfs** – DOS/Windows (FAT) file system consistency checker

## SYNOPSIS

**fsck\_msdosfs** **-p** \[**-BCf**\] *filesystem* *...*

**fsck\_msdosfs** \[**-BCMny**\] *filesystem* *...*

## DESCRIPTION

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)](/fsck/8.md) 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)](/fsck/8.md) compatibility.

- **-C**

  Ignored for [fsck(8)](/fsck/8.md) compatibility.

- **-F**

  Compatibility with the wrapper [fsck(8)](/fsck/8.md) 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)](/mmap/2.md) 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)](/mmap/2.md), 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.

## SEE ALSO

[msdosfs(4)](/msdosfs/4.md), [fsck(8)](/fsck/8.md)

## 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.
