📄 readmecn.txt
字号:
Valid values are 2 for 1024-byte blocks, and 1 otherwise.
有效值:对于1024字节的块,是2,其它情况是1。
The value here is equal to (s_first_data_block + 1).
这里的值等于(s_first_data_block + 1)。
30h 462 Machine code.
机器代码。
1FEh 2 Boot Signature AA55h.
引导签名AA55h。
2. FAT12/FAT16 Boot Sector/Boot Record Layout (for loading grldr)
2. FAT12/FAT16 引导扇区/引导记录的布置(用于引导grldr)
------------------------------------------------------------------------------
A sample floppy image is fat12grldr.img within the GRUB for DOS release. Copy
grldr and an optional menu.lst to the root dir of the filesystem inside the
image, and the image is then a GRUB-bootable floppy image. Note that the first
sector of fat12grldr.img is exactly the same as the fourth sector of grldr.
一个例子软盘映像是GRUB for DOS发布内的fat12grldr.img。复制grldr 和可选的menu.lst到
映像内文件系统的根目录,这个映像就成为一个grldr可引导的软盘映像。请注意
fat12grldr.img的第一扇区与grldr第四扇区完全相同。
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.
逻辑块地址指示码。有效值为0x90(CHS模式),或0x0e(逻辑块地址模式)
If the BIOS int13 supports LBA, this byte can be safely set to
0x0e.
如果BIOS 中断13 支持逻辑块地址,此字节可以安全地设置为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.
一些USB BIOS在使用CHS 方式时可能存在臭虫,所以格式化程序应将些字节
设为0x0e。看起来(通常)所有USB BIOS都具有逻辑块地址支持。
If the format program does not know whether the BIOS has LBA
support, it may operate this way:
如果格式化程序不知道BIOS是否支持逻辑块地址,它可以按如下进行操作:
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.
如果(分区的开始地址加上分区的总扇区)超过了CHS 的地址能力。
(特别是当它大于1024*256*63),调用程序应设置此字节为0x0e,
否则,要设为0x90。
03h 8 OEM name string (of OS which formatted the disk).
初始设备制造厂家名称字符串(对该磁盘进行格式化的操作系统厂家)。
0Bh 2 Bytes per sector. Must be 512.
每块的扇区数。必须是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.
每簇的扇区数。有效值是1, 2, 4, 8, 16, 32, 64和 128。但是每簇尺寸
大于32K的情况不应发生。
0Eh 2 Reserved sectors(number of sectors before the first FAT,
including the boot sector), usually 1.
保留的扇区(第一文件分配表之前的扇区数,包括引导扇区),通常是1。
10h 1 Number of FATs(nearly always 2).
文件分配表数(几乎总是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).
扇区总数(仅用于小磁盘,如果磁盘太大,它被设置为0,并且偏移量
20h被用于这个目的)。
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.
对于软盘,它应为0。
20h 4 Total number of sectors for large disks.
大磁盘的扇区总数。
24h 1 BIOS drive number of the boot device.
引导设备的BIOS磁盘号码。
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.
实际上此字节在读入时被忽略。引导代码将写DL到此字节。 BIOS或者
调用程序应在DL中设置磁盘号码。
We assume all BIOSes pass correct drive number in DL.
Buggy BIOSes are not supported!!
我们假定所有BIOS在DL中传递正确的磁盘号码。臭虫成灾的BIOS不被支持。
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.
此字节在读入时被忽略。引导代码将写分区号码到此字节。
参见下列偏移量41h。
26h 1 Signature (must be 28h or 29h to be recognised by NT).
签字(必须是28h或者29h,以便能够被NT认出)
27h 4 Volume serial number.
卷的系列号码。
2Bh 11 Volume label.
卷的标签。
36h 8 File system ID. "FAT12 ", "FAT16 " or "FAT ".
文件系统ID。"FAT12 ", "FAT16 " 或 "FAT "。
3Eh 1 opcode for "cli".
"cli"的操作码。
3Fh 1 opcode for "cld".
"cld"的操作码。
40h 1 opcode for "mov dh, imm8".
"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.
0, 1, 2, 3 是主分区
4, 5, 6, ... 是扩展分区上的逻辑分区。
0xff is for whole drive. So for floppies, it should be 0xff.
0xff 代表整个磁盘。所以对于软盘,其分区号码应当是0xff。
42h 442 Machine code.
机器指令代码。
1FCh 4 Boot Signature AA550000h. (Win9x uses 4 bytes as magic value)
引导签名AA550000h。(Win9x使用4字节作为魔数值。)
3. FAT32 Boot Sector/Boot Record Layout (for loading grldr)
2. FAT32引导扇区/引导记录的布置(用于引导grldr)
------------------------------------------------------------------------------
A FAT32 partition can be GRUB-bootable. Copy grldr and an optional menu.lst to
the root dir of the FAT32 partition, and build the boot sector based on the
third sector of grldr(some fields need to be changed as detailed in the
following table). That is ok, the FAT32 partition is then GRUB-bootable.
一个FAT32分区能够成为GRUB可引导的分区。复制grldr 和可选的menu.lst到
FAT32分区的根目录,并且依据grldr第三扇区建立引导扇区(一些地方需要改变,详情参见如下
的表格)。这样就可以了,FAT32分区然后就能够成为GRUB可引导的分区。
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.
逻辑块地址指示码。有效值为0x90(CHS模式),或0x0e(逻辑块地址模式)。
If the BIOS int13 supports LBA, this byte can be safely set to
0x0e.
如果BIOS 中断13 支持逻辑块地址,此字节可以安全地设置为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.
一些USB BIOS在使用CHS 方式时可能存在臭虫,所以格式化程序应将些字节
设为0x0e。看起来(通常)所有USB BIOS都支持逻辑块地址。
If the format program does not know whether the BIOS has LBA
support, it may operate this way:
如果格式化程序不知道BIOS是否支持逻辑块地址,它可以按如下进行操作:
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.
如果(分区的开始地址加上分区的总扇区)超过了CHS 的地址能力。
(特别是当它大于1024*256*63),调用程序应设置此字节为0x0e,
否则,要设为0x90。
03h 8 OEM name string (of OS which formatted the disk).
初始设备制造厂家名称字符串(对该磁盘进行格式化的操作系统厂家)。
0Bh 2 Bytes per sector. Must be 512.
每块的扇区数。必须是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.
每簇的扇区数。有效值是1, 2, 4, 8, 16, 32, 64和 128。但是每簇尺寸
大于32K的情况不应发生。
0Eh 2 Reserved sectors(number of sectors before the first FAT,
including the boot sector), usually 1.
保留的扇区(第一文件分配表之前的扇区数,包括引导扇区),通常是1。
10h 1 Number of FATs(nearly always 2).
文件分配表数(几乎总是2)。
11h 2 (Maximum number of root directory entries)Must be 0.
(根目录的最大数量)必须是0。
13h 2 (Total number of sectors for small disks only)Must be 0.
(仅用于小磁盘的扇区总数)必须是0。
15h 1 Media descriptor byte, pretty meaningless now (see below).
媒体描述字节,现在已经没有太大意义了(见如下)。
16h 2 (Sectors per FAT)Must be 0.
(每文件分配表的扇区数)必须是0。
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.
对于软盘,它应为0。
20h 4 Total number of sectors for large disks.
大磁盘的扇区总数。
24h 4 FAT32 sectors per FAT.
每文件分配表的FAT32扇区数。
28h 2 If bit 7 is clear then all FATs are updated, otherwise bits
0-3 give the current active FAT, all other bits are reserved.
如果第7位被清零,所有文件分配表将被更新,否则位0-3给出现在活动的
文件分配表,所有其它位被保留。
2Ah 2 High byte is major revision number, low byte is minor revision
number, currently both are 0.
高字节是主修订号码,低字节是小修订号码,现在都是0。
2Ch 4 Root directory starting cluster.
根目录开始簇。
30h 2 File system information sector.
文件系统信息扇区。
32h 2 If non-zero this gives the sector which holds a copy of the
boot record, usually 6.
如果非零,它给出具有引导记录的备份的扇区,通常是6。
34h 12 Reserved, set to 0.
保留,设为0。
40h 1 BIOS drive number of the boot device.
引导装置的BIOS盘号码。
80h is first HDD, 00h is first FDD.
第一硬盘是80h,第一软盘是00h。
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.
实际上此字节在读入时被忽略。引导代码将写DL到此字节。 BIOS或者
调用程序应在DL中设置磁盘号码。
We assume all BIOSes pass correct drive number in DL.
Buggy BIOSes are not supported!!
我们假定所有BIOS在DL中传递正确的磁盘号码。臭虫成灾的BIOS不被支持。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -