Octacone wrote:
Okay so when I look inside the root directory there is a valid entry present, everything contained within the file can also be found at sector x and y (standard stuff), but there are no FAT entries present.
...
How am I supposed to follow the cluster chain when there is no one to follow?
Yes, Linux shows that file (inside its file manager app) just fine.
And just how do you know those "x and y (standard stuff)", especially when there's more than one "x"? And how do you know where the root directory or the file ends? To know that you'd need to access the cluster chain. If Linux is able to do it and you "observe" problems with several different tools, it's very likely the problem is actually in your code and not elsewhere. Somehow you aren't calculating the location correctly. You must be able to see the last cluster markers for the root directory and for the file (and all preceding clusters in the chain if the size is larger than one cluster).
Start with a clean FAT32-formatted disk image (no files, just the root dir). Look (with your hex editor?) for the two reserved entries for clusters numbered 0 and 1. Those should typically be 0x0F.FF.FF.F8 and 0x0F.FF.FF.FF. If your FAT32 root directory starts at cluster 2 (typical), then the next value should also be 0x0F.FF.FF.FF. Your calculations should give you the sector where you find these three values. I bet the are off by something.
P.S. If you don't find those two/three values anywhere, check with fatgen103.doc. The doc allows for different EOC values, there are reserved bits in FAT32 cluster values, etc etc.