Reputation: 29
We can get the cluster number of the first root directory of a FAT32 filesystem by looking at the bootsector. Though I am quite sure it is possible for the root directory to contain more than one cluster for use as a directory structure.
I created a FAT32 volume and created around 40 files, which is more files than can fit in a 512 byte directory structure (every file is 32 bytes, 32 * 40 = 1280 > 512), so the files are split into three directory structures. I can clearly see them at different locations by hexdumping the disk, but I wonder if it is possible to find these directory structures programmatically?
I looked through old posts, Wikipedia for FAT design and the FAT specification from MS, but was not able to find something on this. I also thought about just going through the FAT, but we don't really know which cluster stores a directory structure and what is just another file.
Many thanks in advance.
Upvotes: 0
Views: 16