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

fatcat does not support BPB_RootClus != 2 #29

Open
ntlhui-tdy opened this issue Jul 29, 2021 · 0 comments
Open

fatcat does not support BPB_RootClus != 2 #29

ntlhui-tdy opened this issue Jul 29, 2021 · 0 comments

Comments

@ntlhui-tdy
Copy link

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

No branches or pull requests

1 participant