Skip to content

fatcat does not support BPB_RootClus != 2 #29

Description

@ntlhui-tdy

Per the Microsoft Extensible Firmware Initiative FAT32 File System Specification (https://msdn.microsoft.com/en-us/windows/hardware/gg463080.aspx), BPB_RootClus, which stores the cluster number of the first cluster of the root directory, is usually 2, but not required to be 2. This can be set to values others than 2 if cluster 2 is marked bad.

The check for this occurs at https://github.com/Gregwar/fatcat/blob/master/src/core/FatSystem.cpp#L190.

We found an instance where a superfloppy volume formatted on Windows 10 placed the root directory at cluster 4. fatcat was unable to load the filesystem, yielding the following error message:

sudo fatcat /dev/loop0 -i -l /
WARNING: Root directory is not 2 (4)
! Failed to init the FAT filesystem

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions