|
|
FAT12/FAT16 Boot Sector/Boot Record Layout (摘自GRUB4DOS 说明文档)
------------------------------------------------------------------------------
Offset Length Description
====== ====== ==============================================================
00h 2 Machine code for short jump over the data.
02h 1 LBA indicator. Valid values are 0x90 for CHS mode, or 0x0e for
LBA mode.
If the BIOS int13 supports LBA, this byte can be safely set to
0x0e.
Some USB BIOSes might have bugs when using CHS mode, so the
format program should set this byte to 0x0e. It seems that
(generally) all USB BIOSes have LBA support.
If the format program does not know whether the BIOS has LBA
support, it may operate this way:
if (partition_start + total_sectors_in_partition) exceeds the
CHS addressing ability(especially when it is greater than
1024*256*63), the caller should set this byte to 0x0e,
otherwise, set to 0x90.
Update: this byte of LBA indicator is ignored. The boot
record can probe the LBA support of BIOS.
Update(2006-07-31): Though GRLDR won't use this LBA-indicator
byte, Windows 98 uses it. Usually this byte should be 0x90 for
CHS mode(especially for floppies). If this byte is not set
properly, Windows 98 will not recognize the floppy or
partition. This problem was reported by neiljoy. Many thanks!
03h 8 OEM name string (of OS which formatted the disk).
0Bh 2 Bytes per sector. Must be 512.
0Dh 1 Sectors per cluster. Valid values are 1, 2, 4, 8, 16, 32, 64
and 128. But a cluster size larger than 32K should not occur.
0Eh 2 Reserved sectors(number of sectors before the first FAT,
including the boot sector), usually 1.
10h 1 Number of FATs(nearly always 2).
11h 2 Maximum number of root directory entries.
13h 2 Total number of sectors (for small disks only, if the disk is
too big this is set to 0 and offset 20h is used instead).
15h 1 Media descriptor byte, pretty meaningless now (see below).
16h 2 Sectors per FAT.
18h 2 Sectors per track.
1Ah 2 Total number of heads/sides.
1Ch 4 Number of hidden sectors (those preceding the boot sector).
Also referred to as the starting sector of the partition.
For floppies, it should be 0.
20h 4 Total number of sectors for large disks.
24h 1 BIOS drive number of the boot device.
Actually this byte is ignored for read. The boot code will
write DL onto this byte. The BIOS or the caller should set
drive number in DL.
We assume all BIOSes pass correct drive number in DL.
Buggy BIOSes are not supported!!
25h 1 Partition number of this filesystem in the boot drive.
This byte is ignored for read. The boot code will write
partition number onto this byte. See offset 41h below.
26h 1 Signature (must be 28h or 29h to be recognised by NT).
27h 4 Volume serial number.
2Bh 11 Volume label.
36h 8 File system ID. "FAT12 ", "FAT16 " or "FAT ".
3Eh 1 opcode for "cli".
3Fh 1 opcode for "cld".
40h 1 opcode for "mov dh, imm8".
41h 1 Partition number of this partition on the boot drive.
0, 1, 2, 3 are primary partitions.
4, 5, 6, ... are logical partitions in the extended partition.
0xff is for whole drive. So for floppies, it should be 0xff.
42h 442 Machine code.
1FCh 4 Boot Signature AA550000h. (Win9x uses 4 bytes as magic value)
你可以把 GRUB4DOS 下载过来并仔细看看其关于各类分区的引导记录格式说明。
从上可以看出,对于小容量盘其扇区总数用两个字节表示即:13h~14h
你给的图中 13h~14h 值为 80 F7,转换成10进制为 63360 个扇区,即大小为 30.9M |
|