Questions tagged [fat16]

File Allocation Table (FAT) is the name of a computer file system architecture and a family of industry standard file systems utilizing it.

The FAT file system is a legacy filesystem which is very simple, but cannot offer the same performance, reliability and scalability that modern filesystems such as NTFS, ext4 and btrfs can offer. It is however supported for compatibility reasons by virtually all existing operating systems for personal computers, and thus is a well-suited format for data exchange between computers and devices of almost any type and age from the early 1980s up to the present.

Wikipedia has a large entry covering most of the aspects of FAT.

24 questions
6
votes
1 answer

Disable Cache/Buffer on Specific File (Linux)

I am currently working in a Yocto Linux build and am trying to interface with a hardware block on an FPGA. This block is imitating an SD card with a FAT16 file system on it; containing a single file (cam.raw). This file represents the shared memory…
Unn
  • 4,775
  • 18
  • 30
4
votes
1 answer

FAT16 Bootloader only Loading First Cluster of a File

I am currently in the process of fixing a bootloader I wrote to load my custom real-mode x86 kernel (SYS.BIN). I managed to get it to read the root directory and FAT, and load a small-ish kernel from the filesystem, all within the bootsector.…
Steve R
  • 43
  • 4
4
votes
1 answer

FAT16 directories

I'm working on a low-level application which uses a FAT16 file system structure on a resource-constrained microcontroller which necessitates that I write my own custom access code. I've already looked into using libraries like Petit FAT and FatFS…
helloworld922
  • 10,801
  • 5
  • 48
  • 85
3
votes
2 answers

Bootloader Loading Itself Rather than Kernel

I am currently working on a bootloader written in x86 NASM assembly, designed to load the kernel (R.BIN) from a FAT16 formatted disk. It has not been doing so, and after incorporating short messages for debugging (A, B, C, D, J, !; lines involving…
House
  • 309
  • 3
  • 9
3
votes
2 answers

How to traverse a FAT directory, file

I am trying to understand how a FAT file system works. From the attached first sector of FAT 16 partition I could understand, Bytes per sector = 512. Sectors per cluster = 4. FAT 16 file system. reserved sectors = 4. FAT table count = 2. Number of…
prasannatsm
  • 900
  • 1
  • 11
  • 19
2
votes
1 answer

What is needed to calculate the byte offset for a file in FAT16?

I have a program and a FAT16 image. Conveniently, the image begins with the boot sector. From there I have extracted the root directory, bytes per sector, and bytes per cluster. The algorithm for obtaining the byte offset for a subdirectory from…
user2738698
  • 520
  • 7
  • 19
2
votes
2 answers

"Not enough clusters for a 16 bit FAT", but I'm above minimum size. Why?

I'm trying to make a FAT16 filesystem on my Ubuntu. So, I first create the file with dd if=/dev/zero of=Fat16.bin bs=1024 count=8192. This will create a 8MB file full of zeros. Then, I format this file to be a FAT16 filesystem by issuing the…
vicaba
  • 2,836
  • 1
  • 27
  • 45
1
vote
3 answers

FAT, optimize performance when retrieve a file

I have an implementation of database with one file per record, and I have about 10000 records. I'm trying to optimize the performance of access to file, and I have a little doubt. Is split files into folders better then keep all in single folder,…
blow
  • 12,811
  • 24
  • 75
  • 112
1
vote
1 answer

My bootloader does not correctly loads full files (FAT16)

I've been coding a small OS for a while and I've always tested it using VMs, specifically it works on QEMU, VMWare, and VirtualBox. The kernel expects to be booted from an HDD so to test it on real hardware I burned it to a real HDD and connected it…
1
vote
0 answers

FAT16 - Timestamp for last modification of entire FAT table, or way to determine whether cluster chain has changed less than O(n)?

Is there a timestamp somewhere for the last time the FAT table has been changed? I need a way to flatten cluster chains (for constructing NewtonOS VBOs, which uses a single object that then has pointers to other objects/sectors). Or a particular…
Jim Witte
  • 19
  • 1
  • 6
1
vote
1 answer

How to increment 64-bit memory effective address in Real Mode

I am reading sectors from my extended drive in Real Mode using the interrupt 0x13 with the function of extended drives 0x42. I define DAP to be 16 bytes in the following structure: DAP: db 0x10 ; size of DAP db 0 ;…
1
vote
2 answers

how identify FAT16 or FAT32 from boot sector

Is there a way to identify the type of a FAT partition (if it is 16 or 32) only by reading its boot sector? thanks.
bobbyBrown
  • 21
  • 5
1
vote
1 answer

Reading a FAT16 file system

I am trying to read a FAT16 file system to gain information about it like number of sectors, clusters, bytespersector etc... I am trying to read it like this: FILE *floppy; unsigned char bootDisk[512]; floppy = fopen(name, "r"); fread(bootDisk, 1,…
user3037172
  • 577
  • 1
  • 7
  • 25
1
vote
1 answer

Understanding FAT16

I'm developing a flash based USB mass storage device with FAT16 file system. It's working properly, however I have difficulties understanding what's happening on the FAT segments. When I begin, I have a single file, 56 bytes long on the root…
stdcall
  • 27,613
  • 18
  • 81
  • 125
1
vote
1 answer

how to distinguish directory and file entry in fat16?

If in fat16 system i am much confused about distinguishing a sub-directory and a file. As sub directory and a file have similar structure, how do we distinguish a directory and a file and how do we traverse through directories to reach the file? …
sheeru
  • 482
  • 4
  • 13
1
2