GRUB4DOS中文自述文档;Grub4dos中文ReadMe

GRUB4DOS中文自述文档

版本:0.4.4-2009-03-18
英文版作者:tinybit (tinybit@tom.com)
中文版译者:zw2312914(zw2312914@126.com)
在线文档创建者:Climbing (xclimbing@gmail.com)

Please refer to http://grub4dos.sourceforge.net/wiki/ for DOCs on GRUB4DOS.
请参考在网址 http://grub4dos.sourceforge.net/wiki/ 处的 GRUB4DOS 有关文档。


Main project page(项目主页):   
    https://gna.org/projects/grub4dos/


Download site(下载网址):       
http://download.gna.org/grub4dos/
http://grub4dos.sourceforge.net/
http://sarovar.org/projects/grub4dos/
http://grub4dos.nufans.net/ : 最新测试版发布点

http://sites.google.com/site/grubdos/ : 最新测试版发布点

http://www.cnblogs.com/linmilove/admin/ftp://grub4dos.sarovar.org/pub/grub4dos/


Get the latest source code by using anonymous svn in this way:
通过匿名 svn 服务器获取最新源代码的方法:

    svn co svn://svn.gna.org/svn/grub4dos/trunk grub4dos

or in this way:
或通过以下方法:

    svn co http://svn.gna.org/svn/grub4dos/trunk grub4dos

View the source code online with your web browser at:
通过你的 web 浏览器在线查看源代码:

    http://svn.gna.org/viewcvs/grub4dos/trunk/

GRUB4DOS mailing list:
GRUB4DOS 邮件列表:

grub4dos-devel@gna.org
grub4dos@googlegroups.com


Subscription page:
邮件列表订阅地址:

https://mail.gna.org/listinfo/grub4dos-devel/
http://groups.google.com/group/grub4dos/

Discussion forum(Official technical support site):
论坛(官方技术支持站点):

http://www.boot-land.net/forums/index.php?showforum=66(英文)
http://bbs.znpc.net/forumdisplay.php?fid=4(中文)

-------------------------------------------------------------------------------------

--------

GRUB.EXE Usage(用法):
GRUB.EXE [--bypass] [--time-out=T] [--hot-key=K] [--config-file=FILE]
                        旁路       暂停时间        热键         配置文件
       
The FILE, for example, can be (hd0,0)/menu.lst
这里的 FILE 参数,可以是 (hd0,0)/menu.lst
       
In CONFIG.SYS, the line looks like:
在 CONFIG.SYS 中,其命令行类似于:
       
    install=c:\some\where\grub.exe --config-file=FILE
       
If no options present, GRUB.EXE simply uses
如果没有使用选项,GRUB.EXE默认使用

    (hd0,0)/menu.lst
       
as the configure file, if it exists. (Notice! We finally changed the default file from

(hd0,0)/boot/grub/menu.lst to (hd0,0)/menu.lst) (Changed 2006-12-23. See Update 3

below.)
作为配置文件(只要它存在的话)。(注意!我们最终将默认的配置文件从

(hd0,0)/boot/grub/menu.lst 变更为 (hd0,0)/menu.lst,更新于2006-12-23,参见下面的更新3


       
The partition (hd0,0) can be of a Windows partition or a Linux partition, or any other

partition type supported by GRUB.
这里的分区(hd0,0)可以是一个Windows分区或者是一个linux分区,或者是被 GRUB 支持的其它任

意分区格式。

Only GRUB-style filename is acceptable here for FILE. A DOS filename won't work(it is

certain we should use GRUB-style filenames because DOS-filenames won't access a file

in a Linux ext2 partition for example).(See Update 2 below)
这里的FILE只接受GRUB风格的文件名。不能使用DOS风格的文件名(很明显,我们应该使用GRUB风

格的文件名,原因是比如在Linux ext2分区中不能使用DOS风格的文件名来访问文件,参见下面的

更新2)。               

Update: FILE can be the contents of a menu. Use semi-colon to delimitate the embedded

commands here in FILE. The FILE can be enclosed with a pair of double-quotes. For

example:
更新1:FILE 可以是菜单的内容。使用分号来分隔嵌入 FILE 中的命令。FILE 可以被一对双引号

括起来,示例:               

            GRUB --config-file="root (hd0,0);chainloader +1"

This command will boot the system in (hd0,0).
 这条命令将启动(hd0,0)上的系统。

Another example:
另一个例子:

            GRUB --config-file="reboot"

This command will reboot the machine.
这条命令将重启机器。

One more example:
再例如:

            GRUB --config-file="halt"

This command will halt the machine.
这条命令将关闭机器。

if --bypass is specified, GRUB will exit to DOS when timeout reached.
如果选项--bypass 被指定,GRUB将在暂停时间截止后退回到DOS。

The option `--time-out=T' specifies the timeout value in seconds. T defaults to 5 if

--bypass is specified and defaults to 0 if --bypass is not specified.
选项'--time-out=T' 指定了以秒计时的暂停值。如果指定了--bypass,则T的默认值为5 ,而--

bypass选项没有被指定时默认值为0 。               

The default hot key value is 0x3920(for space bar). If this key is pressed, GRUB will

boot normally. If another key is pressed, GRUB will terminate immediately and return

back to DOS. See "int 16 keyboard scan codes" below.
默认的热键值是 0x3920 (即空格键)。如果此键被按下,GRUB将正常启动。如果其他键被按下,

GRUB 将立即终止并返回到DOS。热键值参见下面的“int16 键盘扫描码”

Each option can be specified only once at most.
每个选项最多只能被指定一次。

Update 2: DOS filenames have been supported(patched by John Cobb). If the beginning

two characters of FILE are "#@", then the rest of FILE is taken as a DOS filename.

Example:
更新 2:DOS风格的文件名已经被支持(由John Cobb先生提供此补丁)。如果 FILE 的起始两个字

符是“ #@ ”,那么 FILE 中其余的部分将被视为一个DOS风格的文件名。例如:

            GRUB --config-file="#@c:\menu.lst"

Only the beginning 4KB of the DOS file will be used. The file should be an

uncompressed text file.
DOS风格的文件只有起始的4KB被使用。此文件应当是一个未被压缩的文本文件。               

Note: You may also use the `direct DOS file access' with the SHELL or INSTALL line in

CONFIG.SYS, but should not use it with the DEVICE line. The DOS document said that a

DOS device driver should not call the `open file' DOS call.
注意:你也可以在SHELL或者在CONFIG.SYS的INSTALL配置行使用“DOS文件直接访问”。但不要在

DEVICE 配置行使用它。DOS文档中描述了DOS设备驱动不能使用'打开文件'的DOS调用。

Update 3(2006-12-23): By default, GRUB.EXE will locate its config file in the

following order:
更新 3(2006-12-23): 默认情况下,GRUB.EXE将按以下顺序查找它的配置文件:

(DOS file) .\menu.lst, the MENU.LST in the current dir.
(DOS文件).\menu.lst,即当前目录下的MENU.LST。
                        
(DOS file) \menu.lst, the MENU.LST in the root dir of the current drive.
(DOS文件)\menu.lst,即当前驱动器根目录下的MENU.LST。

(GRUB file) /menu.lst, the MENU.LST in the root dir of the boot device.
(GRUB风格文件)/menu.lst, 启动设备根目录下的MENU.LST。

The default boot device is still (hd0,0).
默认的启动设备还是(hd0,0)。


--------------------------------------------------------

Update 1:    Version 0.2.0 also brings out a new thing, GRUB for NTLDR, which could be

used to boot into GRUB from the boot menu of Windows NT/2000/XP. Copy GRLDR to the

root directory of drive C: of Windows NT/2000/XP and append to C:\BOOT.INI this line:
更新 1 :版本0.2.0 同时带来一个新的东西:GRUB for NTLDR ,它能够从Windows NT/2000/XP的

启动菜单启动到GRUB。复制GRLDR到Windows NT/2000/XP的C盘根目录,并在C:\BOOT.INI中加入这

样一行:

            C:\GRLDR="Start GRUB"

That will be done. The GRLDR should be in the same directory as BOOT.INI and NTLDR.

Note that BOOT.INI is usually hidden and you must unhide it before you can see it. The

filename GRLDR shouldn't be changed. If GRLDR is in a NTFS partition, it should be

copied to the root directory of another non-NTFS partition(and likewise should the

menu.lst file be). If GRLDR is compressed, e.g., in a NTFS partition, it will not

work.
这样就完成了安装。GRLDR应该与 BOOT.INI及NTLDR 位于相同的目录。注意 BOOT.INI 通常是隐藏

的因而你要看见它必须先取消其隐藏属性。如果GRLDR在一个NTFS分区,应该将它复制到一个非

NTFS分区的根目录(并且menu.lst 文件应当同样这样做)。假如GRLDR被压缩了,比如在NTFS分区

中对它启用了压缩的情况下,它将不能正常工作。

Even if the drive letter of this disk has been changed to other than C by the Windows

device manager, it seems you still have to use the letter C here in BOOT.INI,

otherwise, NTLDR will fail to locate the GRLDR file.
即使这个磁盘盘符已经被Windows设备管理器改变为另外的不同于 C 的盘符 ,你仍然需要在

BOOT.INI 中使用盘符 C ,否则,NTLDR 将查找不到 GRLDR 文件。

And what's more, if you are booting NTLDR from a floppy, you will have to write the

GRLDR line in A:\BOOT.INI like this:
进一步,如果你从一个软盘上启动NTLDR,你也需要把A:\BOOT.INI中的 GRLDR 的所在行这样写:

            C:\GRLDR="Start GRUB"

and shouldn't use the letter A like this:
而不能象下面这样使用盘符 A :

            A:\GRLDR="Start GRUB"

(Note that in the case when BOOT.INI is on floppy A, the notation "C:\GRLDR" actually

refer to the file A:\GRLDR).
(注意:在 BOOT.INI 位于软盘 A 的这个例子中,标记“C:\GRLDR” 实际仍将访问 A:\GRLDR )


Update 2:    GRUB for Linux is also introduced along with 0.2.0. You can boot grub

using a linux loader KEXEC, LILO, SYSLINUX or another GRUB. (GRUB4LIN has merged into

GRUB.EXE)
更新2:GRUB for linux 也一起被引入到版本0.2.0。你可以使用使用linux的引导程序

KEXEC,LILO,SYSLINUX 或者别的GRUB来启动它。(GRUB4LIN 已经合并到 GRUB.EXE 中)

To boot GRUB off Linux, use this pair of commands:
从Linux中直接启动到GRUB ,使用这样一组命令:

            kexec -l grub.exe
            kexec -e

To boot GRUB via GRUB, use commands like the following:
经由GRUB启动到GRUB,使用如下的命令:

kernel (hd0,0)/grub.exe
boot

To boot GRUB via LILO, use these lines in lilo.conf:
经由LILO启动到GRUB,在lilo.conf中加入这样几行:

image=/boot/grub.exe
label=grub.exe

To boot GRUB via SYSLINUX, use these lines in syslinux.cfg:
经由syslinux启动到GRUB,在syslinux.cfg中加入这样几行:

    label grub.exe
         kernel grub.exe

LOADLIN may encounter problems when loading grub.exe, because grub.exe requires some

unchanged original BIOS interrupt vectors, but DOS has destroyed them, and loadlin

does not recover them before it transfers control to grub.exe.
LOADLIN在引导GRUB.EXE时可能会遇到问题,原因是grub.exe需要一些未更改的原始的BIOS中断向

量,但是DOS破坏了这些中断向量,而loadlin在将控制权交给grub.exe前并没有恢复它们。
               
       
Update 3: Beginning at version 0.4.0, GRUB for DOS supports memdrives. Example:
更新3:从版本0.4.0开始,DOS下的GRUB支持内存驱动器。示例:

            # boot into a floppy image
            map --mem (hd0,0)/floppy.img (fd0)
            map --hook
            chainloader (fd0)+1
            rootnoverify (fd0)
            map --floppies=1
            boot

Because the image will be copied to a memory area, the image itself can be non-

contiguous and even gzipped.
由于镜像将被拷贝到一个内存区域,所以镜像本身可以是非连续存储的,甚至可以是被gzip压缩过

的。

Another Example:
另一个例子:

            map --mem=-2880 (hd0,0)/floppy.img (fd0)

This memdrive (fd0) will occupy at least 1440 KB of memory. This is useful when the

size of a 1.44M-floppy image is less than 1440 KB.
这个内存驱动器(fd0)将占用至少1440 KB的内存。这个用法对那些小于1440 KB的1.44M 软盘镜像

很有用。

One more example:
再例如:

            map --mem --read-only (hd0,0)/hd.img (hd1)

This memdrive is a hard drive, and read-only. That means you will not be able to write

data to the memdrive (hd1).
这个内存驱动器成为了一个硬盘驱动器,并且是只读的。这表示你不能向这个(hd1)中写入数据。

You can use many memdrives and many ordinary virtual emulated disk-based drives at the

same time.
你可以同时使用多个内存驱动器和多个普通的基于磁盘虚拟的仿真驱动器。

If the BIOS does not support int15/EAX=e820h, you will not be able to use any

memdrives.
如果BIOS不支持中断int15/EAX=e820h,你将不能使用任何内存驱动器。

Update 4:    For memdrive emulation, a single-partition image can be used instead of a

whole-harddrive image. Example:
更新 4:对于内存驱动器仿真,一个单一的分区镜像可以被转换为完整的硬盘镜像来使用。例如:

            map --mem (hd0,7)/win98.img (hd0)
            map --hook
            chainloader (hd0)+1
            rootnoverify (hd0)
            map --harddrives=1
            boot

Here win98.img is a partition image without the leading MBR and partition table in it.

Surely GRUB for DOS will build an MBR and partition table for the memdrive (hd0).
这里的win98.img是一个头部不含主引导记录和分区表的分区镜像。当然,GRUB for DOS 在进行仿

真操作时会为这个内存驱动器(hd0)建立一个MBR和分区表。

Update 5:  Now GRLDR can be used as a no-emulation-mode bootable CD-ROM boot image.

Example for Linux users:
更新 5:现在GRLDR可以作为一个非模拟模式的可启动光盘的启动映像文件来使用。Linux用户使用

示例:

            mkdir iso_root
            cp grldr iso_root
            mkisofs -R -b grldr -no-emul-boot -boot-load-seg 0x1000 -o bootable.iso

iso_root

As an alternative, grldr can also be used the same way as stage2_eltorito. The -boot-

info-table option is allowed but you can omit it:
另一种选择是,grldr也可以用同样的方法作为stage2_eltorito来使用。你可以使用-boot-info-

table选项,但你可以省略它:

            mkdir iso_root
            cp grldr iso_root
            mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso iso_root

Also note that the bootable.iso above must be created with the -boot-load-seg 0xHHHH

option where HHHH is greater than or equal to 1000(hex). If HHHH < 1000(hex), QEMU

will hang. This is a bug in QEMU. The grldr.iso can be created with or without -boot-

load-seg 0xHHHH option.
需要注意的是:上面创建bootable.iso镜像时,如果使用了-boot-load-seg 0xHHHH选项,就必须

令HHHH大于或者等于1000(十六进制),如果HHHH小于1000(十六进制),虚拟机 QEMU 会死机,这是

QEMU的一个bug。grldr.iso可以使用也可以不使用-boot-load-seg 0xHHHH选项来创建。

The menu.lst file should be placed in the root dir of the CD.
menu.lst文件应该被放置在光盘的根目录。

Update 6:    The Chinese special build is in the "chinese" subdirectory.  (patched by

Gandalf, 2005-06-27)
更新 6: 中文专用版在"chinese"子目录中。( 由 Gandalf 提供此补丁,2005-06-27)

The Chinese special build also has scdrom builtin. (update: scdrom has been dropped

since 2006-07-20)               
中文专用版同时内附了scdrom 功能。(更新:scdrom 功能从2006-07-20起已被删除)

Update 7:    Added memory drive (md). Like (nd) for network drive and (cd) for CD-ROM

drive, a new drive (md) is implemented for accessing the whole memory as a disk drive.

(md) only works for systems with BIOS int15/EAX=E820h support.
更新 7: 增加了内存驱动器(md) 。就像(nd)代表网络驱动器,(cd) 代表光驱一样,新的驱动器

(md)实现了将整个内存作为一个磁盘驱动器来访问。(md)只工作在支持BIOS中断int15/EAX=E820h

的系统上。

The cat command now has a few new options: --hex for hexdump, and --locate=STRING for

string search in file.
现在,cat命令增加了两个新参数,十六进制显示参数:--hex,以及在文件中查找字符吕的参数:

--locate=STRING 。

    Typical examples:
    典型示例:

            cat --hex (hd0)+1

     It will display the MBR sector in hex form.
     这条命令用十六进制的格式显示 MBR 扇区。

            cat --hex (md)+2

     It will display 1KB of your memory(in fact, it is the real-mode IDT table), also

in hexdump form.
     这条命令将显示你内存起始地址处的1 KB内容(实际上就是实模式的IDT表),也是使用十六进

制的显示格式。               
       
            cat --hex (md)0x800+1

    It will display 1 sector of your extended memory.
    这将显示你的扩展内存的第一个扇区。
               
            cat --hex (hd0,0)+1

    It will display the first sector of partition (hd0,0). Usually this sector

contains the boot record of an operating system.
    这将显示(hd0,0)分区的第一扇区。通常这个扇区包含操作系统的引导记录。

Update 8:    Added ram drive (rd). The (md) device accesses the memory
        starting at physical address 0. But (rd) accesses memory
        starting at any base address. The base and length of the ram
        drive can be specified through the map command. "help map" for
        details. You can even specify the BIOS drive number used for
        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 0xffff,
        because 0xffff is for the (md) device).
更新 8:        增加了随机存贮驱动器 (rd) 。(md) 设备访问内存是从物理地址 0
                开始,而 (rd) 可以访问起始于任何基地址的内存。随机存贮器的基
                址与长度可以通过 map 命令指定。详情请使用 "help map" 命令。
                你甚至能够为(rd)驱动器指定一个BIOS驱动器号。比如:
                map --ram-drive=0xf0。默认的 (rd) 驱动器号是使用0x7F的软驱号。
                如果 (rd) 是硬盘驱动器镜像,你应该用大于或等于0x80的值来改变
                它的驱动器号。(但应防止使用0xffff,因为0xffff是预留给(md)设
                备的。)

        The notation (rd)+1 always represents the file which contains
        all the bytes stored in (rd).
                (rd)+1这个标志始终代表文件,它包含存储在(rd)中的所有字节。

Update 9:    Directly boot NTLDR of WinNT/2K/XP and IO.SYS of Win9x/ME and
        KERNEL.SYS of FreeDOS. Examples:
更新 9:        直接启动 WinNT/2K/XP 的 NTLDR 和 Win9x/ME 的 IO.SYS, 以及
        FreeDOS 的 KERNEL.SYS. 例如:

            chainloader --edx=0xPPYY (hd0,0)/ntldr
            boot

            chainloader --edx=0xYY (hd0,0)/io.sys
            boot

            chainloader --ebx=0xYY (hd0,0)/kernel.sys
            boot

        Hex YY specifies the boot drive number, and hex PP specifies
        the boot partition number of NTLDR. If the boot drive is
        floppy, PP should be the hex value ff, i.e., decimal 255.             
                十六进制的YY 指定了启动驱动器号,十六进制的PP指定了 NTLDR 的
                启动分区号。如果启动驱动器是软驱,PP应该是一个十六进制的值ff,
                即十进制的255.

        For KERNEL.SYS of FreeDOS, the --edx won't work,
        use --ebx please.
                对于 Freedos 的 KERNEL.SYS , 选项--edx不能执行,请使用--ebx 。

        The option --edx ( --ebx ) can be omitted if the file is in
        its normal place. But in some cases, those options are needed.
                当文件位于它们平常的位置时,选项 --edx (--ebx)可以省略。但某些
                情况下,这些选项是必需的。

        If, e.g., the ntldr file is in an ext2 partition called
        (hd2,8) while you want it to think of the Windows partition
        (hd0,7) as the boot partition, then --edx is required:
                例如,假设被调用的ntldr文件在ext2分区(hd2,8)中,而你又希望它认
                为(hd0,7)的 windows 分区是启动分区,那么--edx就是必需的:

            chainloader --edx=0x0780 (hd2,8)/ntldr

        For DOS kernels(i.e., IO.SYS and KERNEL.SYS), the boot
        partition number is meaningless, so you only need to specify
        the correct boot drive number YY(but specifying the boot
        partition number is harmless).
                对于DOS核心(即,IO.SYS和KERNEL.SYS),启动分区号是没有意义的,
                因此你只需指定恰当的启动驱动器号YY(不过指定了启动分区号也是
                无害的)。

        The above PPYY can also be specified by using a root or
        rootnoverify command after the chainloader command. Examples:
                上面的PPYY也可以在chainloader命令之后通过root和rootnoverify命
                令来指定。例如:

            chainloader (hd2,6)/kernel.sys
            rootnoverify (hd0)    <-------- YY=80
            boot

            chainloader (hd0,0)/ntldr
            rootnoverify (hd0,5)    <-------- YY=80, PP=05
            boot

        Tip: CMLDR (the ComMand LoaDeR, which is used to load the
        Windows Fault Recovery Console) can be chainloaded as well
        as NTLDR.
                提示:CMLDR (the ComMan LoaDeR,它被用于加载Windows的故障
                恢复控制台)可以像NTLDR一样被良好的加载。

        Bean has successfully decompressed and booted IO.SYS of WinME.
        Thanks for the great job!
                Bean 先生成功地解压和启动了WinME的IO.SYS,感谢这个出色的工作。

Update 10:    isolinux.bin (version 3.73) can be chainloaded as with build
        2009-02-09.
更新 10:       isolinux.bin (版本 3.73) 可以被自2009-02-09 起建立的版本加载。

            chainloader (cd)/isolinux.bin

        isolinux.bin must reside in a real or virtual cdrom.
                isolinux.bin必须是存在于在真实或虚拟的光驱之中的。

Update 11:    stage2 of Grub Legacy can be chainloaded in this way:
更新 11:       Grub 传统版的 stage2 文件可以通过下面的方法加载:

            chainloader --force --load-segment=0 --load-offset=0x8000 --boot-cs=0 --

boot-ip=0x8200 (...)/.../stage2

--------------------------------------------------------

    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:
        仿真硬盘分区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)是一个装有win98的C:盘 。当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:
        将硬盘分区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:,而不是真
        实的软盘(因为映射现在已经被挂载了)。      


3.    Emulates an image file as floppy drive A: and boot win98 from C
        仿真镜像文件为软驱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:
        仿真硬盘分区为第一硬盘并从中启动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序号为3的(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:
        仿真一个镜像文件为第一硬盘然后从中启动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.
        如果一个镜像文件被仿真为硬盘,此镜像文件必须包含MBR。也就是说,
        HARDDISK.IMG的第一扇区必须包含被仿真的虚拟硬盘的分区表。       

Note:    Counters for floppies and harddrives in the BIOS Data Area remain
    unchanged during the mapping. You should manually set them to proper
    values with `map --floppies=' and/or `map --harddrives=', especially,
    e.g., when there is no real floppy drive attached to the mother board.
    If not doing so, DOS might fail to start.
注意:  BIOS数据区中的软盘和硬盘的总数在映射期间没有被改变。当主板上没有配置真
        实的软驱时,你通常应该专门使用诸如‘map --floppioes=’以及
       ‘ map --harddrives=’来设置它们。如果不这样做,DOS可能会启动失败。

    `map --status' can report the values. Note also that `map --floppies='
    and `map --harddrives=' can be used independently without the
    appearance of mappings.
        ‘map --status’可以报告出一些有价值的东西。同时要注意‘map --floppies=’
        和‘map --harddrives=’需要在没有执行映射前单独使用。

    0.4.2 has introduced a new variable, memdisk_raw, to simulate the
    memdisk-like raw mode. If the BIOS has no int15/87h, or if it has
    buggy int15/87h support, you should set this variable before any
    memdrives are used. Here is an example:
        版本0.4.2引入了一个新参数,memdisk_raw,用以模拟和内存驱动器类似的原生模式。
        如果BIOS不支持中断int15/87h,或者int18/87h的支持有缺陷,你应该在任何内
        存盘被使用前设置这个变量。这里是一个示例:      

        map --memdisk-raw=1
        map --mem (hd0,0)/floppy.img (fd0)
        map --hook
        chainloader (fd0)+1
        rootnoverify (fd0)
        boot

    If you encountered a memdrive failure without using
    map --memdisk-raw=1, you should have a try with `map --memdisk-raw=1'.
        如果你碰到内存驱动器故障而又没有使用map --memdisk-raw=1时,你应当用
        ‘map --memdisk-raw=1’来尝试一次。      

    If you `map --memdisk-raw=0' later, you should afterwards do a
    `map --unhook'(and followed by a `map --hook' if needed).
        你一执行‘map --memdisk-raw=0’之后,就应该执行一次‘map --unhook’
        (如果需要的话在这之后再执行‘map --hook’)。

    Update: memdisk_raw now defaults to 1. You should `map --memdisk-raw=0'
    if you want to use int15/87h to access memdrives.
        更新:memdisk_raw 现在默认值为1 。如果你希望使用中断int15/87h来访问内存
        驱动器,你应当令‘map --memdisk-raw=0 ’。

--------------------------------------------------------
   
    Floppies/harddisks of any size can be emulated with GRUB for DOS 0.2.0.
   
    Image file must be contiguous, or else GRUB for DOS will refuse it.

    The `blocklist' command can list fragments or pieces of a file.

    Type "help map" at the GRUB prompt to get a brief description of the
    command.
        任意大小的软盘或硬盘可以被 GRUB for DOS 0.2.0 版仿真。
        镜像文件必须是连续的,否则GRUB for DOS 将拒绝执行。
       ‘blocklist’命令可以列举一个文件的碎片或者分块。
        在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 emulated drives no matter
    whether the --mem option is present.
        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)

------------------------------------------------------------------------------
An EXT2/EXT3 volume can be GRUB-bootable. Copy grldr and an optional menu.lst
to the root dir of the EXT2/EXT3 volume, and build the boot sector based on the
fifth sector of grldr(some fields need to be changed as detailed in the
following table). And then the EXT2/EXT3 volume is GRUB-bootable.
一个EXT2/EXT3的卷可以是GRUB可启动的。复制grldr和可选的menu.lst文件到这个EXT2/EXT3
卷的根目录,并按照grldr的第五扇区建立它的引导扇区(一些需要更改的字段在下面的表
中做了详细注释)。那么,这个EXT2/EXT3的卷就是GRUB可启动的。

Update:    bootlace.com is a DOS/Linux utility that can install the GRLDR boot
record onto the first sector of an EXT2/EXT3 volume.
更新:   bootlace.com是一个dos/linux下的工具,它可以把GRLDR的引导记录安装到一个
        EXT2/EXT3卷的第一扇区。

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.
                LBA指示码。CHS模式时,有效值是0x02;LBA模式时有效值为0x42。

        If the BIOS int13 supports LBA, this byte can be safely set to
        0x42.
                如果BIOS的int13支持LBA,此字节可以安全地设置为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都能支持LBA 。

        If the format program does not know whether the BIOS has LBA
        support, it may operate this way:
                如果格式化程序不知道BIOS是否具有LBA支持,它可以采用以下方法:

        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作为LBA指示码。              

        Update: this byte of LBA indicator is ignored. The boot
        record can probe the LBA support of BIOS.
                更新:LBA指示码这个字节已被忽略。引导记录能够探测BIOS的LAB支持。

03h    10    OEM name string (of OS which formatted the disk).
        Update: this field is now used for error message of "I/O error"
                OEM 名称字符串(对该磁盘进行格式化的操作系统的名字)。
                更新:此字段现在被用于错误提示信息“I/O error”

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中设置磁盘号码。

        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    inode size in bytes. (Notice! We use the formerly reserved
        word here for inode size!)
                字节计数的索引节点大小。(注意!我们在此处为索引节点大小使用
                了以前被保留的一个字,即两个字节)

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.
                组描述符的块号码。

        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    1    code for "cld"(0xFC).
                指令“cld”(即0xFC)。

31h    2    code for "xor ax,ax"(0x31, 0xC0).
                指令“xor ax,ax”(即0x31,0xC0)

33h    1    code for "nop"(0x90) or "cwd"(0x99)
                指令“nop”(即0x90)或“cwd”(即0x99)

34h    458    The rest of the machine code.
                机器码部分。

1FEh    2    Boot Signature AA55h.
                引导签名AA55h 。


2. FAT12/FAT16 Boot Sector/Boot Record Layout (for loading grldr)
2. FAT12/FAT16 引导扇区/引导记录的布局 (用于载入grldr)

------------------------------------------------------------------------------
A FAT12/16 volume can be GRUB-bootable. Copy grldr and an optional menu.lst to
the root dir of the FAT12/16 volume, and build the boot sector based on the
fourth sector of grldr(some fields need to be changed as detailed in the
following table). And then the FAT12/16 volume is GRUB-bootable.
一个FAT12/16的卷是GRUB可启动的。复制grldr和可选的menu.lst文件到这个FAT12/16 卷
的根目录,并按照grldr的第四扇区建立它的引导扇区(一些需要更改的字段在下面的表中
做了详细注释)。然后这个FAT12/16的卷就是GRUB可启动的。

Update:    bootlace.com is a DOS/Linux utility that can install the GRLDR boot
record onto the boot sector of an FAT12/16 volume.
更新:   bootlace.com 是一个dos/linux下的工具,而它能把GRLDR的引导记录安装到一个
        FAT12/16卷的引导扇区。

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.
                LBA指示码。CHS模式时,有效值为0x90;LBA模式时,有效值为0x0e 。

        If the BIOS int13 supports LBA, this byte can be safely set to
        0x0e.
                如果BIOS int13支持LBA,此字节可以安全地设置为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都能支持 LBA 。
               
        If the format program does not know whether the BIOS has LBA
        support, it may operate this way:
                如果格式化程序不知道BIOS是否具有LBA支持,它可以采用以下方法:

        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。

        Update: this byte of LBA indicator is ignored. The boot
        record can probe the LBA support of BIOS.
                更新:LBA 指示码这个字节已被忽略。引导记录能探测BIOS的LBA支持。

        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!
                更新 (2006-07-31):尽管GRLDR不再使用LBA指示码这个字节,
                但Windows 98会使用它。通常这个字节在 CHS 模式中应当设置为0x90
               (软盘尤其如此)。如果此字节未被正确设置,Windows 98将不能识别
                软盘或分区。这一问题由neiljoy先生报告。非常感谢!

03h    8    OEM name string (of OS which formatted the disk).
                OEM名称字符串 (对该磁盘进行格式化的操作系统的名称)

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    code for "cli".
                指令“cli”。

3Fh    1    code for "cld".
                指令“cld”。

40h    1    code 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    The rest of the 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)
3. FAT32 引导扇区/引导记录的布局 (用于载入grldr)

------------------------------------------------------------------------------
A FAT32 volume can be GRUB-bootable. Copy grldr and an optional menu.lst to
the root dir of the FAT32 volume, and build the boot sector based on the
third sector of grldr(some fields need to be changed as detailed in the
following table). And then the FAT32 volume is GRUB-bootable.
一个FAT32的卷是GRUB可启动的。复制grldr和可选的menu.lst文件到这个FAT32卷的根
目录,并按照grldr的第三扇区建立它的引导扇区(一些需要更改的字段在下面的表中
做了详细注释)。然后这个FAT32的卷就是GRUB可启动的。

Update:    bootlace.com is a DOS/Linux utility that can install the GRLDR boot
record onto the boot sector of an FAT32 volume.
更新:   bootlace.com 是一个dos及linux下的工具而它能把 GRLDR 的引导记录安装
        到一个FAT32卷的引导扇区。


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.
                LBA指示码。CHS模式时,有效值为0x90,而LBA模式时,有效值为0x0e。

        If the BIOS int13 supports LBA, this byte can be safely set to
        0x0e.
                如果BIOS的int13支持LBA,此字节可以安全地设置为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都能支持LBA 。

        If the format program does not know whether the BIOS has LBA
        support, it may operate this way:
                如果格式化程序不知道BIOS是否具有LBA支持,它可以采用以下方法:

        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。

        Update: this byte of LBA indicator is ignored. The boot
        record can probe the LBA support of BIOS.
                更新: LBA 指示码这个字节已被忽略。引导记录能探测BIO的LBA支持。

        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!
                更新 (2006-07-31):尽管GRLDR不再使用 LBA 指示码这个字节,
                但Windows 98会使用它。通常这个字节在 CHS 模式中应当设置为0x90
               (软盘尤其如此)。如果此字节未被正确设置,Windows 98 将不能识别
                软盘或分区。这一问题由neiljoy先生报告。非常感谢!

03h    8    OEM name string (of OS which formatted the disk).
                OEM名称字符串 (对该磁盘进行格式化的操作系统的名称)

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不被支持!!

41h    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 5Dh below.
                此字节在读入时被忽略。引导代码将分区号码写到此字节。
        见下述的偏移5Dh 。

42h    1    Signature (must be 28h or 29h to be recognised by NT).
                签名(必须是 28h 或者 29h 以便能被 NT 识别)

43h    4    Volume serial number.
                卷的序列号。

47h    11    Volume label.
                卷标签。

52h    8    File system ID. "FAT32   ".
                文件系统标识。“FAT32 ”。

5Ah    1    opcode for "cli".
                指令 “cli”。

5Bh    1    opcode for "cld".
                指令 “cld” 。

5Ch    1    opcode for "mov dh, imm8".
                指令 “mov dh, imm8”。

5Dh    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 。

5Eh    414    The rest of the machine code.
                机器码部分。

1FCh    4    Boot Signature AA550000h. (Win9x uses 4 bytes as magic value)
                引导签名AA550000h 。(Win9x 使用4字节作为魔数值。)


4. NTFS Boot Sector/Boot Record Layout (for loading grldr)
   NTFS 引导扇区/引导记录的布局 (用于载入grldr)

------------------------------------------------------------------------------
An NTFS volume can be GRUB-bootable. Copy grldr and an optional menu.lst to
the root dir of the NTFS volume, and build the boot sector based on the
6th-9th sectors of grldr(some fields need to be changed as detailed in the
following table). And then the NTFS volume is GRUB-bootable.
一个FAT32的卷是GRUB可启动的。复制grldr和可选的menu.lst文件到这个FAT32卷的根
目录,并按照grldr的第6至9扇区建立它的引导扇区(一些需要更改的字段在下面的表
中做了详细注释)。然后这个FAT32的卷就是GRUB可启动的。

Update:    bootlace.com is a DOS/Linux utility that can install the GRLDR boot
record onto the leading 4 sectors of an NTFS volume.
更新:   bootlace.com是一个在dos/linux下的工具,而它能把GRLDR的引导记录安装到
        一个NTFS卷的开头4个扇区。

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.
                LBA指示码。CHS模式时,有效值为0x90;LAB模式时,有效值为0x0e。

        If the BIOS int13 supports LBA, this byte can be safely set to
        0x0e.
                如果BIOS的int13支持LBA,此字节可以安全地设置为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 都能支持LBA。

        If the format program does not know whether the BIOS has LBA
        support, it may operate this way:
                如果格式化程序不知道BIOS是否具有LBA支持,它可以采用以下方法:

        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。

        Update: this byte of LBA indicator is ignored. The boot
        record can probe the LBA support of BIOS.
                更新: LBA 指示码这个字节已被忽略。引导记录能探测BIOS的LBA支持。

        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!
                更新 (2006-07-31):尽管GRLDR不再使用 LBA 指示码这个字节,但
                Windows 98会使用它。通常这个字节在 CHS 模式中应当设置为0x90
               (软盘尤其如此)。如果此字节未被正确设置,Windows 98 将不能识别
                软盘或分区。这一问题由neiljoy先生报告。非常感谢!

03h    8    OEM name string (of OS which formatted the disk).
                OEM名称字符串 (对该磁盘进行格式化的操作系统的名称)

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)Unused.
               (保留的扇区数)未被使用。

10h    1    (Number of FATs)Must be 0.
               (文件分配表数)必须为 0 。

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)Must be 0.
               (大磁盘的扇区总数)必须为 0 。

24h    4    (FAT32 sectors per FAT) - Usually 80 00 80 00, A value of
        80 00 00 00 has been seen on a USB thumb drive which is
        formatted with NTFS under Windows XP. Note this is removable
        media and is not partitioned, the drive as a whole is NTFS
        formatted.
               (每个文件分配表的 FAT32 扇区数)- 通常是 80 00 80 00 ,值
                为80 00 00 00将被看作是由Windows XP格式化为NTFS的USB拇指碟

28h    8    Number of sectors in the volume.
                此卷的扇区号。

30h    8    LCN of VCN 0 of the $MFT.
                $MFT的逻辑簇号。

38h    8    LCN of VCN 0 of the $MFTMirr.
                $MFTMirr的逻辑簇号。

40h    4    Clusters per MFT Record.
                每个MFT记录的簇数。

44h    4    Clusters per Index Record.
                每个索引的簇数。

48h    8    Volume serial number.
                卷序列号

50h    4    Checksum, usually 0.
                校验和,通常为 0 。

54h    1    opcode for "cli".
                指令 “cli”。

55h    1    opcode for "cld".
                指令 “cld”。

56h    1    opcode for "mov dh, imm8".
                指令 “mov dh, imm8”。

57h    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 。

58h    420    The rest of the machine code in the first sector.
                机器码部分。

1FCh    4    Boot Signature AA550000h. (Win9x uses 4 bytes as magic value)
                引导签名AA550000h 。(Win9x 使用4字节作为魔数值。)

200h    1536    The rest of the machine code in the last 3 sectors.
                末尾 3 个扇区为机器码部分。

------------------------------------------------------------------------------

Appendix A: File System Information Sector of FAT32(not used by grldr)
附录A:FAT32 的文件系统信息扇区(不用于引导grldr)

Offset    Length    Description
偏移    长度    说明
======    ======    ==============================================================
0h    4    Leading Signature 41615252h.
                起始处签名 41615252h 。

4h    480    Reserved, set to 0.
                被保留,设为 0 。

1E4h    4    FSI structure signature 61417272h.
                故障征兆指数结构签名 61417272h

1E8h    4    Contains the last known count of free clusters, if this is
        equal to FFFFFFFFh, then the count is unknown.
                最后已知的空闲簇数,如果它等于FFFFFFFFh,簇数是未知的。

1ECh    4    Cluster number at which you should begin a search for a free
        cluster, if this is equal to FFFFFFFFh then the field has not
        been set.
                假如它等于FFFFFFFFh的话,你应当去寻找一个空闲簇的簇号码 。
        此字段没有被设置。

1F0h    12    Reserved, set to 0.
                被保留,设为 0 。

1FCh    4    Trailing Signature AA550000h.
                结尾签名AA550000h 。

------------------------------------------------------------------------------

Appendix B: Media Descriptor Byte(not used by grldr)
附录B:媒体描述字节(非用于grldr)

The Media descriptor byte is meaningless because of the duplications, F0h for
example.
此媒体描述字节没有意义,因为有些字节具有多重意义,例如 F0h 。

Byte    Type of disk    Sectors    Heads    Tracks    Capacity
字节    磁盘种类        扇区    头      磁道    容量
----    ------------    -------    -----    ------    --------
FFh    5 1/4"        8    2    40    320KB
FEh    5 1/4"        8    1    40    160KB
FDh    5 1/4"        9    2    40    360KB
FCh    5 1/4"        9    1    40    180KB
FBh    both        9    2    80    640KB
FAh    both        9    1    80    320KB
F9h    5 1/4"        15    2    80    1200KB
F9h    3 1/2"        9    2    80    720KB
F0h    3 1/2"        18     2    80    1440KB
F0h    3 1/2"        36     2    80    2880KB
F8h    hard disk    NA    NA    NA    NA

******************************************************************************
***   grldr.mbr - How to write it to Master Boot Track of the hard disk    ***
******************************************************************************
      grldr.mbr - 怎样将grldr.mbr写到硬盘的主引导磁道

grldr.mbr contains code that can be used as Master Boot Record. The code is
responsible for searching all partitions for grldr and when found, loading it.
Currently supported partition types are: FAT12/FAT16/FAT32, NTFS, EXT2/EXT3.
Logical partitions in the extended partition are supported, provided that the
extended partition type is Microsoft-compatible. In fact, the Linux extended
partition type(0x85) is not fully tested for the search mechanism.
  grldr.mbr包含能够用作主引导记录的代码。此代码负责搜索所有分区的grldr,并且在发现
  它后装载它。现在被支持的分区种类是:FAT12/FAT16/FAT32,NTFS,EXT2/EXT3。在扩展分区
  上的逻辑分区也被支持,条件是此扩展分区与微软兼容。实际上,搜索机制没有充分地测试
  分区类型(0x85 )的Linux 的扩展分区。

How to write GRLDR.MBR to the Master Boot Track of a hard disk?
怎样将 GRLDR.MBR 写到硬盘的主引导磁道?

First, read the Windows disk signature and partition information bytes
(72 bytes in total, from offset 0x01b8 to 0x01ff of the MBR sector), and put
them on the same range from offset 0x01b8 to 0x01ff of the beginning sector of
GRLDR.MBR.
  首先,读入 Windows 磁盘签名及分区信息字节(总共72字节,从主引导记录的偏移
  0x01b8到0x01ff处),并且放置到GRLDR.MBR的开始扇区的相同范围的偏移0x01b8
  到0x01ff处。

Optionally, if the MBR in the hard disk is a single sector MBR created by
Microsoft FDISK, it may be copied onto the second sector of GRLDR.MBR.
  可以选择的是,如果硬盘上的主引导记录是由微软的FDISK产生的单一的扇区主引导记录,
  它可以被复制到GRLDR.MBR的第二扇区。

The second sector of GRLDR.MBR is called "previous MBR". When GRLDR not found,
"previous MBR" will be started.
  GRLDR.MBR的第二扇区叫作“原先的主引导记录”。当找不到GRLDR后,将从“原先的主引
  导记录”开始引导。

No other steps needed, after all necessary changes stated above have been made,
now simply write GRLDR.MBR on to the Master Boot Track. That's all.
  不需要其它的步骤,当所有的上述的必要的改变已经完成后,现在只要将GRLDR.MBR写到
  主引导磁道。这就全部完成了。

Note: The Master Boot Track means the first track of the hard drive.
注意:主引导磁道表示的是硬盘的第一条磁道。

Note: The bootstrap code of GRLDR.MBR only finds GRLDR file in the root dir of
a partition. You'd better place menu.lst file accompanying with GRLDR(i.e., in
the same root dir of the same partition as GRLDR).
注意:GRLDR.MBR 的自举代码只在分区的根目录寻找GRLDR。你最好把menu.lst文件和GRLDR
放置在一起。(就是说,放在和 GRLDR 相同分区的相同根目录下。)

The filename "grldr" in an ext2 partition must be in lower case letters, and
the file type of grldr must be plain regular. Other types, e.g., a symbolic
link, won't work.
“grldr” 文件名在ext2分区中必须是小写字母,而且grldr的文件种类必须是纯普通文件。
其它种类,例如,符号链接文件是不行的。

Update:    bootlace.com is a DOS/Linux utility for installing grldr.mbr to MBR.
The whole grldr.mbr is embedded in the body of the bootlace.com utility, so
bootlace.com can be used independently. See below.
  更新: bootlace.com 是一个在 DOS/LINUX 下的能把 grldr.mbr 安装到主引导记录
  的工具。整个grldr.mbr被嵌入到bootlace.com工具内部,因此 bootlace.com可以独
  立使用。参见后面。

******************************************************************************
***               grldr.mbr - Details about the control bytes              ***
******************************************************************************
                  grldr.mbr - 其控制字节的详述

Six bytes can be used to control the boot process of GRLDR.MBR.
有六个字节可以控制GRLDR.MBR引导过程。

Offset    Length    Description
偏移量  长度    说明

======    ======    ==============================================================
02h    1    bit0=1: disable the search for GRLDR on floppy
        bit0=0: enable the search for GRLDR on floppy
                  第 0 位=1 :允许搜索软盘上的GRLDR 。
                  第 0 位=0 :禁止搜索软盘上的GRLDR 。

        bit1=1: disable the boot of PREVIOUS MBR with invalid
            partition table(usually an OS boot sector)
        bit1=0: enable the boot of PREVIOUS MBR with invalid
            partition table(usually an OS boot sector)
                  第 1 位=1 :禁止引导分区表无效的原主引导记录
                            (通常是一个操作系统的引导扇区)
                  第 1 位=0 :允许引导分区表无效的原主引导记录
                            (通常是一个操作系统的引导扇区)

        bit2=1: disable the feature of unconditional entrance to
            the command-line(See below `--duce')
        bit2=0: enable the feature of unconditional entrance to
            the command-line(See below `--duce')
                  第 2 位 = 1 :禁止无条件进入命令行 (见下面的`--duce')
                  第 2 位 = 0 :允许无条件进入命令行(见下面的`--duce')

        bit3=1: disable geometry tune(See below `--chs-no-tune')
        bit3=0: enable geometry tune(See below `--chs-no-tune')
                  第 3 位= 1 :禁止改变磁盘几何参数(见下面的 `--chs-no-tune')
                  第 3 位= 0 :允许改变磁盘几何参数(见下面的 `--chs-no-tune')

        bit4 - bit6: reserved
                  第 4 位到第 6 位:被保留

        bit7=1: try to boot PREVIOUS MBR after the search for GRLDR
        bit7=0: try to boot PREVIOUS MBR before the search for GRLDR
                  第 7 位=1:在搜索 GRLDR 之后尝试引导原先的主引导记录
          第 7 位=0:在搜索 GRLDR 之前尝试引导原先的主引导记录

03h    1    timeout in seconds to wait for a key press. 0xff stands for
        waiting all the time(endless).
                等待键被按下时的暂停秒数。0xff代表始终暂停(即无休止的)。


04h    2    hot-key code. high byte is scan code, low byte is ASCII code.
        the default value is 0x3920, which stands for the space bar.
        if this key is pressed, GRUB will be started prior to the boot
        of previous MBR. See "int 16 keyboard scan codes" below.
                热键代码。高字节是扫描码,低字节是ASCII码。默认值是0x3920,代
                表的是空格键。如果此键被按下,GRUB将在引导原先的主引导记录之前
        启动。见“ int16 键盘扫描码”。

06h    1    preferred boot drive number, 0xff for no-drive
                优先引导的驱动器号,0xff 代表没有。

07h    1    preferred partition number, 0xff for whole drive
                优先引导的分区号,0xff 代表整个驱动器。

        if the preferred boot drive number is 0xff, the order of the
        search for GRLDR will be:
                如果优先引导的驱动器号是0xff,搜索 GRLDR 的顺序是:

            (hd0,0), (hd0,1), ..., (hd0,L),(L=max partition number)
            (hd1,0), (hd1,1), ..., (hd1,M),(M=max partition number)
            ... ... ... ... ... ... ... ...
            (hdX,0), (hdX,1), ..., (hdX,N),(N=max partition number)
                               (X=max harddrive number)
            (fd0)

        otherwise, if the preferred boot drive number is Y(not equal to
        0xff) and the preferred partition number is K, then the order of
        the search for GRLDR will be:
                否则,如果优先引导的驱动器号假定为Y (且不等于0xff),而优先引导
                的分区号为K,那么搜索 GRLDR 的顺序是:

            (Y) if K=0xff; or (Y,K) otherwise
            (hd0,0), (hd0,1), ..., (hd0,L),(L=max partition number)
            (hd1,0), (hd1,1), ..., (hd1,M),(M=max partition number)
            ... ... ... ... ... ... ... ...
            (hdX,0), (hdX,1), ..., (hdX,N),(N=max partition number)
                               (X=max harddrive number)
            (fd0)
             
        Note: if Y < 0x80, then (Y) is floppy, else (Y) is harddrive,
              and (Y,K) is partition number K on harddrive (Y).
                注意:如果Y小于0x80 ,那么这个(Y)驱动器代表软驱,否则就是硬盘驱动器。
                      而(Y,K)代表Y号硬盘驱动器上的 k 号分区。


******************************************************************************
***        bootlace.com - Install GRLDR.MBR bootstrap code to MBR          ***
******************************************************************************
           bootlace.com - 安装GRLDR.MBR自举代码到MBR

BOOTLACE.COM installs GRLDR.MBR boot record to the MBR of a harddrive or of a
harddrive image file, or to the boot sector of a floppy or a floppy image.
BOOTLACE.COM 能将GRLDR的引导记录安装到硬盘驱动器或硬盘映像文件的主引导记录中,
或者安装到软盘或者软盘映像的引导扇区。

Usage:
用法:
    bootlace.com  [OPTIONS]  DEVICE_OR_FILE
                       选项      设备或文件

OPTIONS:
选项:

    --read-only        do everything except the actual write to the
                specified DEVICE_OR_FILE.
                                对指定的设备或文件执行所有操作,但是并不不真正地写入。

    --restore-mbr        restore the previous mbr.
                                恢复原先的主引导记录。

    --mbr-no-bpb        do not copy BPB in the boot sector of the
                leading FAT partition to MBR.
                                即使最靠前的是一个FAT分区,也不复制BPB表到主引导记录。

    --no-backup-mbr        do not copy the old MBR to the second sector of
                DEVICE_OR_FILE.
                                不复制旧的主引导记录到设备或文件的第二扇区。

    --force-backup-mbr    force the copy of old MBR to the second sector
                of DEVICE_OR_FILE.
                                强行复制主引导记录到设备或文件的第二扇区。

    --mbr-enable-floppy    enable the search for GRLDR on floppy.
                                允许搜索软盘上的GRLDR 。

    --mbr-disable-floppy    disable the search for GRLDR on floppy.
                                禁止搜索软盘上的GRLDR 。

    --mbr-enable-osbr    enable the boot of PREVIOUS MBR with invalid
                partition table(usually an OS boot sector).
                                允许引导分区表无效的原先的主引导记录(通常是
                                操作系统的引导扇区)

    --mbr-disable-osbr    disable the boot of PREVIOUS MBR with invalid
                partition table(usually an OS boot sector).
                                禁止引导分区表无效的原先的主引导记录(通常是
                                操作系统的引导扇区)

    --duce            disable the feature of unconditional entrance
                            to the command-line.
                                禁止无条件进入命令行功能。

                Normally one can unconditionally get the
                command-line console by a keypress of `C',
                bypassing all config-files(including the
                preset-menu). This is a security hole. So we
                need this option to disable the feature.

                                任何人按‘C’键都可以正常取得命令行控制台,绕
                                过了所有的配置文件。(包括预置的配置文件)。
                                这是一种安全漏洞。所以我们需要这一选项来禁止这
                                种情况。

                DUCE is for Disable Unconditional Command-line
                Entrance.
                                DUCE 即 Disable Unconditional Command-line Entrance
                                的缩写,意为无条件的(或不受控的)命令行入口。

    --chs-no-tune        disable the feature of geometry tune.
                                禁止磁盘几何参数修正功能。

    --boot-prevmbr-first    try to boot PREVIOUS MBR before the search for
                GRLDR.
                                在搜索GRLDR之前,先尝试引导原先的主引导记录。

    --boot-prevmbr-last    try to boot PREVIOUS MBR after the search for
                GRLDR.
                                在搜索GRLDR之后,再尝试引导原先的主引导记录。

    --preferred-drive=D    preferred boot drive number, 0 <= D < 255.
                                优先引导的驱动器号,驱动器号D应大于0而小于255 。

    --preferred-partition=P    preferred partition number, 0 <= P < 255.
                                优先引导的分区号,分区号P应大于0 而小于255 。

    --serial-number=SN    setup a new serial number for the hard drive.
                SN must be non-zero.
                                为硬盘驱动器设置一个新的序列号码。SN必须是非零的数。

    --time-out=T        wait T seconds before booting PREVIOUS MBR. if
                T is 0xff, wait forever. The default is 5.
                                在引导原先的主引导记录前等待 T 秒钟。如果T是0xff,
                则始终等待。默认值是 5 。
   
    --hot-key=K        if the desired key K is pressed, start GRUB
                before booting PREVIOUS MBR. K is a word
                value, just as the value in AX register
                returned from int16/AH=1. The high byte is the
                scan code and the low byte is ASCII code. The
                default is 0x3920 for space bar. See "int 16
                keyboard scan codes" below.
                                如果热键被按下,在引导原先的主引导记录之前启动
                                GRUB 。K 是一个双字节的值,如同 int16/AH=1 返回
                                到AX寄存器的值一样。高字节是扫描码,低字节是ASCII
                                码。默认值是 0x3920,即空格键。参见“int16键盘扫描码”。
                               
    --floppy        if DEVICE_OR_FILE is floppy, use this option.
                                如果设备或文件是软盘,使用这一选项。

    --floppy=N        if DEVICE_OR_FILE is a partition on a hard
                drive, use this option. N is used to specify
                the partition number: 0,1,2 and 3 for the
                primary partitions, and 4,5,6,... for the
                logical partitions.
                                如果设备或文件是一个硬盘驱动器上的分区,使用此选项。
                                N用于指定分区号码:0 ,1,2 和 3 为主分区,而 4,5,
                                6,...等等为逻辑分区。

    --sectors-per-track=S    specifies sectors per track for --floppy.
                1 <= S <= 63, default is 63.
                                为--floppy 选项指定每磁道扇区数。S 应大于1且小于63,
                默认值是63 。

    --heads=H        specifies number of heads for --floppy.
                1 <= H <= 256, default is 255.
                                为--floppy选项指定磁头数,H应大于1且小于256 。默认值是

255 。

    --start-sector=B    specifies hidden sectors for --floppy=N.
                                为--floppy=N 选项指定隐藏扇区。

    --total-sectors=C    specifies total sectors for --floppy.
                default is 0.
                                为--floppy 选项指定总扇区数。默认值是 0 。

    --lba            use lba mode for --floppy. If the floppy BIOS
                has LBA support, you can specify --lba here.
                It is assumed that all floppy BIOSes have CHS
                support. So you would rather specify --chs.
                If neither --chs nor --lba is specified, then
                the LBA indicator(i.e., the third byte of the
                boot sector) will not be touched.
                                对--floppy 选项使用 lba 模式。如果软盘BIOS支持LBA,
                                你可以在这里指定--lba选项。理论上所有的软盘BIOS 都
                                支持CHS。因此你指定--chs选项更适当。如果--chs和--lba
                                选项都未被指定,那么LBA指示码(即引导扇区的第三字节)
                                将不被修改。

    --chs            use chs mode for --floppy. You should specify
                --chs if the floppy BIOS does not support LBA.
                We assume all floppy BIOSes have CHS support.
                So it is likely you want to specify --chs.
                If neither --chs nor --lba is specified, then
                the LBA indicator(i.e., the third byte of the
                boot sector) will not be touched.
                                为--floppy选项使用chs模式。如果软盘BIOS不支持
                                LBA,你应当指定--chs选项。我们假定所有的软盘BIOS
                                都能支持CHS。所以你需要指定--chs 选项更为恰当。
                                如果既不指定--chs选项又不指定--lba选项,那么LBA
                                指示码(即,引导扇区的第三字节)将不被改变。

    --fat12            FAT12 is allowed to be installed for --floppy.
                                --floppy选项使用时,确认安装到FAT12系统。
                               

    --fat16            FAT16 is allowed to be installed for --floppy.
                                --floppy选项使用时,确认安装到FAT16系统。

    --fat32            FAT32 is allowed to be installed for --floppy.
                                --floppy选项使用时,确认安装到FAT32系统。

    --vfat            FAT12/16/32 are allowed to be installed for
                --floppy.
                                --floppy选项使用时,确认安装到FAT12/16/32等系统。

    --ntfs            NTFS is allowed to be installed for --floppy.
                                --floppy选项使用时,确认安装到NTFS系统。

    --ext2            EXT2 is allowed to be installed for --floppy.
                                --floppy选项使用时,确认安装到EXT2系统。

    --install-partition=I    Install the boot record onto the boot area of
                partition number I of the specified hard drive
                or harddrive image DEVICE_OR_FILE.
                                将引导记录安装到指定的硬盘驱动器或硬盘映像(设备或文件


                                的第 I 号分区的引导区中。

DEVICE_OR_FILE:    Filename of the device or the image file. For DOS, a BIOS drive
number(hex 0xHH or decimal DDD) can be used to access the drive. BIOS drive
number 0 is for the first floppy, 1 is for the second floppy; 0x80 is for the
first hard drive, 0x81 is for the second hard drive, etc.
DEVICE_OR_FILE: 设备或者映像文件的文件名。对于DOS,BIOS驱动器号(两位的十六进制
或三位的十进制数)可以被用来访问驱动器。BIOS驱动器号0表示第一软盘,1表示第二硬盘;
0x80 表示第一硬盘驱动器,0x81表示第二硬盘驱动器,等等。

Note: BOOTLACE.COM writes only the boot code to MBR. The boot code needs to
load GRLDR as the second(and last) stage of the GRUB boot process. Therefore
GRLDR should be copied to the root directory of one of the supported
partitions, either before or after a successful execution of BOOTLACE.COM.
Currently only partitions with filesystem type of FAT12, FAT16, FAT32, NTFS,
EXT2 or EXT3 are supported.
注意:BOOTLACE.COM 仅仅是把引导代码写到MBR中。引导代码需要加载GRLDR作为GRUB启动
过程的第二(最后)阶段。因而在BOOTLACE.COM成功执行前或者是执行后,GRLDR应当被复
制到任一受支持分区的根目录下,当前受支持分区的文件系统类型仅有FAT12,FAT16,FAT32,
NTFS,EXT2以及EXT3 。

Note 2: If DEVICE_OR_FILE is a harddisk device or a harddisk image file, it
must contain a valid partition table, otherwise, BOOTLACE.COM will fail. If
DEVICE_OR_FILE is a floppy device or a floppy image file, then it must contain
a supported filesystem(i.e., either of FAT12/FAT16/FAT32/NTFS/EXT2/EXT3).
注意 2:如果DEVICE_OR_FILE是硬盘设备或是硬盘映像文件,它必须包含有效的分区表,
否则,BOOTLACE.COM 将安装失败。如果设备或文件是指向软驱或者软盘映像文件,那么
他必须包含一个受支持的文件系统(FAT12/FAT16/FAT32/NTFS/EXT2/EXT3 等之一)。

Note 3: If DEVICE_OR_FILE is a floppy device or a floppy image file, and it
was formated EXT2/EXT3, then you should specify --sectors-per-track and
--heads explicitly.
注意 3:如果DEVICE_OR_FILE是软驱或软盘映像文件,而它又被格式化为EXT2或EXT3,
那么你必须明确指定--sectors-per-track 和 --heads 选项。


Important!! If you install GRLDR Boot Record to a floppy or a partition, the
floppy or partition will boot solely grldr, and your original
IO.SYS(DOS/Win9x/Me) and NTLDR(WinNT/2K/XP) will become unbootable. This is
because the original boot record of the floppy or partition was overwritten.
There is no such problem when installing GRLDR Boot Record onto the MBR.
Update: Some NTLDR/IO.SYS/KERNEL.SYS files can be directly chainloaded in the
latest GRUB4DOS.
重要!! 如果你安装grldr的引导代码到一个软盘或者一个分区,此软盘或分区将只能从
grldr引导 ,而你原本的IO.SYS(DOS/Win9x/Me)和NTLDR(WinNT/2K/XP)将变为不能
引导。这是由于软盘或分区的原始引导记录被覆盖了。而把GRLDR的引导记录安装到MBR
则没有这个问题。
更新:在最新版本的GRUB4DOS中NTLDR,IO.SYS或KERNEL.SYS等文件,可以被直接加载。

Tip: If the filename begins in a dash(-) or a digit, you may prefix a dirname
(./) or (.\) to it.
提示:如果文件名的开始是短划线(-)或数字,你可以在它前面加上目录名(./) 或 (.\)。

Examples:
示例:

    Installing GRLDR boot code to MBR under Linux:
        在Linux下安装GRLDR的引导代码到MBR:

        bootlace.com  /dev/hda

    Installing GRLDR boot code to MBR under DOS:
        在DOS下安装GRLDR的引导代码到MBR:

        bootlace.com  0x80

    Installing GRLDR boot code to a harddisk image under DOS or Linux:
        在DOS或Linux下安装GRLDR的引导代码到硬盘映像:

        bootlace.com  hd.img

    Installing GRLDR boot code to floppy under Linux:
        在Linux下安装GRLDR的引导代码到软盘:

        bootlace.com  --floppy --chs /dev/fd0

    Installing GRLDR boot code to floppy under DOS:
        在DOS下安装GRLDR的引导代码到软盘:

        bootlace.com  --floppy --chs 0x00

    Installing GRLDR boot code to a floppy image under DOS or Linux:
        在DOS或Linux下安装GRLDR的引导代码到软盘映像:

        bootlace.com  --floppy --chs floppy.img

BOOTLACE.COM cannot function well under Windows NT/2000/XP/2003. It is expected
(and designed) to run under DOS/Win9x and Linux. Update: For image FILES,
bootlace.com function well under Windows NT/2000/XP/2003. For devices,
bootlace.com will not work under Windows NT/2000/XP/2003 because bootlace.com
is a DOS utility and Windows NT/2000/XP/2003 does not allow bootlace.com to
access devices.
BOOTLACE.COM 在Windows NT/2000/XP/2003下不能很好的运行。它被希望(和设计)用于
DOS/Win9x和Linux中。更新:对于映像文件,在Windows NT/2000/XP/2003下,
bootlace.com 运行得非常好。bootlace.com不能在 Windows NT/2000/XP/2003
中运行的原因是,bootlace.com是一个DOS工具而 Windows NT/2000/XP/2003
不认可它对设备的访问。


******************************************************************************
***        kexec-tools should be patched for the 1.101 release             ***
******************************************************************************
           kexec-tools 应当打上1.101发布的补丁

The file kexec-tools-1.101-patch is a patch to the kexec-tools-1.101 release.
Kexec might fail to load grub.exe without this patch.
kexec-tools-1.101-patch 是为kexec-tools-1.101发布的补丁。没有这个补丁Kexec 加载
grub.exe 会失败。

The home page of kexec-tools is:
kexec-tools 的主页是:

    http://www.xmission.com/~ebiederm/files/kexec/

Note: The Linux kernel should be KEXEC enabled before kexec can be run.
注意: 在使用 kexec 前应该使 Linux 核心支持 KEXEC 系统调用。

            !! Important Update !!
                           重要更新

The patch `kexec-tools-1.101-patch' is not needed now and has been deleted.
Even worse, it fails in `kexec -l grub.exe --initrd=imgfile'. So please
do not use it any more.
现在不再需要`kexec-tools-1.101-patch'补丁而且它已经被删除了。很糟糕的是,执行
`kexec -l grub.exe --initrd=imgfile'竟会失败。所以请不要再使用它。

******************************************************************************
***           Direct transition to DOS/Win9x from within Linux             ***
******************************************************************************
              从Linux直接转换到DOS/Win9x

By using kexec, we can easily boot into DOS/Win9x from a running Linux system.
使用kexec,我们能够轻易地从运行中的 Linux 系统启动到 DOS/Win9x 。

If WIN98.IMG is a bootable hard-disk image, do as follows:
假如 WIN98.IMG 是一个可引导的硬盘映像,按照如下操作:

kexec -l grub.exe --initrd=WIN98.IMG --command-line="--config-file=map (rd) (hd0); map

--hook; chainloader (hd0)+1; rootnoverify (hd0)"

kexec -e

If DOS.IMG is a bootable floppy image, do this way:
如果DOS.IMG是一个可引导的软盘映像,按照以下方法:

kexec -l grub.exe --initrd=DOS.IMG --command-line="--config-file=map (rd) (fd0); map

--hook; chainloader (fd0)+1; rootnoverify (fd0)"

kexec -e

Note that in this manner, we can boot DOS/Win9x without using a real DOS/Win9x
disk. We need no FAT partition but an image file.
注意,按照这种方式,我们可以不用使用真实的 DOS/Win9x 磁盘就启动到 DOS/Win9x 。
我们不需要FAT分区而只需要一个映像文件。

We have noticed that Linux itself can act as a big boot manager by using kexec
and grub.exe. This may be convenient to developers who write installation or
bootstrap or initialization programs.
我们已经注意到通过使用 kexec 和 grub.exe,Linux本身就能够成为一个大的引导管理器。
这给安装程序或者引导程序或者初始化程序的开发者带来了方便。

Certainly, grub.exe and the bootable disk image can also be loaded by a running
GRUB or LILO or syslinux. Examples:
当然,grub.exe和可引导的磁盘映像也能够被运行中的GRUB 或LILO 或syslinux 加载。例如:

1. Loaded by GRUB:
   通过 GRUB 加载:

    kernel (hd0,0)/grub.exe --config-file="map (rd) (fd0); map --hook; chainloader

(fd0)+1; rootnoverify (fd0)"
    initrd (hd0,0)/DOS.IMG
    boot

2. Loaded by LILO:
   通过 LILO 加载:

    image=/boot/grub.exe
        label=grub.exe
        initrd=/boot/DOS.IMG
        append="--config-file=map (rd) (fd0); map --hook; chainloader (fd0)+1;

rootnoverify (fd0)"

3. Loaded by SYSLINUX:
   通过 SYSLINUX 加载:

    label grub.exe
        kernel grub.exe
        append initrd=DOS.IMG --config-file="map (rd) (fd0); map --hook; chainloader

(fd0)+1; rootnoverify (fd0)"

Note: If the above `map (rd) (...)' failed, you may use `map (rd)+1 (...)'
instead and try again.
注意:如果使用上面的‘map (rd) (...)’失败,你可以使用‘map (rd)+1 (...)’代替,
然后再试一次。

******************************************************************************
***               Keyboard BIOS Scan Code/ASCII code tables                ***
******************************************************************************
                  键盘 BIOS 扫描码和 ASCII 码表

Keyboard bios scan code and ascii character code tables can be obtained from
the web by, for example, googling for "3920 372A 4A2D 4E2B 352F". Here are 2
main results:
键盘 bios 扫描码和 ASCII 字符码表能够通过 web 网获取,例如,使用 google 查找
"3920 372A 4A2D 4E2B 352F"。这里有两项主要的结果:

1. From "http://heim.ifi.uio.no/~stanisls/helppc/scan_codes.html":
   转自“http://heim.ifi.uio.no/~stanisls/helppc/scan_codes.html”:

INT 16 - Keyboard Scan Codes
INT 16 - 键盘扫描码

       Key     Normal    Shifted   w/Ctrl    w/Alt
       键位      常态      上档态    控制态    变更态

    A      1E61        1E41      1E01    1E00
    B      3062        3042      3002    3000
    C      2E63        2E43      2E03    2E00
    D      2064        2044      2004    2000
    E      1265        1245      1205    1200
    F      2166        2146      2106    2100
    G      2267        2247      2207    2200
    H      2368        2348      2308    2300
    I      1769        1749      1709    1700
    J      246A        244A      240A    2400
    K      256B        254B      250B    2500
    L      266C        264C      260C    2600
    M      326D        324D      320D    3200
    N      316E        314E      310E    3100
    O      186F        184F      180F    1800
    P      1970        1950      1910    1900
    Q      1071        1051      1011    1000
    R      1372        1352      1312    1300
    S      1F73        1F53      1F13    1F00
    T      1474        1454      1414    1400
    U      1675        1655      1615    1600
    V      2F76        2F56      2F16    2F00
    W      1177        1157      1117    1100
    X      2D78        2D58      2D18    2D00
    Y      1579        1559      1519    1500
    Z      2C7A        2C5A      2C1A    2C00

       Key     Normal    Shifted   w/Ctrl    w/Alt
       键位      常态      上档态    控制态    变更态

    1      0231        0221        7800
    2      0332        0340      0300    7900
    3      0433        0423        7A00
    4      0534        0524        7B00
    5      0635        0625        7C00
    6      0736        075E      071E    7D00
    7      0837        0826        7E00
    8      0938        092A        7F00
    9      0A39        0A28        8000
    0      0B30        0B29        8100

       Key     Normal    Shifted   w/Ctrl    w/Alt
       键位      常态      上档态    控制态    变更态

    -      0C2D        0C5F      0C1F    8200
    =      0D3D        0D2B        8300
    [      1A5B        1A7B      1A1B    1A00
    ]      1B5D        1B7D      1B1D    1B00
    ;      273B        273A        2700
    '      2827        2822
    `      2960        297E
    \      2B5C        2B7C      2B1C    2600 (same as Alt L)
    ,      332C        333C
    .      342E        343E
    /      352F        353F

    Key     Normal    Shifted   w/Ctrl    w/Alt
       键位      常态      上档态    控制态    变更态

    F1      3B00        5400      5E00    6800
    F2      3C00        5500      5F00    6900
    F3      3D00        5600      6000    6A00
    F4      3E00        5700      6100    6B00
    F5      3F00        5800      6200    6C00
    F6      4000        5900      6300    6D00
    F7      4100        5A00      6400    6E00
    F8      4200        5B00      6500    6F00
    F9      4300        5C00      6600    7000
    F10      4400        5D00      6700    7100
    F11      8500        8700      8900    8B00
    F12      8600        8800      8A00    8C00

    Key        Normal    Shifted    w/Ctrl      w/Alt
        键位        常态      上档态    控制态    变更态

    BackSpace    0E08      0E08     0E7F      0E00
    Del         5300      532E     9300      A300
    Down Arrow   5000      5032     9100      A000
    End         4F00      4F31     7500      9F00
    Enter         1C0D      1C0D     1C0A      A600
    Esc         011B      011B     011B      0100
    Home         4700      4737     7700      9700
    Ins         5200      5230     9200      A200
    Keypad 5        4C35     8F00
    Keypad *     372A         9600      3700
    Keypad -     4A2D      4A2D     8E00      4A00
    Keypad +     4E2B      4E2B          4E00
    Keypad /     352F      352F     9500      A400
    Left Arrow   4B00      4B34     7300      9B00
    PgDn         5100      5133     7600      A100
    PgUp         4900      4939     8400      9900
    PrtSc                 7200
    Right Arrow  4D00      4D36     7400      9D00
    SpaceBar     3920      3920     3920      3920
    Tab         0F09      0F00     9400      A500
    Up Arrow     4800      4838     8D00      9800


- Some key combinations are not available on all systems.  The PS/2
  includes many that aren't available on the PC, XT and AT.
  一些组合键不是在所有系统中都能获取。PS/2 包括了很多不能在PC, XT和
  AT上获取的组合键。

- To retrieve the character from a scan code logical AND the word
  with 0x00FF.
  由扫描码检索出字符可以用 0x00FF 和该字符进行逻辑与。

- see  INT 16  MAKE CODES
  参见INT16 通码

 

2. From "http://www.hoppie.nl/ivan/keycodes.txt":
   转自“http://www.hoppie.nl/ivan/keycodes.txt”:


     Keystroke                  Keypress code
--------------------------------------------------
     Esc                        011B
     1                          0231
     2                          0332
     3                          0433
     4                          0534
     5                          0635
     6                          0736
     7                          0837
     8                          0938
     9                          0A39
     0                          0B30
     -                          0C2D
     =                          0D3D
     Backspace                  0E08
     Tab                        0F09
     q                          1071
     w                          1177
     e                          1265
     r                          1372
     t                          1474
     y                          1579
     u                          1675
     i                          1769
     o                          186F
     p                          1970
     [                          1A5B
     ]                          1B5D
     Enter                      1C0D
     Ctrl                         **
     a                          1E61
     s                          1F73
     d                          2064
     f                          2166
     g                          2267
     h                          2368
     j                          246A
     k                          256B
     l                          266C
     ;                          273B
     '                          2827
     `                          2960
     Shift                        **
     \                          2B5C
     z                          2C7A
     x                          2D78
     c                          2E63
     v                          2F76
     b                          3062
     n                          316E
     m                          326D
     ,                          332C
     .                          342E
     /                          352F
     Gray *                     372A
     Alt                          **
     Space                      3920
     Caps Lock                    **
     F1                         3B00
     F2                         3C00
     F3                         3D00
     F4                         3E00
     F5                         3F00
     F6                         4000
     F7                         4100
     F8                         4200
     F9                         4300
     F10                        4400
     F11                        8500
     F12                        8600
     Num Lock                     **
     Scroll Lock                  **
     White Home                 4700
     White Up Arrow             4800
     White PgUp                 4900
     Gray -                     4A2D
     White Left Arrow           4B00
     Center Key                 4C00
     White Right Arrow          4D00
     Gray +                     4E2B
     White End                  4F00
     White Down Arrow           5000
     White PgDn                 5100
     White Ins                  5200
     White Del                  5300
     SysReq                       **
     Key 45 [1]                 565C
     Enter (number keypad)      1C0D
     Gray /                     352F
     PrtSc                        **
     Pause                        **
     Gray Home                  4700
     Gray Up Arrow              4800
     Gray Page Up               4900
     Gray Left Arrow            4B00
     Gray Right Arrow           4D00
     Gray End                   4F00
     Gray Down Arrow            5000
     Gray Page Down             5100
     Gray Insert                5200
     Gray Delete                5300

     Shift Esc                  011B
     !                          0221
     @                          0340
     #                          0423
     $                          0524
     %                          0625
     ^                          075E
     &                          0826
     * (white)                  092A
     (                          0A28
     )                          0B29
     _                          0C5F
     + (white)                  0D2B
     Shift Backspace            0E08
     Shift Tab (Backtab)        0F00
     Q                          1051
     W                          1157
     E                          1245
     R                          1352
     T                          1454
     Y                          1559
     U                          1655
     I                          1749
     O                          184F
     P                          1950
     {                          1A7B
     }                          1B7D
     Shift Enter                1C0D
     Shift Ctrl                   **
     A                          1E41
     S                          1F53
     D                          2044
     F                          2146
     G                          2247
     H                          2348
     J                          244A
     K                          254B
     L                          264C
     :                          273A
     "                          2822
     ~                          297E
     |                          2B7C
     Z                          2C5A
     X                          2D58
     C                          2E43
     V                          2F56
     B                          3042
     N                          314E
     M                          324D
     <                          333C
     >                          343E
     ?                          353F
     Shift Gray *               372A
     Shift Alt                    **
     Shift Space                3920
     Shift Caps Lock              **
     Shift F1                   5400
     Shift F2                   5500
     Shift F3                   5600
     Shift F4                   5700
     Shift F5                   5800
     Shift F6                   5900
     Shift F7                   5A00
     Shift F8                   5B00
     Shift F9                   5C00
     Shift F10                  5D00
     Shift F11                  8700
     Shift F12                  8800
     Shift Num Lock               **
     Shift Scroll Lock            **
     Shift 7 (number pad)       4737
     Shift 8 (number pad)       4838
     Shift 9 (number pad)       4939
     Shift Gray -               4A2D
     Shift 4 (number pad)       4B34
     Shift 5 (number pad)       4C35
     Shift 6 (number pad)       4D36
     Shift Gray +               4E2B
     Shift 1 (number pad)       4F31
     Shift 2 (number pad)       5032
     Shift 3 (number pad)       5133
     Shift 0 (number pad)       5230
     Shift . (number pad)       532E
     Shift SysReq                 **
     Shift Key 45 [1]           567C
     Shift Enter (number pad)   1C0D
     Shift Gray /               352F
     Shift PrtSc                  **
     Shift Pause                  **
     Shift Gray Home            4700
     Shift Gray Up Arrow        4800
     Shift Gray Page Up         4900
     Shift Gray Left Arrow      4B00
     Shift Gray Right Arrow     4D00
     Shift Gray End             4F00
     Shift Gray Down Arrow      5000
     Shift Gray Page Down       5100
     Shift Gray Insert          5200
     Shift Gray Delete          5300

     Ctrl Esc                   011B
     Ctrl 1                       --
     Ctrl 2 (NUL)               0300
     Ctrl 3                       --
     Ctrl 4                       --
     Ctrl 5                       --
     Ctrl 6 (RS)                071E
     Ctrl 7                       --
     Ctrl 8                       --
     Ctrl 9                       --
     Ctrl 0                       --
     Ctrl -                     0C1F
     Ctrl =                       --
     Ctrl Backspace (DEL)       0E7F
     Ctrl Tab                   9400
     Ctrl q (DC1)               1011
     Ctrl w (ETB)               1117
     Ctrl e (ENQ)               1205
     Ctrl r (DC2)               1312
     Ctrl t (DC4)               1414
     Ctrl y (EM)                1519
     Ctrl u (NAK)               1615
     Ctrl i (HT)                1709
     Ctrl o (SI)                180F
     Ctrl p (DEL)               1910
     Ctrl [ (ESC)               1A1B
     Ctrl ] (GS)                1B1D
     Ctrl Enter (LF)            1C0A
     Ctrl a (SOH)               1E01
     Ctrl s (DC3)               1F13
     Ctrl d (EOT)               2004
     Ctrl f (ACK)               2106
     Ctrl g (BEL)               2207
     Ctrl h (Backspace)         2308
     Ctrl j (LF)                240A
     Ctrl k (VT)                250B
     Ctrl l (FF)                260C
     Ctrl ;                       --
     Ctrl '                       --
     Ctrl `                       --
     Ctrl Shift                   **
     Ctrl \ (FS)                2B1C
     Ctrl z (SUB)               2C1A
     Ctrl x (CAN)               2D18
     Ctrl c (ETX)               2E03
     Ctrl v (SYN)               2F16
     Ctrl b (STX)               3002
     Ctrl n (SO)                310E
     Ctrl m (CR)                320D
     Ctrl ,                       --
     Ctrl .                       --
     Ctrl /                       --
     Ctrl Gray *                9600
     Ctrl Alt                     **
     Ctrl Space                 3920
     Ctrl Caps Lock               --
     Ctrl F1                    5E00
     Ctrl F2                    5F00
     Ctrl F3                    6000
     Ctrl F4                    6100
     Ctrl F5                    6200
     Ctrl F6                    6300
     Ctrl F7                    6400
     Ctrl F8                    6500
     Ctrl F9                    6600
     Ctrl F10                   6700
     Ctrl F11                   8900
     Ctrl F12                   8A00
     Ctrl Num Lock                --
     Ctrl Scroll Lock             --
     Ctrl White Home            7700
     Ctrl White Up Arrow        8D00
     Ctrl White PgUp            8400
     Ctrl Gray -                8E00
     Ctrl White Left Arrow      7300
     Ctrl 5 (number pad)        8F00
     Ctrl White Right Arrow     7400
     Ctrl Gray +                9000
     Ctrl White End             7500
     Ctrl White Down Arrow      9100
     Ctrl White PgDn            7600
     Ctrl White Ins             9200
     Ctrl White Del             9300
     Ctrl SysReq                  **
     Ctrl Key 45 [1]            -- 
     Ctrl Enter (number pad)    1C0A
     Ctrl / (number pad)        9500
     Ctrl PrtSc                 7200
     Ctrl Break                 0000
     Ctrl Gray Home             7700
     Ctrl Gray Up Arrow         8DE0
     Ctrl Gray Page Up          8400
     Ctrl Gray Left Arrow       7300
     Ctrl Gray Right Arrow      7400
     Ctrl Gray End              7500
     Ctrl Gray Down Arrow       91E0
     Ctrl Gray Page Down        7600
     Ctrl Gray Insert           92E0
     Ctrl Gray Delete           93E0

     Alt Esc                    0100
     Alt 1                      7800
     Alt 2                      7900
     Alt 3                      7A00
     Alt 4                      7B00
     Alt 5                      7C00
     Alt 6                      7D00
     Alt 7                      7E00
     Alt 8                      7F00
     Alt 9                      8000
     Alt 0                      8100
     Alt -                      8200
     Alt =                      8300
     Alt Backspace              0E00
     Alt Tab                    A500
     Alt q                      1000
     Alt w                      1100
     Alt e                      1200
     Alt r                      1300
     Alt t                      1400
     Alt y                      1500
     Alt u                      1600
     Alt i                      1700
     Alt o                      1800
     Alt p                      1900
     Alt [                      1A00
     Alt ]                      1B00
     Alt Enter                  1C00
     Alt Ctrl                     **
     Alt a                      1E00
     Alt s                      1F00
     Alt d                      2000
     Alt f                      2100
     Alt g                      2200
     Alt h                      2300
     Alt j                      2400
     Alt k                      2500
     Alt l                      2600
     Alt ;                      2700
     Alt '                      2800
     Alt `                      2900
     Alt Shift                    **
     Alt \                      2B00
     Alt z                      2C00
     Alt x                      2D00
     Alt c                      2E00
     Alt v                      2F00
     Alt b                      3000
     Alt n                      3100
     Alt m                      3200
     Alt ,                      3300
     Alt .                      3400
     Alt /                      3500
     Alt Gray *                 3700
     Alt Space                  3920
     Alt Caps Lock                **
     Alt F1                     6800
     Alt F2                     6900
     Alt F3                     6A00
     Alt F4                     6B00
     Alt F5                     6C00
     Alt F6                     6D00
     Alt F7                     6E00
     Alt F8                     6F00
     Alt F9                     7000
     Alt F10                    7100
     Alt F11                    8B00
     Alt F12                    8C00
     Alt Num Lock                 **
     Alt Scroll Lock              **
     Alt Gray -                 4A00
     Alt Gray +                 4E00
     Alt 7 (number pad)           #
     Alt 8 (number pad)           #
     Alt 9 (number pad)           #
     Alt 4 (number pad)           #
     Alt 5 (number pad)           #
     Alt 6 (number pad)           #
     Alt 1 (number pad)           #
     Alt 2 (number pad)           #
     Alt 3 (number pad)           #
     Alt Del                      --
     Alt SysReq                   **
     Alt Key 45 [1]               --
     Alt Enter (number pad)     A600
     Alt / (number pad)         A400
     Alt PrtSc                    **
     Alt Pause                    **
     Alt Gray Home              9700
     Alt Gray Up Arrow          9800
     Alt Gray Page Up           9900
     Alt Gray Left Arrow        9B00
     Alt Gray Right Arrow       9D00
     Alt Gray End               9F00
     Alt Gray Down Arrow        A000
     Alt Gray Page Down         A100
     Alt Gray Insert            A200
     Alt Gray Delete            A300

  -------------------------------------------------------------------------

Footnotes
脚注
        [1]   In the United States, the 101/102-key keyboard is shipped
              with 101 keys. Overseas versions have an additional key
              sandwiched between the left Shift key and the Z key. This
              additional key is identified by IBM (and in this table) as
              "Key 45."
              在美国,101/102键键盘有101 个键。海外版本有一个附加的键,夹在
          左上档键和Z 键之间。此附加键是由IBM 确定的(在本表中是 45 键)。            

 

        [**]  Keys and key combinations marked ** are used by the ROM BIOS
              but do not put values into the keyboard buffer.
              键及键组合若有 ** 标记,则被ROM BIOS所使用,但不会将键值放入键盘
          缓冲区。

        [--]  Keys and key combinations marked -- are ignored by the ROM
              BIOS.
              键及键组合若有 -- 标记,则被ROM BIOS所忽略。

 

3. From "http://heim.ifi.uio.no/~stanisls/helppc/make_codes.html":
   转自“http://heim.ifi.uio.no/~stanisls/helppc/make_codes.html”:

INT 9 - Hardware Keyboard Make/Break Codes
INT 9 - 硬件键盘的通/断码

    Key         Make  Break        Key    Make  Break
        键位         通码  断码                 键位   通码  断码

    Backspace     0E    8E            F1    3B    BB
    Caps Lock     3A    BA            F2    3C    BC
    Enter          1C    9C            F3    3D    BD
    Esc          01    81            F4    3E    BE
    Left Alt      38    B8            F7    41    C1
    Left Ctrl     1D    9D            F5    3F    BF
    Left Shift    2A    AA            F6    40    C0
    Num Lock      45    C5            F8    42    C2
    Right Shift   36    B6            F9    43    C3
    Scroll Lock   46    C6            F10    44    C4
    Space          39    B9            F11    57    D7
    Sys Req (AT)  54    D4            F12    58    D8
    Tab          0F    8F

            Keypad Keys               Make   Break
                    数字小键盘键位             通码   断码

            Keypad 0  (Ins)        52    D2
            Keypad 1  (End)         4F    CF
            Keypad 2  (Down arrow)    50    D0
            Keypad 3  (PgDn)        51    D1
            Keypad 4  (Left arrow)    4B    CB
            Keypad 5            4C    CC
            Keypad 6  (Right arrow)    4D    CD
            Keypad 7  (Home)        47    C7
            Keypad 8  (Up arrow)    48    C8
            Keypad 9  (PgUp)        49    C9
            Keypad .  (Del)         53    D3
            Keypad *  (PrtSc)        37    B7
            Keypad -            4A    CA
            Keypad +            4E    CE

           Key    Make  Break           Key    Make  Break
               键位   通码  断码               键位   通码  断码

        A      1E    9E         N      31    B1
        B      30    B0         O      18    98
        C      2E    AE         P      19    99
        D      20    A0         Q      10    90
        E      12    92         R      13    93
        F      21    A1         S      1F    9F
        G      22    A2         T      14    94
        H      23    A3         U      16    96
        I      17    97         V      2F    AF
        J      24    A4         W      11    91
        K      25    A5         X      2D    AD
        L      26    A6         Y      15    95
        M      32    B2         Z      2C    AC

           Key    Make  Break           Key    Make  Break
               键位   通码  断码               键位   通码  断码

        1      02    82         -      0C    8C
        2      03    83         =      0D    8D
        3      04    84         [      1A    9A
        4      05    85         ]      1B    9B
        5      06    86         ;      27    A7
        6      07    87         '      28    A8
        7      08    88         `      29    A9
        8      09    89         \      2B    AB
        9      0A    8A         ,      33    B3
        0      0B    8B         .      34    B4
                        /      35    B5


Enhanced Keyboard Keys (101/102 keys)
键盘扩展键 (101/102 键)

    Control Keys          Make          Break
        控制键                    通码            断码

    Alt-PrtSc (SysReq)      54          D4
    Ctrl-PrtSc          E0 37       E0 B7
    Enter              E0 1C       E0 9C
    PrtSc              E0 2A E0 37      E0 B7 E0 AA
    Right Alt          E0 38       E0 B8
    Right Ctrl          E0 1D       E0 9D
    Shift-PrtSc          E0 37       E0 B7
    /              E0 35       E0 B5
    Pause              E1 1D 45 E1 9D C5  (not typematic)
    Ctrl-Pause (Ctrl-Break)   E0 46 E0 C6         (not typematic)

    - Keys marked as "not typematic" generate one stream of bytes
      without corresponding break scan code bytes (actually the
      break codes are part of the make code).
          键位是以未使用断码扫描码字节信息的“非机器自动连续打印的"所
          生成的一种扫描码字节流来标记的。(实际上断码是通码的一部分)
          (译注:typematic 有人翻译为‘机打’)


            Normal Mode or
            Shift w/Numlock
                        常态或上档态及
                        数字键盘锁定态模式

    Key         Make     Break       |----- Numlock on ------.
                                                  数字键盘锁定
                          Make        Break
        键位         通码    断码          通码           断码

    Del         E0 53     E0 D3       E0 2A E0 53     E0 D3 E0 AA
    Down arrow     E0 50     E0 D0       E0 2A E0 50     E0 D0 E0 AA
    End         E0 4F     E0 CF       E0 2A E0 4F     E0 CF E0 AA
    Home         E0 47     E0 C7       E0 2A E0 47     E0 C7 E0 AA
    Ins         E0 52     E0 D2       E0 2A E0 52     E0 D2 E0 AA
    Left arrow     E0 4B     E0 CB       E0 2A E0 4B     E0 CB E0 AA
    PgDn         E0 51     E0 D1       E0 2A E0 51     E0 D1 E0 AA
    PgUp         E0 49     E0 C9       E0 2A E0 49     E0 C9 E0 AA
    Right arrow     E0 4D     E0 CD       E0 2A E0 4D     E0 CD E0 AA
    Up arrow     E0 48     E0 C8       E0 2A E0 48     E0 C8 E0 AA

    Key          |--Left Shift Pressed--.      |--Right Shift Pressed--.
        键位             左上档键按下时              右上档键按下时

             Make           Break          Make        Break
                         通码          断码           通码          断码

    Del          E0 AA E0 53   E0 D3 E0 2A    E0 B6 E0 53     E0 D3 E0 36
    Down arrow    E0 AA E0 50   E0 D0 E0 2A    E0 B6 E0 50     E0 D0 E0 36
    End          E0 AA E0 4F   E0 CF E0 2A    E0 B6 E0 4F     E0 CF E0 36
    Home          E0 AA E0 47   E0 C7 E0 2A    E0 B6 E0 47     E0 C7 E0 36
    Ins          E0 AA E0 52   E0 D2 E0 2A    E0 B6 E0 52     E0 D2 E0 36
    Left arrow    E0 AA E0 4B   E0 CB E0 2A    E0 B6 E0 4B     E0 CB E0 36
    PgDn          E0 AA E0 51   E0 D1 E0 2A    E0 B6 E0 51     E0 D1 E0 36
    PgUp          E0 AA E0 49   E0 C9 E0 2A    E0 B6 E0 49     E0 C9 E0 36
    Right arrow   E0 AA E0 4D   E0 CD E0 2A    E0 B6 E0 4D     E0 CD E0 36
    Up arrow      E0 AA E0 48   E0 C8 E0 2A    E0 B6 E0 48     E0 C8 E0 36
    /          E0 AA E0 35   E0 B5 E0 2A    E0 B6 E0 35     E0 B5 E0 36


    - The PS/2 models have three make/break scan code sets.  The first
      set matches the PC & XT make/break scan code set and is the one
      listed here.    Scan code sets are selected by writing the value F0
      to the keyboard via the 8042 (port 60h).  The following is a brief
      description of the scan code sets (see the PS/2 Technical Reference
      manuals for more information on scan code sets 2 and 3):
          PS/2 类型有三套通断扫描码。其中第一套是适用于PC & XT 的通断码扫描码集,
          并列在了这里。扫描码集可以通过向8042 键盘控制器(端口60)写入值 F0 来
          选择。下面是扫描码集的简要介绍(更多第2,3套扫描码集的信息见PS/2 技术
          参考手册)

    /  set 1, each key has a base scan code.  Some keys generate
       extra scan codes to generate artificial shift states.  This
       is similar to the standard scan code set used on the PC and XT.
           第一套扫描码集,每个键具有一个基本的扫描码。一些键产生扩展扫
           描码以便人工生成上档状态。它与 PC 和 XT 机上的标准扫描码相似。

    /  set 2, each key sends one make scan code and two break scan
       codes bytes (F0 followed by the make code).    This scan code
       set is available on the IBM AT also.
           第二套扫描码集,每个键发送一个通码扫描码和两个断码扫描码字节
          (通码在F0之后)。这套扫描码集在 IBM AT 机上也有效。

    /  set 3, each key sends one make scan code and two break scan
       codes bytes (F0 followed by the make code) and no keys are
       altered by Shift/Alt/Ctrl keys.
           第三套扫描码集,每个键发送一个通码扫描码和两个断码扫描码字节
          (通码在F0之后)并且键位不随 Shift/Alt/Ctrl 等键的使用而改变。

    /  typematic scan codes are the same as the make scan code
           “非机器自动连续打印的”扫描码和通码扫描码是相同的。

    - Some Tandy 1000's do not handle Alt key combinations when multiple
      shift keys are pressed.  The Alt-Shift-H combination loses the Alt.
          一些 Tandy 1000 机器在多重组合键的 shift 键被按下时不能处理 ALT 键。
          使用键组合 Alt-Shift-H 时会丢失 ALT 键。

    - extended keys like (F11, F12) can only be read with systems that
      have extended keyboard BIOS support (or INT 9 extensions);  to
      read these special keys on these systems INT 16,10 must be used
          扩展键比如(F11,F12)等只能在具有 BIOS 键盘扩展支持(或 INT 9 扩展)
          的系统上被读取。用INT16读取这些系统上的特别的键时,必须使用10号功能 。


******************************************************************************
***                         GRLDR  Error messages                          ***
******************************************************************************
                            GRLDR  错误提示信息

1. Missing MBR-helper.
   缺少主引导辅助记录。

    The helper function in the sectors that immediately follow the MBR is
    not present, or it has been erased by a virus or by Windows XP/Vista.
        紧接在主引导记录后的辅助功能程序不见了,或者是它已经被病毒或 Windows
        XP/Vista等删除了。

    Run the bootlace.com utility to fix the problem.
        运行 bootlace.com 工具来解决这个问题。
       

2. Buggy BIOS!
   缺陷太多的BIOS!

    Your BIOS is too buggy. It even has no support for INT13/AH=8.
        你的 BIOS 太糟糕了。它甚至不能支持 INT 13/AH=8 。

    No solution except flashing your BIOS. Buggy BIOSes will encounter
    more and more problems with grub4dos in the future.
        除了升级你的 BIOS 没有办法解决。未来,缺陷多的 BIOS 将会很常见而且
        会对 grub4dos 造成很多问题。

3. This partition is NTFS but with unknown boot record. Please install
Microsoft NTFS boot sectors to this partition correctly, or create an
FAT12/16/32 partition and place the same copy of GRLDR and MENU.LST there.
此分区系统是 NTFS 但包含未知的引导记录。请安装正确的微软 NTFS 引导扇区到
这个分区,或者建立一个FAT12/16/32的分区并将GRLDR 及MENU.LST 的相同的备份
文件放到那里。

    The boot record was changed or erased by Microsoft Windows XP Service
    Pack 2.
        引导记录已经被微软 Windows XP Service Pack 2 改变或删除。

    You may install the old boot record introduced with the    original clean
    Windows 2K/XP. As another solution, you may create an FAT partition
    for your system, and copy GRLDR and your MENU.LST to its root dir.
        你可以用原来的引导记录来安装,以清理掉Windows 2K/XP的记录。另一个解决办
        法是,你可以在系统上建立一个FAT分区,并且将GRLDR 和你的MENU.LST复制到它
        的根目录。

    While the startup code of grldr might fail to load GRLDR in NTFS
    partitions, it always successfully loads GRLDR in FAT partitions(and
    even in ext2/ext3 partitions).
        在NTFS分区grldr的自举代码在加载GRLDR时可能会失败,但在FAT分区(甚至在
        ext2/ext3分区)它总能成功加载 GRLDR 。

    Note that NTLDR only loads the startup code of grldr(i.e., the leading
    16 sectors of grldr), not the whole grldr file.
        注意 NTLDR只能加载grldr的自举代码(即,grldr开头的16个扇区),而不能将
        整个grldr载入。
 

    Thus, C:\GRLDR must exist(here C: can be NTFS), since it is used for
    BOOT.INI and NTLDR. If C: is NTFS, X:\GRLDR should exist as well,
    where X: stands for a certain FAT partition.
        因此,自从它用于 BOOT.INT 和 NTLDR 以来 ,C 盘根目录下必须存在有GRLDR
       (这里的C盘可以是 NTFS 文件系统)。

 

******************************************************************************
***                             Known BIOS bugs                            ***
******************************************************************************
                                已知的BIOS 缺陷

1. Some newer Dell machines have no int13/AH=43h support. You may encounter
    failure when trying to write-access an emulated disk.
   一些较新的 Dell 机不能支持int13/AH=43h 。当你尝试对仿真磁盘进行写访问时,
   可能会遭遇失败。

    Note: This bug is serious! The old "root+setup" installation method
    (in real mode grub environment) uses INT13 to write the first sector
    of stage2. It will fail for the buggy DELL machine when stage2 is
    accessed with LBA mode.
        注意:这个缺陷非常严重!老的安装方法"root+setup" (在实模式的grub环
        境中)使用INT13将stage2文件写入第一扇区。在这些有缺陷的DELL机上通过
        LBA 模式来访问 stage2 文件时将会失败。

2. Some buggy BIOSes won't boot bootable.iso(See above).(qemu can boot it fine)
   一些有缺陷的BIOS不能引导启动光盘映像文件(见前面)。(虚拟机qemu 能良好的引导)

3. Some newer Dell machines violently destroyed the interrupt vectors for
    hardware IRQs and will hang the machine when running GRUB.EXE
    from DOS. You may try again with BADGRUB.EXE.
   在DOS下运行GRUB.EXE时,一些较新的 Dell 机激烈地破坏那些硬件中断请求的中断向量,
   而使得机器会失去响应 。你可以尝试用BADGRUB.EXE来再试一次。

4. Reports say some BIOSes will function abnormally after GRUB.EXE is started
    by kexec of Linux. Some machines reportedly hang. Some others
    reportedly cannot access USB drives.
   有报告称,通过Linux中的kexec启动GRUB.EXE后,一些BIOS将功能异常。报告称一些
   机器会死机,而另一些不能访问USB驱动器。
  


******************************************************************************
***                             Known Problems                             ***
******************************************************************************
                                 已知问题
1.    Running GRUB.EXE from a DOS box of Windows 9x/Me could hang the
    machine, especially for some systems with USB support. You may
    encounter the same problem when running GRUB.EXE through KEXEC under
    Linux.
        在 Windows 9x/Me的DOS窗口运行GRUB.EXE时可能会死机,特别是在这些系统
        使用USB的时候。在Linux下通过KEXEC运行GRUB.EXE时,你也可能碰到同样的
        问题。

Note:    You don't have to run GRUB.EXE from protected mode of Win9x, which
    could hang the machine; Instead, you usually want to run GRUB.EXE
    after you have done a "Restart the computer in MS-DOS mode", which
    is safe enough.
注意:  你不能在已进入保护模式的Win 9x 中运行GRUB.EXE,那可能会死机;作为变
        通,你可以执行“重启并进入MS-DOS模式”选项来达到运行 GRUB.EXE 的目
        的,这将足够安全。

2.    The default chainloader action will keep A20 on. Some buggy DOS XMS
    memory managers could hang the machine. You may use the --disable-a20
    option in the chainloader line and try again. Anyway, you should avoid
    using those buggy memory managers.
        链式加载的默认动作是保持 A20 的状态。一些有缺陷的 DOS 扩展内存管理软
        件可能会令机器死掉。你可以在chainloader命令行中使用--disable-a20选项
        然后再试一次。至少,你应当避免使用那些有缺陷的内存管理软件。

3.    THTF BIOS L4S5M Ver 1.1a(dated 2002-1-10) has a buggy int15 which
    causes hang at the boot of a multi boot kernel(memdisk for example).
        OEM签名为清华同方,主板为精英L4S5M, BIOS版本1.1a(日期 2002-1-10)
        的机器上,其 int15 含有缺陷,当它启动一个多重引导核心时,会失去响应。
       (比如使用syslinux的memdisk时)

4.    A Chinese DOS system software, the TechWay SCS, will not work with
    newer versions of GRUB.EXE. In general, TSRs that take antitracking
    measures will not work with GRUB.EXE any more.
        在一个中文 DOS 系统软件,天汇标准中文系统中,较新的GRUB.EXE不能运行。
        总之,在具有反跟踪措施的内存驻留程序的系统下GRUB.EXE不再运行。


******************************************************************************
***        List of binary files and their corresponding source files       ***
******************************************************************************
           二进制文件及对应的源代码文件列表

binary file    main source file    other included source or binary files
二进制文件      源代码主文件            包含的其他源代码或二进制文件
-------------   ----------------    -------------------------------------

bootlace.com    bootlacestart.S        bootlace.inc, grldrstart.S

grldr        grldrstart.S        pre_stage2(binary, See note below)

grldr.mbr    mbrstart.S        grldrstart.S

grub.exe    dosstart.S        pre_stage2(binary, See note below)

hmload.com    hmloadstart.S

-----------------------------------------------------------------------------

Note: pre_stage2 is the main body of GNU GRUB and it is simply appended to
grldrstart/dosstart in binary format to form our grldr/grub.exe.
注意:pre_stage2 是GNU GRUB的主体程序,它以二进制格式被简单的添加到grldrstart
      及dosstart部分,形成我们的grldr和grub.exe 。

Note: The GRUB file(WITHOUT .EXE suffix) is a static-linked ELF executable
program for Linux, normally called the GRUB Shell. The GRUB Shell is a boot-
manager, but not a boot-loader(the "boot" command won't work in GRUB Shell).
GRUB.EXE(with KEXEC) can be used as a bootloader running directly under Linux.
注意:GRUB (无.exe后缀)在Linux下是一个静态链接的 ELF 格式的可执行文件,它
可以被GRUB Shell正常调用。GRUB Shell 是一个启动管理软件,但并不是一个引导装
载器(boot 命令在GRUB Shell里不能执行)。GRUB.EXE (通过KEXEC)能作为一个引
导装载器直接在 Linux 下使用。

******************************************************************************
***             Memory Layout for Quiting to DOS from GRUB.EXE             ***
******************************************************************************
                GRUB.EXE 返回 DOS 时的内存布局

The quit command is implemented to return to DOS in the instance that GRUB.EXE
is started off DOS.
使用 quit 命令实现返回到DOS,是在GRUB.EXE是从DOS启动的情况下。

1. Before GRUB.EXE transfers control to pre_stage2, it will copy 640KB of
conventional memory to physical address 0x200000(i.e., 2MB), and write 4 long
integers immediately follows the backup copy of the conventional memory:
在GRUB.EXE 将控制权移交给 pre_stage2 之前,它将复制 640 kb的常规内存到
  物理地址0x200000 (即,2 M)处,并将立即写入4 字节的长整数到常规内存备
  份区之后:

    At 0x2A0000:    0x50554B42, it is the "BKUP" signature.
                        0x50554b42, 它是“BKUP”的签名 。

    At 0x2A0004:    Gate A20 status under DOS: non-zero means A20 on;
            zero means A20 off. Update: A20 always on, see below.
                        DOS下的A20地址线门状态:非零表示A20开启;零表示A20
                        地址线关闭。更新:A20 始终开启,参见后面。

    At 0x2A0008:    high word is boot-CS, low word is boot-IP. The quit
            command uses this entry point to return to DOS.
                        高字节是引导的代码段段地址,低字节是引导的指令指针值。
                        退出命令 quit 使用这个入口点返回DOS。

    At 0x2A000C:    CheckSum: the sum of all long integers in the memory
            range from 0x200000 to 0x2A000F is 0.
                        校验和:内存范围从0x200000 到 0x2A000F的所有长整数的
                        和为 0 。

2. If the above memory structure is corrupted by a grub command, the quit
command will issue an error message and refuse to exit from grub.
   如果上述内存结构被某个grub命令所破坏,quit命令将发出一条错误提示信息而
   拒绝从grub中退出。

3. Because GRUB may corrupt extended memory, you should better avoid using
extended memory under DOS before running GRUB.EXE.
   由于GRUB可能破坏扩展内存,在DOS下你最好避免在GRUB.EXE运行前使用扩展内存。
  
4. Gate A20 will be enabled by GRUB.EXE. Hopefully this would hurt nothing.
   GRUB.EXE将开启A20 地址线。真希望这不会危及任何东西。


******************************************************************************
***             Memory usage in conventional/low memory area               ***
******************************************************************************
                常规内存/低端内存空间的内存使用

1. boot.c, fsys_reiserfs.c: 8K below 0x68000.

2. fsys_ext2fs.c, fsys_minix.c: 1K below 0x68000.

3. fsys_jfs.c: 4K + 256 bytes below 0x68000.

4. fsys_reiserfs.c: 202 bytes at 0x600.

5. fsys_xfs.c: 188 bytes at 0x600.

6. fsys_xfs.c: (logical block size) bytes below 0x68000.

7. geometry tune: 0x50000 - 0x5ffff.

******************************************************************************
***                Command-line Length about GRUB.EXE                      ***
******************************************************************************
                   关于GRUB.EXE的命令行长度

GRUB.EXE now can be started in CONFIG.SYS with the **DEVICE** command:
GRUB.EXE 可以通过CONFIG.SYS中的DEVICE命令来启动:

    DEVICE=grub.exe [--config-file="FILENAME_OR_COMMANDS"]

1. If GRUB.EXE is invoked with DEVICE command and FILENAME_OR_COMMANDS is a
collection of some GRUB commands separated by semi-colon, then the length of
FILENAME_OR_COMMANDS can be nearly 4KB ----Supprise? But true!  MS-DOS 7+
even allows a much longer line, but 4KB seems enough for our use of GRUB.EXE.
This is very useful when we want to embed a big menu into the command line.
Note that GRLDR hasn't yet supported any command-line arguments.
   如果GRUB.EXE是被DEVICE命令调用而且FILENAME_OR_COMMANDS 参数是一个由分号分
   隔的grub命令集合,那么FILENAME_OR_COMMANDS可以接近4 KB长 ----很吃惊?但这是
   事实!MS-DOS 7及以上版本即使允许更长的行,但看起来4 KB对GRUB.EXE足够了。
   当我们希望将一个大菜单嵌入到命令行时,这是非常有用的。注意 grldr 还不支持
   任何命令行参数。

2. If GRUB.EXE is invoked with INSTALL command, the option length has a limit
of 80 characters(including the leading "--config-file=" part). An overflow may
hang up MS-DOS immediately.
   如果GRUB.EXE是被INSTALL命令调用,那么选项长度的限制是80个字符(包括开头的
   --config-file= 这部分)。超出的话可能会立即将MS-DOS挂起。

3. If GRUB.EXE is invoked with SHELL command, the option length has a limit of
126 characters(including the leading "--config-file=" part). Overflow won't
hang up MS-DOS, but the line will be cut short. This limit is the same as that
in the console-DOS-prompt or in a BAT file.
   如果GRUB.EXE是被SHELL命令调用,那么选项长度的的限制是126个字符(包括开头的
   --config-file= 这部分)。超出的话虽然不会将 MS-DOS 挂起,但命令行将被截短。
   这和 DOS 控制台或批处理文件中命令的限制是一样的。

4. The DOS editor EDIT does not allow to create a line of 4KB long. So use
another editor, for example, vi for Linux, please.
   DOS编辑器EDIT不允许建立一个4 KB长的行。所以请使用其他编辑器,例如,vi for Linux 。

5. The DEVICE=GRUB.EXE line can be used together with other DEVICE commands
such as DEVICE=HIMEM.SYS and DEVICE=EMM386.EXE. The GRUB.EXE line should
occur before the EMM386.EXE line in order to avoid the rejection by EMM386.
Update: Since 0.4.2, GRUB.EXE works well even after EMM386.EXE is loaded.
   DEVICE=GRUB.EXE 这一行可以和其他的DEVICE命令同时使用,如DEVICE=HIMEM.SYS
   及DEVICE=EMM386.EXE等。配置命令里的GRUB.EXE所在行必须出现在EMM386.EXE所在
   行的前面,以避免因EMM386而冲突。
   更新 :从0.4.2版本起,GRUB.EXE在EMM386.EXE加载后,运行得仍很好。

6. In any case mentioned above, you can return back to DOS by quit command.
   在以上提到的任何情况下,你都可以通过quit命令返回到DOS 。
  

7. Memory usage about command-line menu: The 4KB command-line menu starts at
physical address 0x0800 and ends at 0x17FF.
   命令行菜单的内存使用:4 KB长的命令行菜单起始于物理地址0x0800而终止于0x17ff。

******************************************************************************
***          New Syntax for the DEFAULT/SAVEDEFAULT Commands               ***
******************************************************************************
             DEFAULT 及 SAVEDEFAULT 命令的新语法

In addition to the original usage of "default NUM" and "default saved", now
there is a new usage of "default FILE", like this:
相对于原来的用法"default NUM"及"default saved "增加的部分,现在有一个新用
法"default FILE",象这样:

        default (hd0,0)/default

Note that FILE must have a valid DEFAULT file format. A sample DEFAULT file
is included in the release. You may copy it to wherever you like, but you
should avoid modifying its content manually. The DEFAULT file may be used
in this way:
注意参数FILE必须是一个有效的DEFAULT文件格式。一个简单的DEFAULT文件就包含
在发行版中。你可以复制它到你希望的地方,但是你应该避免手工修改它的容量。
DEFAULT文件可以按以下方法使用:

(1) First, you should copy a default file with valid format to somewhere in
your operating system.
    首先,你要复制一个格式有效的default文件到你运行的系统上。

(2) Secondly, you should use the "default FILE" command of GRUB to announce
the use of FILE as our new default file for being written by "savedefault".
    其次,你要使用GRUB中的"default FILE"命令来表明是使用这个FILE作为我们新
    的预设文件,以便"savedefault"命令执行时写入它。


(3) Then, you may use "savedefault" command to save the desired entry number
into this new default file.
    然后,你可以使用"savedefault"命令来把想要的入口数字保存到这个新的预设文
    件中。

(4) OK, at next boot, you may read the saved entry number by using the same
"default FILE" command as mentioned in above (2).
    好了,下次启动时,你可以通过使用类似上面第二步骤中的"default FILE"一样的
    命令来读取已保存的入口数字。

And the SAVEDEFAULT command now accept an options `--wait=T', like this:
同时,SAVEDEFAULT 命令增加了一个选项 --wait=T ,象这样:

        savedefault --wait=5

If `--wait=T' is specified and T is non-zero, savedefault will prompt
the user with a message just before it writes to disk. The write operation
will be cancelled in T seconds if the `Y' key was not pressed.
如果`--wait=T' 选项被指定而且 T 非零,savedefault 命令将在它就要写入磁盘
前,给使用者一个提示信息。

Here is a sample menu.lst file:
这里是一个简单的menu.lst文件:

#--------------------begin menu.lst---------------------------------------
color black/cyan yellow/cyan
timeout 30
default /default

title find and load NTLDR of Windows NT/2K/XP
find --set-root /ntldr
chainloader /ntldr
savedefault --wait=2

title find and load CMLDR, the Recovery Console of Windows NT/2K/XP
fallback 2
find --set-root /cmldr
chainloader /cmldr
#####################################################################
# write string "cmdcons" to memory 0000:7C03 in 2 steps:
#####################################################################
# step 1. Write 4 chars "cmdc" at 0000:7C03
write 0x7C03 0x63646D63
# step 2. Write 3 chars "ons" and an ending null at 0000:7C07
write 0x7C07 0x00736E6F
savedefault --wait=2

title find and load IO.SYS of Windows 9x/Me
find --set-root /io.sys
chainloader /io.sys
savedefault --wait=2

title floppy (fd0)
chainloader (fd0)+1
rootnoverify (fd0)
savedefault --wait=2

title find and boot Linux with menu.lst already installed
find --set-root /sbin/init
savedefault --wait=2
configfile /boot/grub/menu.lst

title find and boot Mandriva with menu.lst already installed
find --set-root /etc/mandriva-release
savedefault --wait=2
configfile /boot/grub/menu.lst

title back to dos
savedefault --wait=2
quit

title commandline
savedefault --wait=2
commandline

title reboot
savedefault --wait=2
reboot

title halt
savedefault --wait=2
halt
#--------------------end menu.lst---------------------------------------

Note 1:    The file DEFAULT must exist and have a proper format as stated above.
    Or else, the default/savedefault commands won't function well.
注意 1:预设文件 DEFAULT 必须是存在的而且具有和前面所述一样严格的格式。

Note 2:    The file DEFAULT which is in the same dir as a certain MENU.LST file
    is called associated with the MENU.LST file.
注意 2:在一个确信有 MENU.LST 文件的相同目录中的 DEFAULT 文件将和 MENU.LST 文
        件一起被联合调用

Note 3:    The associated DEFAULT file will take effect automatically if there
    are no `default' commands present.
注意 3:即使没有出现`default'命令,被关联的 DEFAULT 文件也将自动生效。

Note 4:    Just before a menu file gains control(e.g., it is the associated
    MENU.LST of a GRLDR file, or it was specified via
    `grub.exe --config-file=(DEVICE)/PATH/YOUR_MENU_FILE', or it was
    specified by the `configfile' command of grub), its associated
    DEFAULT file will be used if present, until an explicit `default'
    command is encountered.
注意 4:就在菜单文件(诸如,GRLDR 的关联文件MENU.LST,或是通过
        `grub.exe --config-file=(DEVICE)/PATH/YOUR_MENU_FILE'来指定的,
        或是通过grub的`configfile'命令来指定的)取得控制权之前,它的
        关联文件DEFAULT只要出现就会被使用,直到遇见了一个明确的`default'命令。

******************************************************************************
***                   The New `cdrom' Command Syntax                       ***
******************************************************************************
                      新的 `cdrom' 命令的语法

1. Initialize the ATAPI CDROM devices:
   初始化ATAPI接口的CDROM设备:

    grub> cdrom --init

   This will display the number of atapi cdroms found: atapi_dev_count
   这会显示被找到的atapi接口的cdrom光驱的数目:参数为 atapi_dev_count

2. Stop the ATAPI CDROM devices:
   停止ATAPI接口的CDROM设备:

    grub> cdrom --stop

   This will set atapi_dev_count to 0.
   这会设置参数atapi_dev_count为0 。

3. Add IO ports for searching the atapi cdrom devices. For example:
   增加搜索atapi cdrom设备的IO端口。例如:

    grub> cdrom --add-io-ports=0x03F601F0

After running `cdrom --init' and `map --hook', the cdroms can be accessed
through devices (cd0), (cd1), ...
   在执行`cdrom --init'以及`map --hook'命令后,cdrom光驱可以通过(cd0),
   (cd1), ...等设备号来访问。

Note 1: If the system does not fully support the ATAPI CD-ROM specifications,
    you will encounter failure when trying to access the (cdX) devices.
注意 1:如果系统不完全支持ATAPI CD-ROM 规范,在你试图访问这些(cdX)设备时将
        遭遇失败。

Note 2: After doing a `cdrom --stop', you should do a `map --unhook'. Of
    course you may `map --hook' again if there are mapped drives.
注意 2:在执行一条`cdrom --stop'命令后,你应当使用一条`map --unhook'命令。当然,
        你可以再次使用`map --hook'命令,假如还有驱动器被映射着的话。

Note 3: After adding IO ports, you should do a `map --unhook' followed by a
    `cdrom --init' and then followed by a `map --hook'.
注意 3:在增加IO端口之后,你应当接着`cdrom --init'执行一条`map --unhook'命令然
        后再接着执行一条`map --hook'命令。

    By default, these ports are used for searching cdroms(so they needn't
    be added):
        作为默认,将使用这些端口来搜索cdrom设备(因此它们不用再添加了)

        0x03F601F0, 0x03760170, 0x02F600F0,
        0x03860180, 0x6F006B00, 0x77007300.

Note 4: The BIOS might have offered a cdrom interface. It would be (cd). After
    `cdrom --init' and `map --hook', we might have our (cd0), (cd1), ...
    available. It is likely that one of them could access the same media
    as the BIOS-offered (cd).
注意 4:BIOS可能已经提供了cdrom 的接口。它的设备号总是(cd)。在 `cdrom --init'
        和 `map --hook' 执行后,我们可以有我们自己有效的(cd0), (cd1), ...等设备。

Note 5: You may access the (cd) and (cdX)'es in the blocklist way. Example:
注意 5:你可以用块列表的方式去访问(cd)和 (cdX)等设备。示例:

        cat --hex (cd0)16+2

    The cdrom sectors are big sectors with a size of 2048 bytes.
        cdrom 扇区是大小为 2048 字节的大扇区。

Note 6:    The iso9660 filesystem driver has Rock-Ridge extension support, but
    has no Joliet extension support. So you may encounter failure when
    you attempt to read files on a Joliet CD.
注意 6:我们的iso9660文件系统驱动具有Rock-Ridge扩展支持,但没有Joliet扩展支持。
        因此当你试图在一个使用Joliet扩展的光盘上读取文件时,可能遭遇失败。

Note 7: The (cd) or (cdX)'es can be booted now. Examples:
注意 7:现在,(cd)及 (cdX)设备可以被引导了。示例:

        chainloader (cd)
        boot

        chainloader (cd0)
        boot

        chainloader (cd1)
        boot

    You should already have access to the CD sectors before you can
    chainload it.
        在链式加载CD 光盘的扇区前,你就已经可以能访问它了。

******************************************************************************
***                   About the New `setvbe' Command                       ***
******************************************************************************
                      关于新命令 `setvbe'

Gerardo Richarte contributed the `setvbe' code and the following comment:
Gerardo Richarte 先生提供了`setvbe'的源码,下面是注释:

    New command is `setvbe', and can be used to change the video mode
    before executing the kernel.
        `setvbe'是一个新的命令,它可以在系统核心运行前被用来改变视频模式。

    For example, you can do
        例如,你可以执行

        setvbe 1024x768x32

    this will scan the list of available modes and set it, and
    automatically append a `video=' option to each subsequent kernel
    command-line. The appended `video=' option is like this:
        这会扫描出其可用模式的列表并设置它,并且自动在随后的每个kernel命令
        行中增加一个选项`video='。增加的选项`video='类似于:

        video=1024x768x32@0xf0000000,4096

    where 0xf0000000 is the video framebuffer address as reported by vbe,
    and 4096 is the size of a scanline in bytes (also as reported by vbe).
        这里的0xf0000000是vbe报告的视频模式的帧缓存地址,而4096是扫描线的字节大小。

    This is really useful if you want to give some graphics support to your
    OS, but you don't want to implement any video functionality other than
    writing a pixel to video memory.
        如果你想在你的操作系统上获得一些图形支持,但是除了只写一个像素点到视频内
        存而外,你却不想使用任何视频功能,这确实有用。


******************************************************************************
***                   About the DOS utility `hmload'                       ***
******************************************************************************
                      关于DOS工具`hmload'

This program was written by John Cobb (Queen Mary, University of London).
此程序由 John Cobb 先生编写(伦敦玛丽皇后学院)。

John Cobb's note:
John Cobb先生的注释:

    To make use of the ram drive feature I wrote a program `hmload' to load
    an arbitrary file to an arbitrary address in high memory. The program
    is not very sophisticated and relies on XMS to turn on the A20 line.
    (Also one must be very careful to steer clear of any areas of memory
    already in use).
        为了使用内存驱动器的特性,我写了一个程序“hmload”来将任意文件加载
        到高端内存的任意地址。这个程序不是十分深奥但依赖在XMS 里开启A20地址线。
        (并且必须将那些已经使用了的任何内存空间精心的清理干净)

    Under Linux we generated a disk image `dskimg' (with the kernel and
    Initrd and a partition table).
        我们在linux下生成一个磁盘映象“dskimg”(包含kernel和initrd及一个分区表)。

    Using this our boot procedure looked something like this:
        我们的引导过程看起来是下面这样:

    hmload -fdskimg -a128
    fixrb
    <unload network drivers>
    grub

        map --ram-drive=0x81
        map --rd-base=0x8000000
        map --rd-size=0x400000
        root (rd,0)
        kernel /kernel root=/dev/ram0 rw ip=bootp ramdisk_size=32768 ...
        initrd /initrd
        boot

See http://sysdocs.stu.qmul.ac.uk/sysdocs/Comment/GrubForDOS/ for details.
详情参阅 http://sysdocs.stu.qmul.ac.uk/sysdocs/Comment/GrubForDOS/

Update 2007-12-05:
更新   2007-12-05 :

    Now the MAP command can handle gzipped (rd) image. One can use this
    feature with the hmload utility. For example,
       

    step 1. Load the gzipped image under DOS at a relatively low address:
        步骤 1. 在DOS的相对较低的地址处加载gzip压缩映像:

        hmload -fdskimg.gz -a16

    step 2. Unload network drivers.
        步骤 2  卸载网络驱动器

    step 3. Run GRUB.EXE.
        步骤 3.  运行 GRUB.EXE

    step 4. At the grub prompt, run these commands:
        步骤 4.  在grub 命令提示符下,执行下列命令:

        map --rd-base=0x1000000    # set rd-base address to be 16M
                                        # 设置rd-base地址为16M

        map --rd-size=<the accurate size of dskimg.gz in bytes>
                              < dsking.gz 精确的字节数 >

        map (rd)+1 (hd0)    # This will decompress (rd) and place
                    # the decompressed image at the top end
                    # of the extended memory. The (rd)+1
                    # here has special meaning and stands
                    # for the whole (rd) device. You must
                    # use (rd)+1 instead of (rd).
                                        # 这会将(rd)解压并且把解压后的映像放到扩展内

存的顶端。
                                        # 这里的(rd)+1具有特定的含义而且将整个(rd)设

备放到了顶端。
                                        # 这里你必须使用 (rd)+1 来替代(rd)。
        map --hook
        root (hd0,0)
        kernel /kernel root=/dev/ram0 rw ip=bootp ramdisk_size=32768 ...
        initrd /initrd
        map --unhook
        map (hd0) (hd0)        # Delete the map; this is needed.
                                        # 删除map映射;这是需要的
        boot


******************************************************************************
***                      Notes on the use of stack                         ***
******************************************************************************
                         关于堆栈的注释
The protected-mode and real-mode stack are merged at physical address 0x2000.
保护模式与实模式的堆栈被合并到物理地址 0x2000 处。

All functions should use at most 2K stack space(0x1800-0x2000). So each
subfunction should use as little stack as possible to avoid stack-overflow.
所有的功能应当最多使用 2K 的堆空间 (0x1800到0x2000)。因此各个子功能部分
应当使用尽可能小的堆以避免堆栈溢出。

Don't use recursive functions because they could expend too much stack space.
不要使用递归功能,因为他们会消耗太多的堆空间。

The original protected mode stack at 0x68000(expand-down) is free now and can
be reused for any purposes.
原来位于0x68000(向下延伸)的保护模式的堆现在不再使用,并且它可以被用于任何目的。


******************************************************************************
***                  A bug was found in the CDROM driver                   ***
******************************************************************************
                     CDROM 驱动器上发现的缺陷

It seems the cdrom must be connected as the master device of an IDE controller.
似乎 cdrom 应当连接在IDE控制器的主设备通道上。

If cdrom is slave, the driver will fail to read the cdrom sectors. Hope someone
could fix this problem.
如果 cdrom 是从设备,读取cdrom扇区的驱动将失败。希望有人能解决这个问题。

******************************************************************************
***                        BIOS and the (cd) drive                         ***
******************************************************************************
                           BIOS 与 (cd)驱动器

When BIOS boots a no-emulation-mode bootable CD-ROM, it allocates a BIOS drive
number to the CD. If the boot image of the CD-ROM is grldr or stage2_eltorito,
then GRUB can access the CD-ROM media through the drive number allocated by
BIOS. The device name of the CD-ROM is (cd).
当BIOS启动一个非模拟模式的可启动的CD-ROM设备时,它会分配一个BIOS驱动器号给这个
CD设备。如果这个CD-ROM使用grldr或stage2_eltorito作为启动映像文件,那么GRUB可以
通过BIOS分配的驱动器号来访问这个CD-ROM 媒体。

BIOS can allocate a BIOS drive number to a no-emulation-mode CDROM even when
the CDROM is not bootable. QEMU has done so. At boot time, GRUB4DOS will
search drives 0x80-0xFF for a possible no-emulation-mode CDROM drive allocated
by BIOS. So if BIOS offered a CDROM interface of int13 EBIOS functions 41h-4Eh,
then the (cd) device will be automatically available in GRUB4DOS.
BIOS 会分配一个驱动器号给非模拟模式启动的CDROM 设备,即使这个CDROM 是不能启动的。
虚拟机QEMU就是这样处理的。在引导的时候,GRUB4DOS将搜索那些由BIOS分配的,驱动器号
从0x80至0xFF的,可能存在的非模拟模式的CDROM 驱动器。 所以,如果BIOS为CDROM提供了
扩展int13(功能号41h-4eh)接口,那么这个(cd)设备自动在GRUB4DOS 中有效。


******************************************************************************
***              The way of disk emulation changed greatly                 ***
******************************************************************************
                 磁盘仿真方式发生了巨大变化

The way of disk emulation has changed greatly since 0.4.2 final. Please don't
mix newer versions with older versions when disk emulation features are used.
磁盘仿真方式自从0.4.2正式版之后已经发生了巨大变化。在使用磁盘仿真功能时候,
请不要将较新的版本和旧的版本混合使用。

The newer versions won't automatically unhook emulations established in a
previous grub4dos environment. The GRUB.EXE of an older version will
automatically dismiss emulations established earlier, before transferring
control to the main grub program(i.e., pre_stage2).
较新的版本不会自动卸载之前已经在grub4dos环境建立的仿真盘。GRUB.EXE 的一个
很古老的版本,在将控制权移交给grub主程序(即,pre_stage2)前,将会自动释放
先前建立的仿真盘。


******************************************************************************
***            FreeDOS EMM386 v2.26 (2006-08-27) VCPI problem              ***
******************************************************************************
               FreeDOS EMM386 版本2.26 (2006-08-27) VCPI服务的问题

The VCPI function "AX=DE0Ch - Switch From Protected Mode to V86 Mode" of
FreeDOS EMM386 v2.26 was not implemented properly(it always hangs). As an
alternative, you can use Microsoft's EMM386 instead.
FreeDOS 的 EMM386 版本2.26 中的VCPI服务,“功能号 AX=DE0Ch-选择从
保护模式到虚拟8086模式”,不能正确的执行(总是死机)。选择之一是,
你用微软的 EMM386 来代替它。

Even while emm386 is running, grub.exe can be started. But if you try to quit
to DOS from grub4dos by using the `quit' command, the VCPI function DE0C will
be called. If EMM386 is of Microsoft, everything goes ok. If EMM386 is of
FreeDOS, the machine will hang.
即使emm386已经运行,grub.exe也能够启动。但是如果你试图从grub4dos中通过`quit'
命令来返回DOS,VCPI 服务的DE0C 号功能将被调用。如果是微软的 EMM386 ,接下来的
一切都很正常 。而如果是FreeDOS 的 EMM386 ,那么将会死机。

******************************************************************************
***                 New options for map were added                         ***
******************************************************************************
                    map 命令的新增选项

Along with 0.4.2 final, there are two new options for the map command. They
are --safe-mbr-hook=SMH and --int13-scheme=SCH. Both are related with disk
emulation for use(as smoothly as possible) in the Win9x environment.
随着0.4.2 最终版的发布,map 命令有了两个新选项。它们是--safe-mbr-hook=SMH
以及--int13-scheme=SCH 。它们都和Win9x环境下(尽可能稳定的)使用磁盘仿真有关。

SMH can take either of the two values 0 and 1. By default, SMH is 1. If you
encountered problems of disk emulation under Win9x, you may insert a line of
SMH参数可以是0或1这个两个值之一。作为默认,SMH参数为1 。如果你在Win9x中遇到
磁盘仿真的问题,你可以插入这样一行到`boot'命令之前,

    map --safe-mbr-hook=0

before the `boot' command and try again.
然后再试一次。

Also SCH may take either 0 or 1 at present. By default, SCH is 1. If you
encountered disk emulation problems under Win9x, you may insert a line of
SCH在使用时,也可以取0或1之一的值。作为默认,SCH为1 。如果你在Win9x中遇到
磁盘仿真的问题,你可以插入这样一行到`boot'命令之前,

    map --int13-scheme=0

before the `boot' command and try again.
然后再试一次。

Note by the way. Like --safe-mbr-hook and --int13-scheme, the MAP command has
a few other options that are used for setting global variables. They are here:
注意 顺便提一下。类似于--safe-mbr-hook和--int13-scheme ,MAP命令中有几个其他
选项可被用以设置全局变量。

    map --floppies=M

M can be 0, 1, or 2. MAP will set a proper value at 0040:0010 by using M.
其中的M 可以是0 , 1 或者2 。MAP 将把一个恰当的M 值设置在地址0040:0010 处。

    map --harddrives=N

N can be between 0 and 127(inclusive). MAP will set 0040:0075 to N.
其中的N 可以是从0到127之间的值。MAP将把N 值设置在0040:0075处。

    map --memdisk-raw=RAW

RAW default to 1. If RAW=0, `int15/ah=87h' will be used to access memdrives.
其中的RAW默认为1 。如果RAW=0,将通过`int15/ah=87h'访问内存驱动器。

    map --ram-drive=RD

RD default to 0x7F which is a floppy. If the RAM DRIVE is a hard drive image
(with partition table in the first sector), you should set RD >= 0x80 and RD
< 0xFF.
其中的RD默认是0x7F的软驱号。如果随机内存驱动器是一个硬盘驱动器印象(第一扇区
含有分区表的),那么你可以将 RD 设置为 大于或等于0x80 或 小于 0xFF 的值 。

    map --rd-base=ADDR

    map --rd-size=SIZE

ADDR specifies the physical base address of the ramdisk image. SIZE specifies
the size in bytes of the ramdisk image. ADDR default to 0. SIZE is also default
to 0, but a size of 0 means 4GB, not a zero-long disk. The RAM DRIVE can be
accessed in the GRUB environment using the (rd) device.
其中的 ADDR 指定出内存映像的物理基地址。SIZE指定出内存映像的字节数大小。ADDR
默认为0 。SIZE的默认值也是0 ,但是值为0 表示4 GB ,而不是零字节长的磁盘。随机
内存驱动器可以在 GRUB 环境中通过使用 (rd) 设备来访问。


******************************************************************************
***                   About the new map option --in-situ                   ***
******************************************************************************
                      关于 map 的新选项 --in-situ

--in-situ is used with hard drive images or hardrive partitions. With an
in-situ map, we can typically use a logical partition as a primary partition.
--in-situ被使用于硬盘驱动器映像或者是硬盘驱动器分区。通过--in-situ ,我们可以把
一个逻辑分区象征性的作为一个主分区来使用。

In-situ map is a whole drive map. It only virtualize the partition table and
the number of hidden sectors in the BPB of the DOS Boot Record.
--in-situ 的映射是整个驱动器的映射。它只虚拟出分区表和 DBR 上的BPB里的隐藏扇区数。

While disk emulation may encounter various problems with win9x, the in-situ map
works fine with win9x.
尽管磁盘仿真在 win9x 中可能会遇到的各种问题,但在win9x中,in-situ的映射却运行得很好。

Note that --in-situ will not change the real partition table.
注意 --in-situ 的映射不会改变真实的分区表。

Example:
示例:
    map --in-situ (hd0,4)+1 (hd0)


******************************************************************************
***                      The PARTNEW Command Syntax                        ***
******************************************************************************
                         PARTNEW 命令的语法

Besides the mappings in the above section, you may instead choose to create a
new primary partition with the PARTNEW command. PARTNEW can generate a primary
partition entry (in the partition table) for a logical partition.
除了上述章节的仿真方法而外,你也可以替代选择用 PARTNEW 来建立一个新的主分区。
PARTNEW可以为逻辑分区生成一个新的主分区项(在分区表中)。

For example,
例如,

    partnew (hd0,3) 0x07 (hd0,4)+1

where the file (hd0,4)+1 stands for the whole partition (hd0,4). This command
will create a new primary partition (hd0,3) whose type is 0x07 and whose
contents/data is the same as that of the logical partition (hd0,4).
这里的(hd0,4)+1 代表了整个(hd0,4)分区。这条命令将建立一个分区类型为 0x07
的新的主分区(hd0,3),并且它的内容(即数据)和逻辑分区(hd0,4)一样。

Just like a whole logical partition, a contiguous partition image file can
also be used with PARTNEW:
就像整个逻辑分区时的情况一样,一个连续的分区映像文件也可以用在PARTNEW 命令中:

    partnew (hd0,3) 0x00 (hd0,0)/my_partition.img

The type 0x00 indicates a type-auto-detection of the image MY_PARTITION.IMG.
The above command will create a new primary partition (hd0,3) with a proper
type and with contents/data being exactly that of the contiguous file
(hd0,0)/my_partition.img.
这个 0x00 类型表示这个 MY_PARTITION.IMG 映像文件的分区类型由自动检测确定。
上面的命令将建立一个类型恰当的新的主分区(hd0,3),并且使用这个连续的
  (hd0,0)/my_partition.img 文件中的全部内容(数据)作为它的内容(数据)。

PARTNEW will automatically correct the "hidden sectors" in the BPB and the
modification will be permanent. And PARTNEW modifies the partition table
permanently.
PARTNEW 将自动修正 BPB 中的“隐藏扇区数”并且这个修改是永久的。而且PARTNEW
修改分区表也是永久的。

In addition to creating new partition entries, PARTNEW can also be used to
delete(erase, or wipe) a primary partition entry. For example,
除了建立分区表项外,PARTNEW也可以用来删除(抹掉,擦除)一个分区表项。例如,

    partnew (hd0,3) 0 0 0

which will empty the last entry in the partition table in MBR. Generally,
you should use the form of "partnew PARTITION 0 0 0" to erase the entry.
Note that only the entry would be erased, and the data stored in the partition
will not be touched.
这样,主引导记录中最后一个分区表项将被清空。通常,你可以用"partnew PARTITION 0 0 0"的

格式来
抹掉其分区表项,但是已经存储在这个分区中的数据不被影响。

******************************************************************************
***              Newly implemented operators `&&' and `||'                 ***
******************************************************************************
                 最近实现的运算符 `&&' and `||'

This implementation is very simple. It does not handle operator nesting.
它的实现非常简单。它不处理嵌套的运算符。

Usage of `&&':
`&&'的用法:

    command1 && command2

Description:
说明 :

    If command1 returns true, then command2 will be executed.
        如果 command1 返回 真,那么 command2 将执行

Usage of `||':
`||'的用法:

    command1 || command2

Description:
说明 :

    If command1 returns false, then command2 will be executed.
        如果 command1 返回 假,那么 command2 将执行

Examples:
示例:
    is64bit && default 0
    is64bit || default 1

******************************************************************************
***          Three new commands is64bit, errnum and errorcheck             ***
******************************************************************************
             三个新命令 is64bit, errnum 和 errorcheck

is64bit and errnum retrieve the value of is64bit and errnum respectively.
is64bit 和 errnum 命令分别用来检索是否是 64 位的系统和错误值。

errorcheck controls whether or not the error will be handled. By default,
errorcheck is on, and menu script execution will stop on error. If errorcheck
is off, the script will continue to execute upto a boot command. A boot command
will turn the errorcheck on.
errorcheck(错误检查)命令控制着错误是否被处理。作为默认,错误检查是开启的 ,即在
错误发生时命令脚本将停止执行。而假如错误检查是关闭的,那么脚本将一直执行到 boot
命令。一条 boot 命令可以把错误检查转变为开启。

******************************************************************************
***              Use numeric keys to select a menu entry                   ***
******************************************************************************
                 使用数字键来选择菜单项

If, for example, you intend to goto entry #25, you may press 2 followed by 5.
例如,如果你想要选择第25项菜单项,你可以先按下数字键2 之后再按下 5 。


******************************************************************************
***           Use the INSERT key to debug step by step at startup          ***
******************************************************************************
              启动时使用 INSERT 键逐步的调试

Some buggy machines could fail to enter grub4dos environment. They might hang
or reboot unexpectedly. Press INSERT as quickly as possible on startup, and
you can get a chance to single-step the boot process and see how far it can
go, and then report bugs.
在一些缺陷多的机器上进入 grub4dos 环境时可能会失败。那或许是意外的死机或者重启。
在启动时尽可能快的按下 INSERT 键,你就可能获得进入单步启动进程的机会而看到它最
多能运行到哪里,而后请上报这些故障 。

******************************************************************************
***             The debug command syntax has been changed                  ***
******************************************************************************
                debug 命令的语法已经改变

The DEBUG command now can be used to control the verbosity of command output:
DEBUG 命令现在可以用来控制冗长的命令输出:

        debug [ on | off | normal | status | INTEGER ]

0 or off for silent
0 或者 off 指定为静默模式

1 or normal for normal
1 或者 normal 指定为标准模式

2 to 0x7FFFFFFF or on for verbose
从 2 到 0x7fffffff 或者 on 指定为冗长模式

******************************************************************************
***                     GRUB4DOS and Windows Vista                         ***
******************************************************************************
                        GRUB4DOS 与 Windows Vista

First, use the following command to create a boot entry:
首先,使用以下命令来建立一个启动项:

    bcdedit /create /d "GRUB for DOS" /application bootsector

The result will look like this:
执行结果看起来类似这样:

The entry {05d33150-3fde-11dc-a457-00021cf82fb0} was successfully created.

The long string {05d33150-3fde-11dc-a457-00021cf82fb0} is the id for this
entry.
其中的长字串{05d33150-3fde-11dc-a457-00021cf82fb0} 是这个项的数字标识。

Then, use the following commands to set boot parameters:
然后,通过以下命令来设置启动参数:

    bcdedit /set {id} device boot
    bcdedit /set {id} path \grldr.mbr
    bcdedit /displayorder {id} /addlast

Please replace {id} with the actual id returned from the previous command.
请用先前的命令所返回的实际的id 来替换掉 {id}。

Finally, copy GRLDR.MBR to C:\ or wherever your boot drive is, and copy GRLDR
and menu.lst to the root directory of any FAT16/FAT32/EXT2/NTFS partition.
最后,复制 GRLDR.MBR 到 你引导设备的 C盘根目录下,并且将 GRLDR 和 menu.lst 复制到
任意一个 FAT16/FAT32/EXT2/NTFS 的分区根目录下。

Note: A boot partition should be the active primary partition with BOOTMGR
      inside. The `device boot' indicates grldr.mbr should be in the boot
      partition.
注意:引导分区必须是含有 BOOTMGR 的激活的主分区。

Lianjiang has written down a script to automate the tasks:
LianJiang 先生写出了一个脚本来自动化的完成这个麻烦事:

    @echo off
    rem by lianjiang
    cls
    echo.
    echo   Please run as administrator
    echo.
    pause
    set gname=GRUB for DOS
    set vid=
    set timeout=5
    bcdedit >bcdtemp.txt
    type bcdtemp.txt | find "\grldr.mbr" >nul && echo. && echo  BCD entry existing, no

need to install. && pause && goto exit
    bcdedit  /export "Bcd_Backup" >nul
    bcdedit  /create /d "%gname%" /application bootsector >vid.ini
    for,/f,"tokens=2 delims={",%%i,In (vid.ini) Do (
                  set vida=%%i
    )
    for,/f,"tokens=1 delims=}",%%i,In ("%vida%") Do (
                  set vid={%%i}
    )
    echo %vid%>vid.ini
    bcdedit  /set %vid% device boot >nul
    bcdedit  /set %vid% path \grldr.mbr >nul
    bcdedit  /displayorder %vid% /addlast >nul
    bcdedit  /timeout  %timeout% >nul
    if exist grldr.mbr copy grldr.mbr %systemdrive%\ /y && goto exit
    echo.
    echo   Please copy grldr.mbr to %systemdrive%\
    echo.
    pause
    :exit
    del bcdtemp.txt >nul
-------------------------------------------------------------------
Update: Fujianabc pointed out that
更新: Fujianabc 先生指出以下这行

    bcdedit  /set %vid% device boot >nul

should be changed to
必须更改为

    bcdedit  /set %vid% device partition=%SystemDrive% >nul
-------------------------------------------------------------------

You still need to copy grldr yourself.
你还需要自行复制 grldr 。

Notice: It's possible to modify the BCD entry from a different OS, you just
need to specify the location of BCD:
注意:   从一个不同的操作系统来修改 BCD 启动项是可能的,你只是需要指定BCD的位置:

    bcdedit /store D:\boot\BCD ...

Notice: These commands need elevated privileges, they should be used inside
cmd.exe which is started with "Run as administrator".
注意: 执行这些命令需要提高权限,它们必须是“以管理员身份运行”于cmd.exe中。

Notice: People has reported that some version of Vista doesn't support
creating file in C:\ with no extension, even with administrator privileges.
This means grldr can't be placed in C:\. You can solve this by either copy
grldr to another partition, or rename grldr to something like grub.bin. Please
see the following section on how to do this.
注意:已有人报告说,即使使用管理员身份,Vista的某些版本也不支持在C盘根目录下建立
无扩展名的文件。你既可以复制grldr到另外的一个分区来解决这个问题,也可以将 grldr
重命名,比如为 grub.bin 。请参见下节怎么来做到这点。


******************************************************************************
***                      How to rename grldr                               ***
******************************************************************************
                         怎样重命名 grldr

grldr and grldr.mbr use internal boot file name to decide which file to load,
so if you want to change the name, you must also change the embeded setting.
You can do this with the help of grubinst, which can be downloaded at:
  grldr 和 grldr.mbr引用引导文件内部的文件名来决定装载哪个文件,所以假如你
  想更换它们的名字,那么你也必须要修改那些内嵌在文件内部的设置。你可以使用
  辅助程序grubinst 来做到这些,grubinst 可以在以下网址下载到:

http://download.gna.org/grubutil/

grubinst can generate customized grldr.mbr:
  grubinst 能生成自定义的grldr.mbr:

    grubinst -o -b=mygrldr C:\mygrldr.mbr

grubinst can also edit existing grldr/grldr.mbr:
  grubinst 也能编辑一个既有的 grldr 或 grldr.mbr:

    grubinst -e -b=mygrldr C:\mygrldr

    grubinst -e -b=mygrldr C:\mygrldr.mbr

In this case, you must use a grubinst that is compatible with the version of
grub4dos, otherwise the edit will fail.
在这种情况中,你必须使用一个和 grub4dos 版本兼容的grubinst,否则修改将会失败。

So, in order to load mygrldr instead of grldr, you can use one of the
following methods:
  确实如此,在命令中通过加载mygrldr来代替grldr ,你可以使用下面的方法之一:

1. Use customized grldr.mbr to load mygrldr. In this case, you need to change
the embeded boot file name in grldr.mbr. The name of grldr.mbr can be changed
at will.
  使用已定制好的grldr.mbr 来加载 mygrldr 。在这种情况下,你需要修改内嵌在
  grldr.mbr中的引导文件名。grldr.mbr的名字可以被任意的改变。

2. Use mygrldr directly. In this case, you need to change the embeded boot
file name in mygrldr to match its new name.
  直接使用mygrldr 。在这种情况下,你需要将 mygrldr 中内嵌的引导文件名改为
  一个合适的名字。

Notice: The boot file name must conform to the 8.3 naming convention.
注意: 引导文件名必须遵循 8.3 文件名规范。

Notice: The boot file name must conform to the 8.3 naming convention.


******************************************************************************
***                          PXE device                                    ***
******************************************************************************
                             PXE 设备

If PXE service is found at startup, GRUB4DOS will create a virtual device
(pd), through which files from the tftp server can be accessed. You can setup
a diskless boot environment using the following steps:
如果PXE设备在开机时被发现,GRUB4DOS 将建立一个虚拟设备 (pd),通过它tftp服务器
上的文件能被访问。你可以使用下面的步骤来设置一个无盘启动环境:

Client side
客户端

You need to boot from PXE ROM.
你需要从 PXE ROM 上启动。

Server side
服务器端

You need to configure a dhcp server and a tftp server. In the dhcp server, use
grldr as boot file.
你需要配置一个dhcp服务器和一个tftp服务器。在dhcp服务器上,使用grldr作为引导文件。

You may also want to load a different menu.lst for different client. GRUB4DOS
will scan the following location for configuration file:
你也可能希望为不同的客户端加载一个不同的menu.lst 。GRUB4DOS将在以下位置查找配置文件:

    [/mybootdir]/menu.lst/01-88-99-AA-BB-CC-DD
    [/mybootdir]/menu.lst/C000025B
    [/mybootdir]/menu.lst/C000025
    [/mybootdir]/menu.lst/C00002
    [/mybootdir]/menu.lst/C0000
    [/mybootdir]/menu.lst/C000
    [/mybootdir]/menu.lst/C00
    [/mybootdir]/menu.lst/C0
    [/mybootdir]/menu.lst/C
    [/mybootdir]/menu.lst/default

Here, we assume the network card mac for the client machine is
88:99:AA:BB:CC:DD, and the ip address is 192.0.2.91 (C000025B). /mybootdir is
the directory of the boot file, for example, if boot file is /tftp/grldr, then
mybootdir=tftp.
这里,我们假设客户端的网卡mac地址是 88:99:AA:BB:CC:DD ,而且ip地址是192.0.2.91

(C000025B)。
/mybootdir 是引导文件所在目录,例如,如果引导文件是 /tftp/grldr ,那么mybootdir=tftp

If none of the above files is present, grldr will use its embeded menu.lst.
如果上面的文件都未出现,grldr将使用它的内置的menu.lst 。

This is a menu.lst to illstrate how to use files from the tftp server.
这是一个怎样使用tftp服务器上文件的menu.lst文件。

    title Create ramdisk using map
    map --mem (pd)/floppy.img (fd0)
    map --hook
    rootnoverify (fd0)
    chainloader (fd0)+1

    title Create ramdisk using memdisk
    kernel (pd)/memdisk
    initrd (pd)/floppy.img

You can see that the menu.lst is very similar to normal disk boot, you just
need to replace device like (hd0,0) with (pd).
你可以看到这个 menu.lst 和在普通磁盘上引导的是相似的,你只是需要把象(hd0,0)
这样的设备用(pd) 来代替。

There are some differences between disk device and pxe device:
磁盘设备和 pxe 设备有一些不同点:

1. You can't list files in the pxe device.
   你不能把pxe设备上的文件以列表显示。

2. The blocklist command will not work with a file in the pxe device.
   blocklist 命令不能用于 pxe 设备上的文件。

3. You must use --mem option if you want to map a file in the pxe device.
   如果你想映射一个pxe服务器上的文件,你必须使用--mem 选项 。

When you use chainloader to load file from the pxe device, there is a option
you can use:
当你使用 chainloader 命令装载一个pxe 设备上的文件时,有一个选项你可以使用:

    chainloader --raw (pd)/BOOT_FILE

Option --raw works just like --force, but it load file in one go. This can
improve performance in some situation.
选项 --raw 的执行就和--force一样,但是它是一次性将文件装载执行。这可以改善
一些情况下的执行效率。

You can use the pxe command to control the pxe device.
你可以使用 pxe 命令来控制 pxe 设备。

1. pxe

    If used without any parameter, pxe command will display current
    settings.
        如果没有使用任何参数,pxe 命令将显示当前设置。

2. pxe blksize N

    Set the packet size for tftp transmission. Minimum value is 512,
    maximum value is 1432. This parameter is used primarily for very old
    tftp server where packet larger than 512 byte is not supported.
        设置tftp 传输的包大小。最小值是 512 ,最大值是 1432 。这个参数主要使
        用在那些不支持远大于 512 字节包大小的tftp 服务器上。

3. pxe basedir /dir

    Set the base directory for files in the tftp server. If
        为tftp 服务器上的文件设置基本目录。如果
        pxe basedir /tftp

    then all files in the pxe device is related to directory /tftp, for
    example, (pd)/aa.img correspond to /tftp/aa.img in the server.
        那么在pxe 设备上的所有文件都和目录 /tftp 相联系。例如,(pd)/aa.img
        对应于服务器上的 /tftp/aa.img 。

    The default value of base directory is the directory of the boot file,
    for example, if boot file is /tftp/grldr, then default base directory
    is /tftp.
        基本目录的默认值是引导文件所在目录,例如,如果引导文件是 /tftp/grldr ,
        那么默认的基本目录就是 /tftp 。

4. pxe keep

    Keep the PXE stack. The default behaviour of GRUB4DOS is to unload
    the PXE stack just before it exits.
        保持 pxe 栈 。GRUB4DOS的默认状态是自身退出时卸载PXE 栈。

5. pxe unload

    Unload the PXE stack immediately.
        立即卸载 PXE 栈。


******************************************************************************
***                  New Feature of Relative Path Support                  ***
******************************************************************************
                     相对路径支持的新特性

Use the `root' or `rootnoverify' command to specify the `working directory'.
使用`root' 或 `rootnoverify'命令来指定`工作目录' 。

For example:
例如:

        root  (hd0,0)/boot/grub

This specifies that the working dir is (hd0,0)/boot/grub. So all subsequent
filenames of the form "/..." will actually refer to (hd0,0)/boot/grub/...
这就指定了当前工作目录是(hd0,0)/boot/grub 。因此所有继"/..."之后的文件名将实际
提交到(hd0,0)/boot/grub/...

That is to say:
也就是说:

        cat  /menu.lst

will be equivalent to
将等同于

        cat  (hd0,0)/boot/grub/menu.lst

 

******************************************************************************
***                 Notation For The Current Root Device                   ***
******************************************************************************
                    当前根设备的符号

The notation `()' can be used to access the current root device. You may use
`find --set-root ...' to set the current root device, but the find command
does not set the `working dir' of the root device. In this case you should
use `()' to set the working dir after the find command:
符号`()'可以在访问当前根设备时使用。你可以使用`find --set-root ...'来设置当前根
设备,但find 命令不能设置根设备的`工作目录'。这时你应该使用`()'在find命令后来设
置工作目录。

        root  ()/boot/grub

Update 2008-05-01:
更新 2008-05-01:

    FIND can also set the `working directory' now. For example:
        现在 FIND 命令也可以设置`工作目录'了。例如:

        find  --set-root=/tmp  /boot/grub/menu.lst

    It is equivalent to this pair of commands:
        它等同于这一组命令:

        find  --set-root  /boot/grub/menu.lst
        root  ()/tmp


******************************************************************************
***                   The new map option --a20-keep-on                     ***
******************************************************************************
                      map 新选项 --a20-keep-on

Along with 0.4.3 final, map has a new option --a20-keep-on which is related to
A20 control after a memdrive sector access. Usage:
随着0.4.3最终版的发布,map 有了一个新选项 --a20-keep-on ,它跟内存驱动器扇区访
问后的A20 地址线控制有关

    map --a20-keep-on=0

It should be used before the "map --hook" command.
它必须被使用于"map --hook"命令之前。

By default, A20 will be always on after an RAM INT13 sector access. If
"map --a20-keep-on=0" is used, the A20 status after the INT13 call will be the
same as that before the INT13 call.
作为默认,在INT13 对随机内存的扇区访问之后 A20 将一直开启。如果"map --a20-keep-on=0"
被使用,那么在INT13 中断调用后的 A20 的状态将和在INT13中断调用前相同。

******************************************************************************
***                  The CDROM emulation (virtualization)                  ***
******************************************************************************
                      光盘仿真(虚拟化)

The CDROM emulation is sometimes called ISO emulation. Here is an example:
光盘仿真有时候又称为 ISO 仿真。这里是个示例:

    map  (hd0,0)/myiso.iso  (hd32)
    map  --hook
    chainloader  (hd32)
    boot

if myiso.iso is not contiguous and you have enough memory, add a --mem option:
如果myiso.iso 是不连续的并且你有足够的内存,那么要增加一个--mem选项:

    map  --mem  (hd0,0)/myiso.iso  (hd32)
    map  --hook
    chainloader  (hd32)
    boot

Note: (hd32) is a grub drive number equivalent to (0xA0). If a virtual drive is
specified with a drive number greater than or equal to 0xA0, then it will be
treated as a cdrom (i.e., with 2048-byte big sectors).
注意:(hd32) 是一个 grub 驱动器,驱动器号和 (0xA0) 等价。如果一个虚拟驱动器被指
定为一个大于或等于0xA0 的驱动器号,那么它将被视为是一个光盘。(即,是 2048 字节
的大扇区)

Like normal disk emulations, the CDROM emulation also (mainly) works with
real-mode OSes. After a protected-mode OS kernel (such as
WinNT/2K/XP/VISTA/LINUX) gains control, the OS would have no ability to access
the virtual CDROM through BIOS int13.
就像标准的磁盘仿真一样,光盘仿真也(主要)工作于实模式操作系统中。在一个保护模式的
操作系统核心(例如WinNT/2K/XP/VISTA/LINUX)获得控制后,操作系统常常没有能力通过BIOS
的int13 来访问虚拟光盘。

DOS/Win9x users may google for ELTORITO.SYS and use it in CONFIG.SYS as a
device driver for the virtual cdrom.
DOS/Win9x 的使用者可以用google搜索到 ELTORITO.SYS 然后将它作为虚拟光驱的设
备驱动使用到CONFIG.SYS 中。

Example usage of eltorito.sys in CONFIG.SYS:
CONFIG.SYS 中 eltorito.sys 的用法举例:

    device=eltorito.sys /D:oemcd001

Corresponding MSCDEX command which can be placed in AUTOEXEC.BAT:
对应的可能是放在 AUTOEXEC.BAT中的 MSCDEX 命令:

    MSCDEX /D:oemcd001 /L:D


Due to some bugs found in eltorito.sys, the driver could fail to load. If you
encounter such problems, then you may replace (hd32) with (0xFF) for the
virtual cdrom drive number and try again.
由于在 eltorito.sys中发现了一些缺陷,驱动器可能会加载失败。假如你碰到这类问题,
那么你可以将虚拟光盘的驱动器号从(hd32)更换为(0xFF)然后再试一次。

******************************************************************************
***                  The New Command CHECKRANGE                            ***
******************************************************************************
                     新命令 CHECKRANGE

Checkrange checks whether or not the return value of a command is in the
specified range or ranges.
Checkrang 检查一条命令的返回值是否是在指定的值域或值域集合中。

Usage:        checkrange  RANGE  COMMAND
用法:           checkrange   值域    命令

Here are some examples for RANGE:
这里是参数 RANGE 的一些示例:

    3 is a range containing only the number 3
        3 是仅包含数字 3 的值域


    3:3 is equivalent to 3
        3:3 等价于 3

    3:8 is a range containing the numbers 3, 4, 5, 6, 7, 8
        3:8 是一个包含数字3, 4, 5, 6, 7, 8的值域

    3,4,5,6,7,8 is equivalent to 3:8
        3,4,5,6,7,8 等同于3:8

    3:5,6:8 is also equivalent to 3:8
        3:5,6:8 也等同于3:8

    3,4:7,8 is also equivalent to 3:8
        3,4:7,8 也等同于3:8

Note: You should not insert spaces into a range.
注意:一个值域中不能出现空格。

Here is an example showing where the checkrange can be used:
这里用一个示例来演示怎样使用 checkrange 命令:

    checkrange 0x05,0x0F,0x85 parttype (hd0,1) || hide (hd0,1)

which means: if (hd0,1) is not an extended partition, then hide it.
命令执行效果:如果 (hd0,1) 不是一个扩展分区,那么隐藏它。


******************************************************************************
***                       The New Command TPM                              ***
******************************************************************************
                          新命令 TPM

The "tpm --init" uses 512-byte data at 0000:7C00 as buffer to initialise TPM.
"tpm --init"在地址0000:7c00处使用512字节数据作为初始化TPM(可信赖平台模块)的缓存。

Before you boot VISTA's BOOTMGR, you might have to use the "tpm --init"
command on some machines. Normally you want to issue the "tpm --init" command
after a CHAINLOADER command.
在你引导 VISTA 的 BOOTMGR 前,你可以在一些机器上使用"tpm --init"。通常你应该在
一条 CHAINLOADR 命令后发出"tpm --init"指令。


******************************************************************************
***               Delimitors or comments between titles                    ***
******************************************************************************
                  标题间的限制或注释

It is possible to use titles as delimitors or comments. A title(or menu item)
is called unbootable if all of its menu commands are not boot-sensitive.
把标题用来做限制或注释是可能的。如果一个标题(或菜单项)下所有的菜单命令都是非启动敏感

的,
它被叫做是不可启动的。

The following commands are boot-sensitive(and others are not boot-sensitive):
下面的命令是启动敏感的(而其他命令是非启动敏感的)

    boot
    bootp
    chainloader
    configfile
    embed
    commandline
    halt
    install
    kernel
    pxe
    quit
    reboot
    setup

An unbootable title will be skipped when the user presses the Up Arrow or Down
Arrow keys. Even the unbootable menu item can get accessed(and executed) by
using the Left Arrow and/or Right Arrow keys. Examples:
一个不可启动的标题在使用者按向上方向键或向下方向键时将被跳过。甚至于不可启动的菜单项
是可以通过使用左方向键或右方向键来被访问(和被执行)的。示例:

    title This is an UNBOOTABLE entry(so this line is also a comment)
        pause --wait=0 This title is a comment. Nothing to do.
        pause --wait=0 You can use non-boot-sensitive commands here
        pause --wait=0 of any kind and as many as you would like.
        help
        help root
        help chainloader
        help parttype
        clear
    title ------------------------------------------------------------
        pause --wait=0 This title is a delimitor. Nothing to do.
        pause --wait=0 You can use non-boot-sensitive commands here
        pause --wait=0 of any kind and as many as you would like.
        clear
        help
        help boot
    title ============================================================
        pause --wait=0 This title is a delimitor. Nothing to do.
        pause --wait=0 You can use non-boot-sensitive commands here
        pause --wait=0 of any kind and as many as you would like.
        help
        clear
        help pause
    title ************************************************************
        pause --wait=0 This title is a delimitor. Nothing to do.
        pause --wait=0 You can use non-boot-sensitive commands here
        pause --wait=0 of any kind and as many as you would like.
        help kernel
        help
        clear

Note: An unbootable menu item must contain at least one command. If there
are no commands for a title, the title will be simply discarded and disappear.
注意:一个不可启动菜单项必须至少包含一条命令。如果标题下没有命令,标题将被简单的
丢弃并且不被显示。


******************************************************************************
***                           Bifurcate drives                             ***
******************************************************************************
                              分支式驱动器

Some machines apply different actions to a drive between CHS and LBA mode.
When you read sectors using standard BIOS call int13/AH=02h, you might find
out the drive is a floppy. But when you read sectors using extended BIOS
call(EBIOS) int13/AH=42h, you could know the drive is a cdrom. Such a drive
is called bifurcate.
一些机器在 CHS 和 LBA 模式之间对驱动器实施不同的动作。当你使用标准的int13/AH=02h
BIOS 调用来读取扇区时,你可能发现这个驱动器是一个软盘。但是当你用扩展的 BIOS 调用
(EBIOS)int13/AH=42h来读取扇区时,你可以知道这个驱动器是一个光盘。这样的驱动器被
叫做分支式的。

A bifurcate drive can have two drive numbers: one is the normal BIOS drive
number between 00 and FF in hexa, and this drive uses only CHS mode disk
access(standard BIOS int13/AH=02h); the other is the normal BIOS drive number
(Bitwise) OR'ed by 0x100(i.e., 256 in decimal), and this drive uses only
LBA mode disk access(EBIOS int13/AH=42h). For example, if the drive 0x00
(i.e., the first floppy) is bifurcate, then the drive (0x00) uses CHS mode
to access its sectors, and the drive (0x100) uses LBA (meaning EBIOS) mode
to access its sectors.
一个分支式的驱动器可以拥有两个驱动器号:一个是标准的 BIOS 驱动器号十六进制
的 00或FF ,并且这个驱动器只使用 CHS 模式的磁盘访问(标准的BIOS int13/AH=02h);
另一个是标准的 BIOS 驱动器号(按位)0x100 (即十进制的256),并且这个驱动器只
使用 LBA 模式的磁盘访问(EBIOS int13/AH=42h)。例如,如果驱动器0x00(即,第一软驱)
是分支式的,那么驱动器(0x00)使用 CHS 模式来访问它的扇区,而驱动器(0x100)则使用
LBA 模式(意味着EBIOS)来访问它的扇区。

The geometry command can report the disk access mode for bifurcate drives as
BIF instead of the conventional CHS or LBA.
geometry 命令可以用 BIF 代替常见的 CHS 和 LBA 来报告分支式驱动器的磁盘访问模式。

Known bifurcate drives. Virtual PC and some real machines are found to create
a bifurcate floppy drive when they boot from a floppy-emulation mode bootable
cdrom. The "geometry (fd0)" will show
已知的分子式驱动器。虚拟机Virtual PC和一些真实机器被发现当它们引导一个软盘模拟
模式的可启动光盘时会建立一个分支式的软驱。命令"geometry (fd0)"将显示:

    drive 0x00(BIF): C/H/S=...Sector Count/Size=.../512

and "geometry (0x100)" will show
而"geometry (0x100)"将显示

    drive 0x100(BIF): C/H/S=...Sector Count/Size=.../2048

Actually (0x100) can access the whole cdrom, you may "ls (0x100)/" and find
your files on the cdrom(not the files inside the booted floppy image). Of
course "ls (fd0)/" will list the files inside the booted floppy image.
实际上(0x100) 能访问整个光盘,你可以执行"ls (0x100)/" 然后在光盘上发现你的文件
(不是那个被引导的软盘映像中的文件)。当然 "ls (fd0)/"可以列举那些在被引导的
软盘映像中的文件。

Note that only some (real or virtual) machines have this action, others
will not produce bifurcate drives.
注意 仅仅是某些(真实的或虚拟的)机器有这样的行为,其他的机器不会产生分支式驱动器。


******************************************************************************
***                       GRLDR as PXE boot file                           ***
******************************************************************************
                          GRLDR 作为 PXE 启动文件

GRLDR can be used as the PXE boot file on a remote/network server. The (pd)
device is used to access files on the server. When GRLDR is booted through
network, it will use its preset menu as the config file. However, you may use
a "pxe detect" command, which acts the same way as PXELINUX:
GRLDR 可以被用作远程或网络服务器的 PXE 启动文件。(pd) 设备被用于访问服务器上文件。
当 GRLDR 已经通过网络启动后,它将使用预设菜单作为配置文件。不过,你可以使用
一条"pxe detect"命令,它的表现是和pxelinux一样的方式。

    * First, it will search for the config file using the hardware type (using
      its ARP type code) and address, all in hexadecimal with dash separators;
      for example, for an Ethernet (ARP type 1) with address 88:99:AA:BB:CC:DD
      it would search for the filename 01-88-99-AA-BB-CC-DD.
      首先,它将使用设备类型(使用它的 ARP 类型码)和地址来搜索配置文件,全部用
      破折号分割的十六进制;例如,对一个以太网(ARP 类型是1)的88:99:AA:BB:CC:DD
      地址,它会用文件名01-88-99-AA-BB-CC-DD 来搜索。

    * Next, it will search for the config file using its own IP address in
      upper case hexadecimal, e.g. 192.0.2.91 -> C000025B. If that file is not
      found, it will remove one hex digit and try again. At last, it will try
      looking for a file named default (in lower case). As an example, if the
      boot file name is /mybootdir/grldr, the Ethernet MAC address is
      88:99:AA:BB:CC:DD and the IP address 192.0.2.91, it will try following
      files (in that order):
      其次,它将使用它本地的大写字母的十六进制格式的IP 地址(即192.0.2.91 转换为
      C000025B。)来搜索配置文件。如果文件没有找到,它将去掉一个十六进制数字后再试一次


      最后,它会尝试寻找一个名为 default (小写字母)的文件。举个例,如果引导文件名
      是/mybootdir/grldr ,以太网 MAC 地址是88:99:AA:BB:CC:DD 并且 它的 IP 地址是
      192.0.2.91 ,它将尝试下面的文件 (用那样的顺序):

       /mybootdir/menu.lst/01-88-99-AA-BB-CC-DD
       /mybootdir/menu.lst/C000025B
       /mybootdir/menu.lst/C000025
       /mybootdir/menu.lst/C00002
       /mybootdir/menu.lst/C0000
       /mybootdir/menu.lst/C000
       /mybootdir/menu.lst/C00
       /mybootdir/menu.lst/C0
       /mybootdir/menu.lst/C
       /mybootdir/menu.lst/default

You cannot directly map an image file on (pd). You must map it in memory using
the --mem option. For example,
你不能在(pd)上直接映射一个映像文件。你必须使用--mem 选项将它映射到内存中。例如,

    map --mem (pd)/images/floppy.img (fd0)
    map --hook
    chainloader (fd0)+1
    rootnoverify (fd0)
    boot

One more example,
再例如,

    map --mem (pd)/images/cdimage.iso (0xff)
    map --hook
    chainloader (0xff)
    boot


******************************************************************************
***                       New program badgrub.exe                          ***
******************************************************************************
                          新程序 badgrub.exe

The new program badgrub.exe is intended to serve 'bad' machines(typically some
DELL models) that cannot run the normal grub.exe.
新程序 badgrub.exe 是特意供那些不能运行标准 grub.exe 的‘糟糕的’机器(一些典型
的 DELL 原型机)使用的。


******************************************************************************
***                           Conditional find                             ***
******************************************************************************
                              条件查找

The new find syntax allows to find a device conditionally.
新的find 命令的语法允许带条件的查找设备。

    find [OPTIONS] [FILENAME] [CONDITION]
              选项      文件名     条件

CONDITION is a normal grub command which returns TRUE or FALSE.
其中的 CONDITION 是一个返回值是 TRUE 或者 FALSE 的标准 grub 命令。

    Example 1:
        示例 1:
        find

    This will list all partitions, all floppies and the (cd).
        这会列举所有的分区,所有的软驱和 (cd) 。

    Example 2:
        示例 2:

        find +1

    This will list all devices with a known filesystem.
        这会列举文件系统已知的所有设备。

    Example 3:
        这会列举分区类型为0xAF的所有分区。

        find checkrange 0xAF parttype

    This will list all partitions with ID=0xAF.
        这会列举分区类型为0xAF的所有分区。

    Example 4:
        示例 4:

        find /ntldr checkrange 0x07 parttype

    This will list all partitions with ID=0x07 and existing /ntldr.
        这会列举分区类型为 0x07 且根目录存在 ntldr 的所有分区。


******************************************************************************
***                    How to build grldr boot images                      ***
******************************************************************************
                       怎样创建 grldr 引导的映像文件

1. build 1.44M floppy image ext2grldr.img
   创建1.44M 软盘镜像文件 ext2grldr.img

    dd if=/dev/zero of=ext2grldr.img bs=512 count=2880
    mke2fs ext2grldr.img
    mkdir ext2tmp
    mount -o loop ext2grldr.img ext2tmp
    cp default ext2tmp
    cp menu.lst ext2tmp
    cp grldr ext2tmp
    umount ext2tmp
    bootlace.com --floppy --chs --sectors-per-track=18 --heads=2 --start-sector=0 --

total-sectors=2880 ext2grldr.img

2. build 1.44M floppy image fat12grldr.img
   创建1.44M 软盘镜像文件 fat12grldr.img

    dd if=/dev/zero of=fat12grldr.img bs=512 count=2880
    mkdosfs fat12grldr.img
    mkdir fat12tmp
    mount -o loop fat12grldr.img fat12tmp
    cp default fat12tmp
    cp menu.lst fat12tmp
    cp grldr fat12tmp
    umount fat12tmp
    bootlace.com --floppy --chs fat12grldr.img

3. build iso9660 CDROM image grldr.iso
   创建 iso9660 文件系统的光盘镜像文件 grldr.iso

    mkdir iso_root
    cp grldr iso_root
    cp menu.lst iso_root
    mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso iso_root


******************************************************************************
***           Use bootlace.com to install partition boot record            ***
******************************************************************************
              使用 bootlace.com 来安装分区引导记录

Since bootlace.com has not implemented the --install-partition option, you
need to use the already implemented --floppy=PartitionNumber option instead.
在 bootlace.com 没有实现 --install-partition 选项之前,你需要用已实现的
--floppy=PartitionNumber 选项来替代。

Hear is a way you might want to follow:
这里是你可能需要遵从的方法:

Step 1. Get the boot sectors of the partition and save to a file MYPART.TMP.
        For NTFS, you need to get the beginning 16 sectors. For other type of
    filesystems, you only need to get one sector, but getting more sectors
    is also ok.
步骤 1. 获取分区的引导扇区然后保存为一个文件 MYPART.TMP 。对于 NTFS 文件系统,你需要获


        起始的16 个扇区。对于其他类型的文件系统,你只需要获取一个扇区,但获取多个扇区
        也是没问题的。

Step 2. Run this:
步骤 2. 执行这些命令:

    bootlace.com --floppy=Y --sectors-per-track=S --heads=H --start-sector=B --total-

sectors=C --vfat --ext2 --ntfs MYPART.TMP

    where we suppose MYPART.TMP is for (hdX,Y) and the partition number Y
    should be specified as in the --floppy=Y option.
        这里我们假定 MYPART.TMP 是从 (hdx,y) 获取的而且分区号 Y 必须在--floppy=Y 选项

中被指定。

    Note that for FAT12/16/32/NTFS partitions, you can omit these options:
        注意对于FAT12/16/32/NTFS等分区,你可以省略这些选项:

         --sectors-per-track, --heads, --start-sector, --total-sectors,
         --vfat and --ext2.

    For NTFS partitions, you must specify --ntfs option.
        对于 NTFS 分区,你必须指定 --ntfs 选项。

    For ext2 partitions, you can omit --vfat, --ntfs and --ext2 options,
    but other options should be specified.
        对于 ext2 分区,你可以省略 --vfat, --ntfs he --ext2 选项,但是其他选项必须被指

定。

Step 3. Put MYPART.TMP back on to the boot sector(s) of your original partition
    (hdX,Y).
步骤 3. 将 MYPART.TMP 写回你原来分区(hdx,y)的引导扇区。

Note: Only a few file systems(FAT12/16/32/NTFS/ext2/ext3) are supported by now.
注意:现在只有一些文件系统(FAT12/16/32/NTFS/ext2/ext3)被支持。

Note2: Under Linux you may directly write the partition. That is to say, Step
    1 and Step 3 are not needed. Simply use its device name instead of
    MYPART.TMP.
注意2:在Linux 下你可以对分区直接写。也就是说,步骤1 和步骤3 是不需要的。简单使用
       它的设备名代替 MYPART.TMP 即可。

Note3: grubinst has the feature of installing grldr boot code onto a partiton
    boot area.
注意3:grubinst 具有把 grldr 的自举代码安装到分区引导扇区的功能。

******************************************************************************
***                Use a single key to select menu item                    ***
******************************************************************************
                   使用一个单一的键来选择菜单项

Some machines have a simplified keyboard. The keyborad might have only the
number keys 0 .. 9 plus a few other keys. When the menu displayed, the user
can strike a key for 8 times. When the menu handler detects the continuous
single keypress, it will assume the user want to use this key to select a menu
item and boot. This single key will act as the RIGHT-ARROW key for the user to
select a menu item. And 5 seconds later after the user stops the keypress,
the selected menu item will automatically boot. Any normal keys can be used as
a single key for this purpose, except for a few functional keys like b, e,
Enter, etc. Once another key is pressed, the feature of Single-Key-Selection
will disappear immediately.
一些机器具有简化的键盘。这些键盘可能只有数字键 0 到 9 ,外加少数几个其他键。当
菜单还未显示时,使用者可以按下某个键 8 次。当菜单控制模块发现一个连续的单一按
键时,它将认为使用者希望使用这个键来选择菜单和启动。这个单一的键可以充当右方向
键来为使用者选择菜单。然后在使用者停止按键的 5 秒之后,被选择的菜单项将自动启
动。任何的标准键可以被作为单一的键来达到这个目的,除了少数功能键,比如 b ,e ,
回车键,等等。一旦另外的键被按下,单键选择特性将立即消失。


******************************************************************************
***             Parameter file for bootlace running under DOS              ***
******************************************************************************
                DOS 中 bootlace 的参数文件

You may move all or part of the command-line arguments into a file. The file
can have multi lines. Just like SPACEs and TABs, the CRs and LFs can also
delimit the commandline arguments in the parameter file.
你可以把所有或部分的命令行参数移动到一个文件中。这个文件可以有多行。就像空格
和制表符一样,回车符和换行符也可以在参数文件中分割命令行参数。

Example:
示例:

        bootlace < my_parafile
        bootlace --read-only my_mbr < my_other_options

Note:    Pipes do not work. You have to use the input-redirection operator(<).
注意:  管道不能使用。你必须使用输入重定向符 (<) 。

******************************************************************************
***                  Use bootlace to create a triple MBR                   ***
******************************************************************************
                     使用 bootlace 来建立一个三重的 MBR

This is typically used for USB drives, though it also works with hard drives.
虽然这也能用于硬盘,但是它典型的使用是被用于 USB 设备。

Steps to create triple MBR:
创建三重的 MBR 的步骤:

1. Do a fresh FDISK to create a FAT12/16/32 partition starting at sector 95
(in LBA, that is, the begginning sector(MBR) is sector 0).
1. 使用一个新版的 FDISK 分区软件来建立一个从第 95 扇区开始的FAT12或16或32 的分区
(这里是 LBA 扇区表示法,起始扇区(MBR)是 0 扇区。)

2. Install grldr boot sector onto the boot sector of this partition. See
section "Use bootlace.com to install partition boot record" above.
2. 安装 grldr 的引导扇区到这个分区的引导扇区。参见上面的“使用 bootace.com
来安装分区引导记录”

3. Get 96 sectors of the drive starting at sector 0(MBR), and save to file
MYMBR96.TMP.
3. 获取从起始扇区 0 扇区(MBR)开始的96个扇区,然后保存到一个文件 MYMBR96.TMP 中。

4. Run bootlace.com:
4. 运行 bootlace.com:

    bootlace.com MYMBR96.TMP

5. Put MYMBR96.TMP back onto the drive starting at MBR(sector 0).
5. 将 MYMBR96.TMP 从MBR (0 扇区)开始写回到驱动器上。

Note: If the drive already has a triple MBR, then bootlace will cancel it
and restore the original partition layout.
注意: 如果驱动器已经是一个三重的 MBR ,那么 bootlace 会删除它并且恢复为原本的分区布局

******************************************************************************
***                    Use 'pxe detect' in preset-menu                     ***
******************************************************************************
                       在预置菜单中使用 'pxe detect' 命令

Now the "pxe" command has a new subcommand "detect":
现在“pxe”命令有了个新的子命令“detect”:

        pxe detect [BLOCK_SIZE] [MENU_FILE]
                            包大小选项   菜单文件选项

BLOCK_SIZE specifies the block size for PXE. If it is not specified or it is
0, then grub4dos will go through a probing process and get a proper value
for data transfer.
BLOCK_SIZE 选项指定出 pxe 的包大小。如果它没有被指定或者是被指定为 0 ,那么
grub4dos将通过一个侦测过程来获取数据传送包的一个恰当的的值。

MENU_FILE specifies the config file on the PXE server. If omitted, a standard
config file in the menu.lst sub-dir will gain control. For a description on
the config files in the menu.lst sub-dir, please refer to the section
"GRLDR as PXE boot file" above.
MENU_FILE 选项指定出 PXE 服务器上的配置文件。如果它被省略,在 menu.lst 子目录
中的标准配置文件将获得控制。关于menu.lst 子目录中的配置文件的描述,请查阅上面
的“用 GRLDR 作为 PXE 引导文件”一节。

If MENU_FILE starts in a "/", then the MENU_FILE on the PXE server will gain
control, else(if MENU_FILE does not start in a "/") no menu will be executed.
如果MENU_FILE 是以"/"开始的,那么PXE 服务器上的 MENU_FILE 将获得控制,否则
(如果MENU_FILE不是以"/"开始)将没有菜单被执行。

Normally you want to use a "pxe blksize ..." or a "pxe detect ..." command
before you access the (pd) device, since the default blocksize of 512 might
not work on your system.
在你的系统可能用 512 字节的默认包大小不能运行时,通常你应该在访问(pd)设备之前
使用一条 "pxe blksize ..." 或 一条 "pxe detect ..."命令。

******************************************************************************
***                    Use 'configfile' in preset-menu                     ***
******************************************************************************
                       在预置菜单中使用 'configfile'命令

Now the preset menu holds the highest priority. It will gain control prior to
the menu.lst on the boot device. If a 'configfile' command occurs in the menu
init command group, then control will go to the menu.lst on the boot device.
现在预置菜单持有最高控制权。它将在启动设备上的 menu.lst 之前获得控制。如果
'configfile' 命令在初始化命令组中出现,那么控制将转到启动设备上的menu.lst文件。


******************************************************************************
***                    New command 'dd' to copy files                      ***
******************************************************************************
                       复制文件的新命令 'dd'

Usage:
用法:

    dd if=IF of=OF [bs=BS] [count=C] [skip=IN] [seek=OUT]

Copy file IF to OF. BS is blocksize in bytes, default to 512. C is blocks to
copy, default is total blocks in IF. IN specifies number of blocks to skip
when read, default is 0. OUT specifies number of blocks to skip when write,
default is 0. Skipped blocks are not touched. Both IF and OF must exist.
将 IF(源文件)复制到OF (目标文件)中。BS 是以字节计数的一个块的大小,默认
值是512 。C 是复制的块数,默认值是源文件中的总块数。IN 指定在读取时跳过的块
数,默认值是 0 。OUT 指定在写入时跳过的块数,默认值是0 。已跳过的块不会被改
变。源文件和目标文件必须是存在的。

Both IF and OF must have a leading device name, i.e.,  of the form `(...)'.
You may use `()' for the current root device.
源文件和目标文件必须以设备名开头,即,`(...)'的格式。对于当前根设备你应该使用`()'。

dd can neither enlarge nor reduce the size of OF, the leftover tail of IF
will be discarded. OF cannot be a gzipped file. If IF is a gzipped file,
it will be decompressed automatically when copying.
dd 命令既不扩大也不减小目标文件的大小,源文件尾部剩余的部分将被丢弃。目标
文件不能是gzip压缩过的文件。如果源文件是gzip 压缩过的文件,它将在复制时被
自动解压。

dd is dangerous, use at your own risk. To be on the safe side, you should
only use dd to write a file in memory.
dd 具有危险性,使用风险由你自己的承担。作为一种安全方面的考虑,你应当只使
用 dd 来写入一个内存中的文件。

In some cases when writing a file in NTFS, dd might fail.
某些情况下在写入NTFS 中的文件的时,dd 可能会失败。

If you attempt to write a device or a block file that is not in memory by
starting dd in a menu, you will safely be refused :-) (Update: no restrictions
now)
假如你尝试在菜单中执行dd命令来写入一个不是内存中的设备或者块文件时,你会被安全的拒绝:

-)
(更新:现在不再限制)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!!
!!!!    Caution! Both IF and OF can be a device name which stands for     !!!!
!!!!    all the sectors on the device. Take utmost care!                  !!!!
!!!!______________________________________________________________________!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        警告!IF 和 OF 都可以是一个设备名,即它代表了设备上全部的扇区。慎之又慎!

******************************************************************************
***              New command 'uuid' to identify partitions                 ***
******************************************************************************
                 确认分区的新命令 'uuid'

Usage:
用法:

    uuid [DEVICE] [UUID]

If DEVICE is not specified, search for filesystem with UUID in all partitions
and set the partition containing the filesystem as new root (if UUID is
specified), or just list uuid's of all filesystems on all devices (if UUID is
not specified). If DEVICE is specified, return true or false according to
whether or not the DEVICE matches the specified UUID (if UUID is specified),
or just list the uuid of DEVICE (if UUID is not specified).
如果 DEVICE 选项未被指定,将在所有分区中搜索指定的 UUID 号的文件系统,
然后把包含这个文件系统的分区设置为新的根 (如果 uuid 被指定时),或者只列举所
有设备上的文件系统的 uuid 号(如果 uuid 未被指定时)。
如果 DEVICE 选项被指定了,将返回 真 或 假 ,对应于指定的设备是否与指定的 UUID
号相符(如果uuid被指定时),或者仅仅列举指定设备的uuid 号(uuid 未被指定时)。

Example 1:
示例 1:

    find --set-root uuid () 7f95820f-5e33-4e6c-8f50-0760bf06d79c

which will find a partition with uuid=7f95820f-5e33-4e6c-8f50-0760bf06d79c
and set the partition as root if found.
这将查找 uuid 等于 7f95820f-5e33-4e6c-8f50-0760bf06d79c的分区,然后将这个发
现的分区设置为根。

Example 2:
示例 2:
    uuid ()

which will print the uuid of the current root device.
这将显示当前根设备的 uuid 号。


******************************************************************************
***                     gfxmenu support in grub4dos                        ***
******************************************************************************
                        grub4dos 的 gfxmenu 支持

Gfxmenu support has been added to grub4dos. To use it, you must first find the message

file you need, then load it in menu.lst with command like this:
gfxmenu 支持已经被增加到 grub4dos 中。要使用这个功能,你首先需要找到一个你需要的mesage

文件,然后在menu.lst中用类似这样的命令来装载它:

    gfxmenu /message

This should be a gloabl command, that is, not inside any menu item. Also, it can only

be used in configure file, running it in console mode does not work.
这是一个全局命令,也就是说,不能放入任何的菜单项中。同时,它只能被使用于配置文件中,而

在控制台模式中执行它是无效的。

gfxmenu does not work in conjunction with the password feature.
gfxmenu 不能与全局密码保护功能同时使用。

There are two major format of message file. Old format is created with gfxboot 3.2.*

or older (size of message file is normally about 150K), while new format is created

with gfxboot 3.3.* and later (size of message file is normally above 300K). Both

format are supported in grub4dos.
message 文件有两个主要的格式。老的格式是通过gfxboot 3.2.*版或更旧的版本创建的(message

文件的大小通常只能是150K),而新格式则通过 gfxboot 3.3 版或更新的版本创建(message文件

的大小通常可以超过 300K)。这两种格式在grub4dos 中都已被支持。


******************************************************************************
***           Use 'write' to write a string into a device or file          ***
******************************************************************************
               使用 'write' 命令将字符串写入设备或文件中

Usage:
用法:

    write [--offset=SKIP] ADDR_OR_FILE INTEGER_OR_STRING

SKIP is an integer and defaults to 0.
SKIP 是一个整数并且默认值是 0 。

If ADDR_OR_FILE is an integer, then it is treated as a memory address, and
INTEGER_OR_STRING must be an integer value. The integer INTEGER_OR_STRING
will be written to address (ADDR_OR_FILE + SKIP).
如果 ADDR_OR_FILE选项 被指定为一个整数,那么它被作为一个内存地址对待,并且
INTEGER_OR_STRING选项必须被指定为一个整数值。整数 INTEGER_OR_STRING 将被写
入(ADDR_OR_FILE 加上 SKIP 值)的地址处。

If ADDR_OR_FILE is a device or a file, then INTEGER_OR_STRING is treated as
a string which will be written to ADDR_OR_FILE at offset SKIP (in bytes).
如果 ADDR_OR_FILE选项 指定的是一个设备或一个文件,那么INTEGER_OR_STRING 选
项将被作为一个字符串对待,它将被写入跳过 SKIP 个字节(字节计数)的指定的设
备或文件当中。

The string is quoted with nothing, that is, neither with the single quote
char(') nor with the double quote char(").
字符串不被任何东西引用,也就是说,不用单引号(') 也不用 双引号(") 来引用它。

Space char must be quoted with back slash(\). (Update: need not now)
空格符必须被反斜杠(\)引用。(更新:现在不需要了)
(译注:如果字符串以空格开头,开头的这个空格符还是需要反斜杠引用)

Single quote char(') and double quote char(") are not interpreted specially
and can be used directly in the string.
单引号(')和双引号(")不用特别说明并且可以直接使用到字符串中。

Some C-style quote sequences are interpreted as follows:
下面是一些 C 语言风格的引用序列说明:

    \NNN    character with octal value NNN (1 to 3 digits)
                (1到3位)八进制值 NNN 表示的字符

    \\    backslash
                反斜杠

    \a    alert (BEL)
                警报 (声音)

    \b    backspace
                退格符

    \f    form feed
                换页符

    \n    new line
                换行符

    \r    carriage return
                回车符

    \t    horizontal tab
                水平制表符

    \v    vertical tab
                垂直制表符

    \xHH    byte with hexadecimal value HH (1 to 2 digits)
                (1到2位)十六进制值为 HH 的字节

Just like dd, the write can neither enlarge nor reduce the size of the
destination file, the leftover tail of the string will be discarded.
The destination file cannot be a gzipped file.
就像 dd 命令一样,write 命令既不扩大也不缩小目标文件的文件大小,字符串的
剩余部分将被丢弃。目标文件不能是一个gzip 压缩过的文件。

Again like dd, the write command is also dangerous, use at your own risk.
And to be on the safe side, you should only write to memory files.
还是和 dd 类似,write 命令也具有危险性,使用风险你自己承担。作为一种安全
方面的考虑,你应当只向内存中的文件写入。

In some cases when writing a file in NTFS, the write might fail.
某些情况下当写入 NTFS 中的文件时,write命令可能失败。

If you attempt to write a device or a block file that is not in memory by
using write in a menu, you will safely be refused :-) (Update: no restrictions
now)
假如你尝试在菜单中执行 write 命令来写入一个不是内存中的设备或者块文件时,
你会被安全的拒绝:-) (更新:现在不再限制)


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!!
!!!!    Caution! The file to write can be a device name which stands      !!!!
!!!!    for all the sectors on the device. Take utmost care!              !!!!
!!!!______________________________________________________________________!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        警告!被write 命令写入的文件可以是一个设备名,即它代表了设备上的所有
        扇区。慎之又慎!


******************************************************************************
***                 Item-by-item help text for menu entries                ***
******************************************************************************
                    为菜单项添加帮助文字

The help message at the bottom of the screen will vary as you choose the menu.
当你选择一个菜单项时,屏幕底部的帮助文字将发生变化。

You may append your help text to the title line. The help text must begin
with "\n", for example:
你可以在标题行中添加你的帮助文字。帮助文字必须用"\n" 开头,示例:

    title This is the title\nThis is the help text.\nAnd this is the 2nd line of the

help text.

Some C-style quote sequences are interpreted as stated in the section above.
一些 C 语言风格的引用符号在前述章节做了说明。


******************************************************************************
***        initrd can load multiple cpio files for Linux 2.6 kernels       ***
******************************************************************************
           inird 命令可以为Linux 2.6 核心装载多个cpio 格式的文件

Usage:
用法:

    initrd FILE [FILE ...]

Note 1: You should not load more than one oldstyle disk images in this way,
because this is not supported by Linux kernel.
注意 1:你不能用这种方法装载多于一个的老式的磁盘镜像,原因是Linux 核心不支持。

Note 2: The FILEs should be specified in the same order as with syslinux.
注意 2:其中的 FILE 具有在syslinux 中使用时同样的规定。

******************************************************************************
***            access some internel variables at a fixed location          ***
******************************************************************************
               在固定位置访问一些内部变量

Address        Length        Description
地址            长度            说明
=========    ========    ==============================================
0000:8208    4 (DWORD)    install_partition (the boot partition)
                4字节(即双字) 启动分区号

0000:8280    4 (DWORD)    boot_drive (the boot drive)
                4字节(即双字) 启动驱动器号

0000:8284    4 (DWORD)    pxe_yip (your ip)
                4字节(即双字) pxe 客户端 ip (即本地ip)

0000:8288    4 (DWORD)    pxe_sip (server ip)
                4字节(即双字) pxe 服务器 ip

0000:828C    4 (DWORD)    pxe_gip (gateway ip)
                4字节(即双字) pxe 网关 ip

0000:8290    8 (QWORD)    filesize (file size by last "cat --length=0")
                8字节(即四字)   最后访问的文件的大小(是执行"cat --length=0"后的文件

大小)

0000:8298    4 (DWORD)    saved_mem_upper (extended memory size in KB)
                4字节(即双字) 可用的扩展内存大小( 扩展内存大小以 KB 为单位 )

0000:829C    4 (DWORD)    saved_partition (current root partition)
                4字节(即双字) 当前根分区号

0000:82A0    4 (DWORD)    saved_drive (current root drive)
                4字节(即双字) 当前根所在的驱动器

0000:82A4    4 (DWORD)    no_decompression (no auto gunzip)
                4字节(即双字) 未解压大小 (gzip非自动解压)

 

Note 1: Filesize can be initialised/modified by using "cat --length=0 FILE".
注意 1:Filesize 可以通过执行 "cat --length=0 FILE" 来初始化和修改。

Note 2: You should not write these variables by hand(should read only).
注意 2:你不要自己改写这些变量(应该只是读取)。

Note 3: You may use 1K at 6000:0000 for your own varibles(See note 4).
注意 3:你可以使用内存地址6000:0000开始的 1K空间作为你自己的变量区(参见注意4)。

Note 4: The read command now returns the integer value at the given address.
注意 4:read 命令现在从指定的地址处返回整数值。

Note 5: Grub4dos does not have the variable expansion feature. You can only
    use integer variables. You need not declare them, but use the memory
    address directly. Usually you want to use variables as a logical
    value or in a command for conditional test, e.g., of this form:
         "checkrange RANGE read ADDR"
注意 5:grub4dos 还没有变量扩展的功能。你只能使用整数变量。你不需要申明它们,就
        可以直接使用这些内存地址。通常你需要通过一个逻辑值或者一个条件测试命令
        来使用这些变量,即,类似这种格式:


******************************************************************************
***            possibility to run another menu.lst after gfxmenu           ***
******************************************************************************
               在 gfxmenu 后运行另外的 menu.lst

Notice the use of CONFIGFILE after GFXMENU in the following example:
注意下面是在 GFXMENU 之后使用 CONFIGILE 的示例:

    # The menu.lst file for gfxmenu
    default=0
    timeout=5
    gfxmenu /message
    configfile /another.lst
    title 0..........
    ................
    title 1..........
    ................
    title 2..........
    ................
    # End of menu.lst

    # Begin another.lst
    default=0
    timeout=5
    title 0..........
    ................
    title 1..........
    ................
    title 2..........
    ................
    # End of another.lst

This will try gfxmenu command first. On exit(or on failure) control will go
to another.lst file.
这会首先尝试执行 gfxmenu 命令。当它退出时(或者失败时)控制会转到 another.lst 文件。


******************************************************************************
***                   a range of drives can be unmapped                    ***
******************************************************************************
                      一个驱动器域可以被反映射

Usage:
用法:

    map --unmap=RANGE

RANGE is a range of BIOS drive numbers to be unmapped. BIOS drive number 0
is for the first floppy, 1 is for the second floppy; 0x80 is for the first
hard drive, 0x81 is for the second hard drive, etc; virtual cdrom (hd32)
corresponds to BIOS drive number 0xA0, (hd33) corresponds to 0xA1, etc.
其中的 RANGE 是一个已被映射的 BIOS 驱动器域。BIOS 驱动器号 0 表示第一软驱,1 表示
第二软驱;0x80 表示第一硬盘,0x81 表示第二硬盘,等等;虚拟光盘(hd32) 对应于
BIOS 驱动器号 0xA0 ,(hd33) 对应于0xA1 ,等等。

For description on RANGE, please refer to section `The New Command CHECKRANGE'
above.
关于RANGE 的说明,请参阅前述的“新命令 CHECKRANGE ”这节。

Example 1:
示例 1:

    map --unmap=0,0x80,0xff

This will unmap virtual floppy (fd0), virtual hard drive (hd0) and virtual
cdrom (0xff).
这将反映射虚拟软驱 (fd0),虚拟硬盘(hd0)和虚拟光盘(0xff)。

Example 2:
示例 2:

    map --unmap=0:0xff

This will unmap all virtual floppies, all virtual hard drives and all virtual
cdroms.
这将反映射所有的虚拟软驱,所有的虚拟硬盘和所有的虚拟光盘。

Note 1: Normally a `map' command will add an item in the drive map table for
    a virtual drive. But `--unmap' means items in the drive map table
    (for the specified virtual drives) will be deleted.
注意 1:通常,一条‘map’命令将在驱动器映射表中为虚拟驱动器增加一个表项。而
        ‘--unmap’意味着在驱动器映射表中(具体是指虚拟驱动器)的表项会被删除。

Note 2:    The --unhook option only breaks the INT13 hook(to the inerrupt
    vector table). It will not affect the drive map table. And later on
    execution of a `boot' command, the INT13 disk emulation routine will
    automatically get hooked(to the interrupt vector table) when needed
    (e.g., the drive map table is non-empty) even if it has been unhooked.
注意 2:--unhook 选项仅仅是断开 INT13 的挂钩(在中断矢量表中)。它不会影响到驱
        动器映射表。而且在执行了一个‘boot’命令之后,即使是它已经被反映射了的
        时候,INT13磁盘仿真程序也会在需要的时候(即,驱动器映射表非空时)自动建立挂钩

Note 3: Usually you want to do a `map --rehook' after you have changed the
    drive map table.
注意 3:通常你需要在已经改变了驱动器映射表之后执行一条`map --rehook'命令。


******************************************************************************
***                         geometry tune and sync                         ***
******************************************************************************
                            磁盘几何参数的修正和同步

When a USB storage device is connected to a (or another) machine, the geometry
in the partition table or in the BPB of the volume could be invalid, and the
machine could hang at boot time. So you need to find out the correct geometry
for the drive (use `geometry --tune'), and then update the geometry in
partition table and BPB of the drive(use `geometry --sync').
当一个USB 存储设备被连接到一台(或者是不同的)机器上时,分区表中或 BPB 中的磁盘
几何参数值可能是无效的,并且这个机器可能在启动时死机。因此你需要为驱动器找到一个
正确的磁盘几何参数(使用 `geometry --tune'),然后更新分区表或 BPB 中的磁盘
几何参数(使用`geometry --sync')。

The above steps are required if you are going to boot DOS, because DOS
requires the right geometry in the partition table and BPB. Windows/Linux may
also require it, since the boot process could run in real-mode.
假如你想启动到DOS,以上的步骤是需要的,因为 DOS 要求有正确的磁盘几何参数在分区
表和BPB 中。Windows 及 Linux 也这样要求,因为引导进程的一部分会运行在实模式中。

 

posted @ 2009-11-26 08:16  随便取个名字算了  阅读(2346)  评论(0编辑  收藏  举报