📄 readmecn.txt
字号:
the (rd) drive, e.g., map --ram-drive=0xf0. The default drive
number for (rd) is 0x7F which is a floppy. If (rd) is a hard
drive image, you should change the drive number to a value
greater than or equal to 0x80(but should avoid using 0xff,
because 0xff is for the (md) device).
更新8: 加入随机存贮器驱动器(rd).(md)设备访问内存开始于物理地址0,
而(rd)访问开始于任何基地址的内存。随机存贮器的基址与长度可以
通过map命令指定。要知详情请用“help map”命令。你甚至能够指定
(rd)驱动器的BIOS驱动器号码。比如:map --ram-drive=0xf0。默认的
(rd)驱动器的号码是0x7F,即软驱的号码。如果(rd) 是硬盘映像,你应
改变号码大于等于0x80(但应防止使用0xff,因为0xff是留给(md)设备的。)
Update 9: Directly boot NTLDR of WinNT/2K/XP and IO.SYS of Win9x/ME and
KERNEL.SYS of FreeDOS. Examples:
直接启动 WinNT/2K/XP 的 NTLDR 和 Win9x/ME 的 IO.SYS, 以及
FreeDOS 的 KERNEL.SYS. 例如:
chainloader [--edx=0xPPDD] (hd0,0)/ntldr
boot
chainloader [--edx=0xDD] (hd0,0)/io.sys
boot
chainloader [--ebx=0xDD] (hd0,0)/kernel.sys
boot
The hex DD specifies the boot drive number, and PP specifies
the boot partition number of NTLDR. If the boot drive is
floppy, PP should be the hex value ff.
DD 指定启动盘的 BIOS 号码,PP 指定 NTLDR 的启动分区号。如果
启动盘是软盘,PP 应当取十六进制值 ff。
For KERNEL.SYS of FreeDOS, the --edx won't work,
use --ebx please.
对 FreeDOS 的 KERNEL.SYS 来说,--edx 参数不起作用,请用
---ebx 来代替。
Bean has successfully decompressed and booted IO.SYS of WinME.
Thanks for the great job!
Bean 成功地解压和启动了 WinME 的 IO.SYS,感谢这个出色的工作。
--------------------------------------------------------
There is no full documentation in English at present. Here are some
examples showing the usage of disk emulation commands:
现在没有完全的英文文件。这里有一些例子显示磁盘仿真命令:
1. Emulates HD partition C: as floppy drive A: and boot win98 from C:
1. 仿真C:硬盘分区为A:软驱并且从C:引导win98:
map --read-only (hd0,0)+1 (fd0)
chainloader (hd0,0)+1
rootnoverify (hd0)
boot
In the above example, (hd0,0) is drive C: with win98 on it. After win98
boot complete, you will find that A: contains all files of C:, and if
you delete files in A:, the files in C: will also disappear.
在上述例子中,(hd0,0)是C:,安装有win98。当win98引导完毕,你将发现
A:包含C:的所有文件,并且如果你删除了A:的文件,C:的文件也同时消失。
At the map command line, the notation (hdm,n)+1 is interpreted to
represent the whole partition (hdm,n), not just the first sector of the
partition.
在map的命令行,符号 (hdm,n)+1 被解释成代表整个分区(hdm,n),不仅仅是此分区
的第一扇区。
2. Emulates HD partition C: as floppy drive A: and boot win98 from A:
2. 仿真C:硬盘分区为A:软驱并且从A:引导win98:
map --read-only (hd0,0)+1 (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1
boot
After the "map --hook" command, the emulation takes effect instantly
even in the GRUB command line.
在"map --hook"命令之后,仿真立即生效,即使是在GRUB命令行。
Note that the (fd0) in "chainloader (fd0)+1" is the emulated virtual
floppy A:, not the real floppy diskette(because map is hooked now).
注:"chainloader (fd0)+1" 的(fd0)是仿真虚拟软驱A:,不是真实的软盘
(因为map现在被钩起。)
3. Emulates an image file as floppy drive A: and boot win98 from C:
3. 仿真映像文件为A:软驱并且从C:引导win98:
map --read-only (hd0,0)/floppy.img (fd0)
chainloader (hd0,0)+1
rootnoverify (hd0)
map --floppies=1
map --harddrives=1
boot
4. Emulates an HD partition as the first hard disk and boot DOS from it:
4. 仿真一个硬盘分区为第一硬盘,并且由之引导DOS
map --read-only (hd2,6)+1 (hd0)
map --hook
chainloader (hd0,0)+1
rootnoverify (hd0)
map --harddrives=1
boot
In this example, (hd2,6)+1 represents an extended logical DOS partition
of the third BIOS hard disk (hd2).
在这个例子中,(hd2,6)+1代表了第三BIOS硬盘(hd2)的一个扩展逻辑DOS分区。
If a DOS partition is used to emulate a hard disk, GRUB for DOS will
first try to locate the partition table, usually 63 sectors ahead of
the DOS partition. GRUB for DOS will refuse the emulation if the
partition table is not there.
如果一个DOS分区被用于仿真一个硬盘,GRUB for DOS将首先试着定位分区表,
通常是在DOS分区之前的63扇区。如果分区表不在那里,GRUB for DOS将拒绝
进行仿真。
5. Emulates an image file as the first hard disk and boot DOS from it:
5. 仿真一个映像文件为第一硬盘,并且由之引导DOS:
map --read-only (hd0,0)/harddisk.img (hd0)
chainloader --load-length=512 (hd0,0)/harddisk.img
rootnoverify (hd0)
map --harddrives=1
boot
If an image file is used to emulate a hard disk, the image file must
contain an MBR. In other word, the first sector of HARDDISK.IMG must
contain the partition table of the emulated virtual hard disk.
如果一个映像文件被用于仿真硬盘,这个映像文件必须包含主引导记录。也就是说
HARDDISK.IMG的第一分区必须包含所仿真的虚拟硬盘的分区表。
--------------------------------------------------------
Floppies/harddisks of any size can be emulated with GRUB for DOS 0.2.0.
GRUB for DOS 0.2.0能够仿真任何大小的软盘/硬盘。
Image file must be contiguous, or else GRUB for DOS will refuse it.
映像文件必须是连续的,否则GRUB for DOS 会拒绝仿真。
Type "help map" at the GRUB prompt to get a brief description of the
command.
在GRUB的提示行处输入"help map",可以取得此命令的简短的描述。
The form
格式
map ... (fd?)
is a floppy emulation, and the form
是一个仿真软盘。格式
map ... (hd?)
is a hard disk emulation.
是一个仿真硬盘。
When a HARD DISK emulation is used, better not start Windows for
security reasons. Windows may even destroy all data and all information
on all your real hard disks!!!!!!!!
由于安全的原因,当使用一个仿真硬盘时,最好不好开启Windows。Windows 可能破坏
您的真实硬盘上的所有的数据和信息。
Update for --mem: when --mem is used, it seems rather safe even after
entering Windows. Win98 can operate the memdrive normally.
更新--mem参数。在使用--mem参数时,它比以前更加安全了,甚至可以进入Windows。
Win98 可以正常地操作内存盘。
Windows NT/2000/XP does not recognize the drives emulated with or
without the --mem option.
Windows NT/2000/XP 不能认出仿真盘,不管是否使用--mem 选项。
******************************************************************************
*** Explanation of the grldr-bootable floppies or harddisk partitions ***
******************************************************************************
解释grldr可引导的软盘或硬盘分区
1. Ext2 Boot Sector/Boot Record Layout (for loading grldr)
1.Ext2 引导分区/引导记录的布置(用于引导grldr)
------------------------------------------------------------------------------
A sample floppy image is ext2grldr.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 ext2grldr.img is exactly the same as the fifth sector of grldr.
一个例子软盘映像是GRUB for DOS发布内的ext2grldr.img。复制grldr 和可选的menu.lst到
映像内文件系统的根目录,这个映像就成为一个grldr可引导的软盘映像。请注意
ext2grldr.img的第一扇区与grldr第五扇区完全相同。
Offset Length Description
偏移量 长度 描述
====== ====== ==============================================================
00h 2 Machine code for short jump over the data.
近转移指令的机器代码。
02h 1 LBA indicator. Valid values are 0x02 for CHS mode, or 0x42 for
LBA mode.
逻辑块地址指示码。有效值为0x02(CHS模式),或0x42(逻辑块地址模式)
If the BIOS int13 supports LBA, this byte can be safely set to
0x42.
如果BIOS 中断13 支持逻辑块地址,此字节可以安全地设置为0x42。
Some USB BIOSes might have bugs when using CHS mode, so the
format program should set this byte to 0x42. It seems that
(generally) all USB BIOSes have LBA support.
一些USB BIOS在使用CHS 方式时可能存在臭虫,所以格式化程序应将些字节
设为0x42。看起来(通常)所有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 0x42,
otherwise, set to 0x02.
如果(分区的开始地址加上分区的总扇区)超过了CHS 的地址能力。
(特别是当它大于1024*256*63),调用程序应设置此字节为0x42,
否则,要设为0x02。
Note that Windows98 uses the value 0x0e as the LBA indicator.
注意Windows98使用0x0e作为逻辑块地址的指示码。
03h 10 OEM name string (of OS which formatted the disk).
初始设备制造厂家名称字符串(对该磁盘进行格式化的操作系统厂家)。
0Dh 1 Sectors per block. Valid values are 2, 4, 8, 16 and 32.
每块的扇区数。有效值是2, 4, 8, 16 和 32。
0Eh 2 Bytes per block. Valid values are 0x400, 0x800, 0x1000, 0x2000
and 0x4000.
每块的字节数。有效值是0x400, 0x800, 0x1000, 0x2000 和 0x4000。
10h 4 Pointers in pointers-per-block blocks, that is, number of
blocks covered by a double-indirect block.
pointers-per-block个块中所包含的指针数目,即一个二级间接指针
块所覆盖的块数。
Valid values are 0x10000, 0x40000, 0x100000, 0x400000 and
0x1000000.
有效值是0x10000, 0x40000, 0x100000, 0x400000 和 0x1000000。
14h 4 Pointers per block, that is, number of blocks covered by an
indirect block.
每块的指针,即,间接块所包括的块数。
Valid values are 0x100, 0x200, 0x400, 0x800, 0x1000.
有效值是0x100, 0x200, 0x400, 0x800, 0x1000。
18h 2 Sectors per track.
每磁道的扇区数。
1Ah 2 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 in the filesystem(or in the partition).
文件系统的总扇区数(也就是本分区的总扇区数)。
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寄存器中设置引导设备的BIOS磁盘号码。
We assume all BIOSes pass correct drive number in DL.
Buggy BIOSes are not supported!!
我们假定所有BIOS传递正确的磁盘号码到DL中。臭虫成灾的BIOS不被支持。
25h 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。
26h 2 reserved.
被保留。
28h 4 Number of inodes per group.
每组的i节点数。
Normally a 1.44M floppy has only one group, and the total
number of inodes is 184. So the value should be 184 or
greater.
通常,1.44M软盘只有一个组,并且总的i节点数是184。所以此值应为184或更大。
2Ch 4 The block number for group descriptors.
组描述符的块号码。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -