Summary of FAT file system 2

   

The sector has an important data structure that contains our concerns BPB (BIOS Parameter Block). The following table of contents translated from Microsoft's "Microsoft Extensible Firmware Initiative FAT32 File System Specification-version1.03", which contains a description of each of BPB.

NOTE : In the following description, the name to BPB_ beginning belongs BPB section to BS at the beginning of the start part of the movable sector ( Boot Sector ) section actually does not belong to the BPB .

 四、 分区引导扇区

 Fourth, the  district cited guide sector

Often called the boot sector, Microsoft called sector 0 (0 th Sector), we know by the previous description, called sector 0 is not correct, so it is easy to misunderstand the most disk in front of a sector, sector 0 just call it the FAT sector indicates that it is a reference point only.

  Summary of FAT file system 2

                                                 Figure 2:DBR

 
 
offset
Length
Description
 
 
(byte) (byte)
 
 
 
 
BS_jmpBoot
0x00
3
Jump instruction, pointing to the boot code
 
BS_OEMName
0x03
8
The recommended value "MSWIN4.1". Some vendors might FAT drive
 
 
 
 
Detect this, so set "MSWIN4.1" You can try to avoid compatibility
 
 
 
 
Problems
 
BPB_BytsPerSec
0x0b
2
The number of bytes per sector, only the following values: 512, 1024,
 
 
 
 
2048 or 4096. Set 512 will get the best compatibility, the current
 
 
 
 
There are a lot of FAT code is mandatory for the number of bytes per sector 512,
 
 
 
 
Instead of the actual detection value. But Microsoft's operating system can be a good support
 
BPB_SecPerClus
0x0d
1
1024, 2048 or 4096
 
Number of sectors per cluster, its value must be integer power of 2 (the integer must
 
 
 
 
> = 0), but also to ensure that the number of bytes per cluster can not exceed 32K, it
 

 

 
 
 
 
 
1024 * 32 bytes
 
 
BPB_RsvdSecCnt
0x0e
2
 
The number of reserved sectors of this field can not be 0, FAT12/FAT16 must
 
 
 
 
 
 
1, a typical value of FAT32 is taken as 32, Microsoft's system to support any non-zero
 
 
 
 
 
 
Value
 
 
 
 
 
 
 
 
 
BPB_BumFATs
0x10
1
 
Copies FAT partition tables, FAT formats are any suggestions for 2
 
 
BPB_RootEntCnt
0x11
2
 
For FAT12 and FAT16 this domain number (each directory that contains the root directory
 
 
 
 
 
 
Term length is 32bytes), for FAT32, this must be 0. To
 
 
 
 
 
 
In FAT12 and FAT16, this number must be multiplied by 32 to
 
 
 
 
 
 
BPB_BytesPerSec even multiple of, in order to achieve better compatibility,
 
 
 
 
 
 
FAT12 and FAT16 should be a value of 512
 
 
BPB_ToSec16
0x13
2
 
Early versions of 16bit total sector, where the total number of sectors, including FAT volumes
 
 
 
 
 
 
All sectors on the four basic partitions, this field can be 0, if this field is 0,
 
 
 
 
 
 
So BPB_ToSec32 must be 0 for FAT32, this field will be 0.
 
 
 
 
 
 
For FAT12/FAT16, fill in the total number of sectors in this field, if the value is less than
 
 
 
 
 
 
0x10000 words, BPB_ToSec32 must be 0
 
 
BPB_Media
0x15
1
 
For "fixed" (non-removable) storage media, 0xF8 standard
 
 
 
 
 
 
Values ​​for the removable storage medium, is frequently used value 0xF0, this
 
 
 
 
 
 
The value domain can legally take 0xF0, 0xF8, 0xF9, 0xFA, 0xFC,
 
 
 
 
 
 
0xFD, 0xFE, 0xFF. Also to be reminded that, regardless of the domain written
 
 
 
 
 
 
What values ​​must also be in FAT [0] is the low byte written to the same
 
 
 
 
 
 
Value, which is used as the early MSDOS 1.x byte to determine what is
 
 
 
 
 
 
Kinds of storage media
 
 
 
 
 
 
 
 
 
BPB_FATSz16
0x16
2
 
FAT12/FAT16 a number of sectors occupied by the FAT table for FAT32
 
 
 
 
 
 
For this field must be 0, specified in the FAT table in BPB_FATZ32
 
 
 
 
 
 
Size
 
 
 
 
 
 
 
 
 
BPB_SecPerTrk
0x18
2
 
The number of sectors per track for BIOS interrupt 0x13, this field only to have
 
 
 
 
 
 
"Special Shapes" (by the cylinder head and each track is divided into a number of) storage
 
 
 
 
 
 
Media effectively, and must be able to invoke the BIOS interrupt 0x13 to get this
 
 
 
 
 
 
Value
 
 
 
 
 
 
 
 
 
BPB_NumHeads
0x1A
2
 
Heads, 0x13 for BIOS interrupts, similar to the above BPB_
 
 
 
 
 
 
SecPerTrk, only for special media to be effective, this field contains a to
 
 
 
 
 
 
Is a small value, for example, 1,4 M This field is two floppy
 
 
BPB_HidSec
0x1C
4
 
Previously hidden FAT partition number of sectors, we must make the call BIOS
 
 
 
 
 
 
The 0x13 interrupt can get this value, for those who do not partition storage
 
 
 
 
 
 
Media, this field must be 0, of what value is determined by the specific use of the operating system
 
 
BPB_ToSec32
0x20
4
 
The volume of the total number of sectors (32bit), where the total number of sectors, including FAT volumes
 
 
 
 
 
 
Four basic points of all sectors, this field can be 0, if this field is 0,
 
 
 
 
 
 
BPB_ToSec16 must be non-zero for FAT32, this field must be non-zero.
 
 
 
 
 
 
For FAT12/FAT16 If the total number of sectors is greater than or equal to 0x10000
 
 
 
 
 
 
, Then this field is the total number of sectors, while BPB_ToSec16 is 0.
 

 

 

123NextPage
<< Summary of FAT file system 3
>> Summary of FAT file system 1
 
Domain name: www.mrtlab.com | | Telephone: +86-27-82621261
MRT data recovery website,provides professional HDD firmware repair and data recovery technical resources!
Copyright 2003-2014 Powered By MrtLab