10 GRUB image files
*******************
10 GRUB镜像文件
GRUB consists of several images: a variety of bootstrap images for starting GRUB in various ways, a kernel image, and a set of modules which are combined with the kernel image to form a core image. Here is a short overview of them.
GRUB包含若干镜像文件:用来启动GRUB的各种引导镜像文件、一个内核镜像文件和 由一系列内核组件与内核镜像文件组成的核心镜像。 在这里对这些文件做个概况:
'boot.img'
On PC BIOS systems, this image is the first part of GRUB to start.It is written to a master boot record (MBR) or to the boot sector of a partition. Because a PC boot sector is 512 bytes, the size of this image is exactly 512 bytes.
The sole function of 'boot.img' is to read the first sector of the core image from a local disk and jump to it. Because of the size restriction, 'boot.img' cannot understand any file system structure, so 'grub-setup' hardcodes the location of the first sector of the core image into 'boot.img' when installing GRUB.
"boot.img"
在个人电脑BIOS系统中,这文件是GRUB开始启动执行的第一部分。 它一般被写入MBR中,或者被写入一个分区的启动扇区中。由于个人电脑的启动扇区只有512字节, 所以,这文件的大小也是512字节。 "boot.img"的唯一功能是从一个本地磁盘中的核心镜像文件中读取第一个扇区并且把控制转移给它。 由于大小限制,"boot.img"不能理解任何文件系统结构,所以,在安装GRUB的时候,"grub-setup"把核心 镜像文件第一扇区的地址写入"boot.img"中。(地址不会轻易改变)
'diskboot.img'
This image is used as the first sector of the core image when booting from a hard disk. It reads the rest of the core image into memory and starts the kernel.Since file system handling is not yet available, it encodes the location of the core image using a block list format.
"diskboot.img"
当从一个硬盘中启动时,这个镜像文件被用作核心镜像文件的第一个扇区。它读取剩余的核心镜像 文件并且启动内核。因为对文件系统的操作还不可用,它使用 block list format 解码(有疑虑)核心镜像文件 的地址。
'cdboot.img'
This image is used as the first sector of the core image when booting from a CD-ROM drive. It performs a similar function to 'diskboot.img'.
"cdboot.img"
当从CD-ROM驱动器启动时,这个镜像文件被当作核心镜像文件的第一个扇区。它和"diskboot.img"起 相似的作用。
'pxeboot.img'
This image is used as the start of the core image when booting from the network using PXE. *Note Network.
'pxeboot.img"
当通过预启动执行环境从网络启动时,这个镜像文件被当作核心镜像文件的开始。
'lnxboot.img'
This image may be placed at the start of the core image in order to make GRUB look enough like a Linux kernel that it can be booted by LILO using an 'image=' section.
“lnxboot.img"
如果这个镜像文件被安置在核心镜像文件的开始,它会使GRUB更像一个linux内核,并且通过使用 (这块没想到太好的翻译),可以被LILO启动。
'kernel.img'
This image contains GRUB's basic run-time facilities: frameworks for device and file handling, environment variables, the rescue mode command-line parser, and so on. It is rarely used directly, but is built into all core images.
"kernel.img"
这个镜像文件包含GRUB的基础的运行设施:管理设备和文件的机制、环境变量、救援模式下的命令行 解析器等等。它很少直接被使用,但是所有的核心镜像都包含它。
'core.img'
This is the core image of GRUB. It is built dynamically from the kernel image and an arbitrary list of modules by the 'grub-mkimage' program. Usually, it contains enough modules to access '/boot/grub', and loads everything else (including menu handling, the ability to load target operating systems, and so on) from the file system at run-time. The modular design allows the core image to be kept small, since the areas of disk where it must be installed are often as small as 32KB.
"core.img"
这是GRUB的核心镜像文件。它能够被"grub-mkimage"程序由内核镜像文件和一系列任意的模块动态地 建立。 通常,它包含足够的模块使它能到达“/boot/grub”文件夹,并且能在运行时载入文件系统中的其他任何东西(包含菜单管理,加载目标操作系统等等)。模块化的设计允许内核镜像很小,因此,在磁盘中它们必须安装在32KB那么小的区域里。
*Note BIOS installation: for details on where the core image can be installed on PC systems.
*注意*BIOS安装:在一些复杂的情况下内核镜像可能被安装到PC的系统里。
'*.mod'
Everything else in GRUB resides in dynamically loadable modules. These are often loaded automatically, or built into the core image if they are essential, but may also be loaded manually using the 'insmod' command (*note insmod).
"*.mod"
GRUB中的任何其他东西都动态地存在于可加载的模块中。他们经常被动态地加载,或者当他们必不可少时会被加入核心镜像中,而且,也可以使用命令“ismod”手工地加载。
For GRUB Legacy users
=====================
对于GRUB Legacy用户
GRUB 2 has a different design from GRUB Legacy, and so correspondences with the images it used cannot be exact. Nevertheless, GRUB Legacy users often ask questions in the terms they are familiar with, and so here is a brief guide to how GRUB 2's images relate to that.
GRUB2的设计不同于GRUB Legacy,所以它们使用的镜像文件不可能准确对应。然而,GRUB Legacy用户经常询问在这个方面它们有什么相似。所以,在下面这个简短的手册中列出它们的镜像文件之间的联系。
'stage1'
Stage 1 from GRUB Legacy was very similar to 'boot.img' in GRUB 2, and they serve the same function.
GRUB Legacy中的“Stage 1”和GRUB 2中的“boot.img”非常相似,并且他们提供相同的功能。
'*_stage1_5'
In GRUB Legacy, Stage 1.5's function was to include enough filesystem code to allow the much larger Stage 2 to be read from an ordinary filesystem. In this respect, its function was similar to 'core.img' in GRUB 2. However, 'core.img' is much more capable than Stage 1.5 was; since it offers a rescue shell, it is sometimes possible to recover manually in the event that it is unable to load any other modules, for example if partition numbers have changed. 'core.img' is built in a more flexible way, allowing GRUB 2 to support reading modules from advanced disk types such as LVM and RAID.
GRUB Legacy could run with only Stage 1 and Stage 2 in some limited configurations, while GRUB 2 requires 'core.img' and cannot work without it.
“*_stage1_5”
在GRUB Legacy中,Stage 1.5的功能是包含足够的文件系统代码让更大的Stage 2可以从一个一般的文件系统中被读取出来。在这个方面,它的功能类似于GRUB2中的“core.img”。然而,“core.img”比Stage 1.5更加强大。自从它提供一个拯救模式的shell之后,在你的分区编号被改变的情况下,你不能加载任何模块,这时,通过它也可能被手动地恢复。“core.img”以一中灵活的方式建立,允许GRUB2从例如LVM和RAID高级的磁盘类型中读取模块。
GRUB Legacy可以只运行Stage 1和Stage 2以一种限制的方式,然而,GRUB 2必须要“core.img”,并且没有它不能运行。
'stage2'
GRUB 2 has no single Stage 2 image. Instead, it loads modules from '/boot/grub' at run-time.
"stage2"
GRUB2没有单独的“Stage 2”镜像。取而代之,它运行时从“/boot/grub”中加载模块。
'stage2_eltorito'
In GRUB 2, images for booting from CD-ROM drives are now constructed using 'cdboot.img' and 'core.img', making sure that the core image contains the 'iso9660' module. It is usually best to use the 'grub-mkrescue' program for this.
“stage2_eltorito”
在GRUB2中,从CD-ROM驱动器启动的镜像文件由“cdboot.img”和“core.img”创建,确保内核镜像文件中包含 “iso9660”模块。它通常最好是使用"grub-mkrescue"程序来实现这些。
'nbgrub'
There is as yet no equivalent for 'nbgrub' in GRUB 2; it was used by Etherboot and some other network boot loaders.
“nbgrub”
在GRUB2中没有与“nbgrub”对应的。“nbgrub”在利用以太网或其他一些网络启动器启动时会被用上。
'pxegrub'
In GRUB 2, images for PXE network booting are now constructed using 'pxeboot.img' and 'core.img', making sure that the core image contains the 'pxe' and 'pxecmd' modules. *Note Network::.
“pxegrub”
在GRUB2中,用于PXE网络启动的镜像文件由“pxeboot.img”和“core.img”创建,确保内核镜像文件中包含 “pxe”和“pxecmd”模块。
GRUB2官方文档翻译项目2-10
-
- 帖子: 56
- 注册时间: 2011-11-01 14:22
-
- 帖子: 29
- 注册时间: 2013-10-16 12:43
- 系统: ubuntu 12.04
-
- 帖子: 29
- 注册时间: 2013-10-16 12:43
- 系统: ubuntu 12.04