waldheinz/fat32-lib

On Ubuntu IOException "missing boot sector signature" is thrown

Opened this issue · 4 comments

The same code works under windows and mac.
The exception is thrown after calling
final FatFileSystem fileSystem = FatFileSystem.read(channel, true);
which at some point calls
public static BootSector read(BlockDevice device) throws IOException {

There is not much logic involved when checking the presence of a boot sector, so I can only assume the problem lies somewhere else. What kind of device are you trying to read from? Was it created by fat32-lib itself? Can it be read by other operating systems?

I created it under debian with:

dd if=/dev/zero of=tmpimage bs=1M count=120
mkfs.vfat -F32 tmpimage

I can read that image under ubuntu, windows and osx.
Also the same image + code works under windows and osx, but not under ubuntu.

I agree that the boot sector check is plain simple and so I guess I should look somewhere else for the error....

Thanks for taking the time to have a look. If you can't make any sense of this I'd be interested in getting my hands on the failing image file if you can find some place to upload it.

And thank you for the support! Will keep that in mind.