Specifications
FAT16 File System
FAT16 was introduced by MS-DOS in 1981 (very long time now). Initially, the system is designed to manage files on the floppy drive and changed several times so it is used tomanage files on my hard drive. The advantage is the FAT16 file system is compatiblealmost any Operating System be it Windows 95/98/Me, OS / 2, Linux and even Unix. But behind the biggest problem of FAT16 is having the capacity of a fixed number of clustersin a partition, so the larger the hard drive the size of the cluster will be greater, meaning that no matter how small the file still will take 32KB of disk. Another bad thing is FAT16does not support compression, encryption and access control in a partition.
Basic Structure
The FAT16 file system structure contains the following regions:
The first sector (boot sector) contain information which is used to calculate the sizes and locations of the other regions. The boot sector also contain code to boot the operating system installed on the volume. The data region is split up into logical blocks called clusters. Each of these clusters has an accompanying entry in the FAT region. The cluster specific entry can either contain a value of the next cluster which contain data from the file, or a so called End-of-file value which means that there are no more clusters which contain data from the file. The root directory and its sub-directories contain filename, dates, attribute flags and starting cluster information about the filesystem objects.
Boot Sector
The first sector in the reserved region is the boot sector. Though this sector is typical 512 bytes in can be longer depending on the media. The boot sector typical start with a 3 byte jump instruction to where the bootstrap code is stored, followed by an 8 byte long string set by the creating operating system. This is followed by the BIOS Parameter Block, and then by an Extended BIOS Parameter Block. Finally the boot sector contain boot code and a signature.
BIOS Parameter Block
The BIOS Parameter Block contains basic information about the overall structure of the FAT file system. That is information such as sector and cluster size, location information of FAT copies, the root directory size etc..
Bytes Per Sector
This value is the number of bytes in each physical sector. The allowed values are: 512, 1024, 2048 or 4096 bytes. A lot of code outthere are assuming 512 bytes per sectors, so any other values can give compatibility problems.
Sectors Per Cluster
This is the number of sectors per cluster. The allowed values are: 1, 2, 4, 8, 16, 32 or 128. But de-facto is that most combinations of 'BytesPerCluster' * 'SectorsPerCluster' which gives a total value over 32 Kb per cluster, are not supported on many system.
Reserved Sectors
Since the reserved region always contain the boot sector a zero value in this field is not allowed. The usual setting of this value is 1. The value is used to calculate the location for the first sector containing the FAT.
Number of FAT copies
This is the number of FAT copies in the file system. The recommended value is 2 (and then have two FAT copies), but other values are validm though they may not be supported on some system. The usage of two copies are to prevent data loss if one or part of one FAT copy is corrupted.
Root Entries Count
This value contain the number of entries in the root directory. Its recommended that the number of entries is an even multiple of the BytesPerSector values. The recommended value for FAT16 volumes is 512 entries (compatibility reasons).
Small Number of Sectors
This field states the total number of sectors in the volume. That includes the number of sectors occupied by the four regions which the FAT16 file system consist of. For FAT16 volumes that use less than 65536 sectors this field is used. The File System Id in the MBR is then 04h. For FAT16 volumes that use more the 65535 sectors thelarge number of sectors field is used and this one should be set to 0h.
Media Descriptor
These are the possible media descriptors values in the FAT boot sector.
Tidak ada komentar:
Posting Komentar