GRUB2官方文档翻译项目2-01

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
kin3z
帖子: 56
注册时间: 2011-11-01 14:22

GRUB2官方文档翻译项目2-01

#1

帖子 kin3z » 2015-04-22 14:51

这是初译(很糟糕),所以需要各位帮忙。可以到项目里修改,或跟帖指出。

1 Introduction to GRUB
1 介绍GRUB
**********************

1.1 Overview
1.1 概述
============

Briefly, a "boot loader" is the first software program that runs when a computer starts. It is responsible for loading and transferring control to an operating system "kernel" software (such as Linux or GNU Mach).The kernel, in turn, initializes the rest of the operating system (e.g.a GNU system).
简单地说,一个启动加载器是电脑启动时所运行的第一个软件程序,它是负责加载读入与转移控制权给操作系统内核的软件(例如Linux或GNU)。这个内核,依次往下,初始化剩下的操作系统。

GNU GRUB is a very powerful boot loader, which can load a wide variety of free operating systems, as well as proprietary operating systems with chain-loading(1) (*note Overview-Footnote-1::). GRUB is designed to address the complexity of booting a personal computer; both the program and this manual are tightly bound to that computer platform,although porting to other platforms may be addressed in the future.
GNU GRUB是非常强大的启动载入器,它能够加载品种繁多的免费(free)操作系统,同样地通过链式加载器而能够加载有版权保护的操作系统。GRUB旨在引导个人电脑的复杂性;这个程序和本手册是紧密地绑定到计算机平台上的,虽然移植到另一些平台或许会在不久的将来解决。

One of the important features in GRUB is flexibility; GRUB understands filesystems and kernel executable formats, so you can load an arbitrary operating system the way you like, without recording the physical position of your kernel on the disk. Thus you can load the kernel just by specifying its file name and the drive and partition where the kernel resides.
GRUB其中一个重大的特点是灵活性;GRUB懂得理解文件系统和内核可执行文件格式,所以你能加载你喜欢的任意的系统,甚至乎内核保存在你物理硬盘的位置以外。因此你能够通过指定文件名和存放它的驱动器与分区位置去加载内核。

When booting with GRUB, you can use either a command-line interface (*note Command-line interface::), or a menu interface (*note Menu interface::). Using the command-line interface, you type the drive specification and file name of the kernel manually. In the menu interface, you just select an OS using the arrow keys. The menu is based on a configuration file which you prepare beforehand (*note Configuration::). While in the menu, you can switch to the command-line mode, and vice-versa. You can even edit menu entries before using them.
当GRUB启动后,你能使用其中的命令行接口,或一个菜单接口。你通过打字使用技术参数和文件名去手动控制内核。在菜单接口,你能从箭头选择键直接选择启动系统。这个菜单是基于你之前准备的那个配置文件而成。当你在菜单下,可以转换到命令行模式,或反之亦然。你甚至能够在使用菜单条目之前去编辑它。

In the following chapters, you will learn how to specify a drive, a partition, and a file name (*note Naming convention::) to GRUB, how to install GRUB on your drive (*note Installation::), and how to boot your OSes (*note Booting::), step by step.
在接下来的章节,你将学习如何在GRUB里去指定一个驱动器,一个分区,和一个文件名,如何去安装GRUB到你的硬盘,和如何去引导你的系统,一步一步来。

1.2 History of GRUB
1.2 GRUB的历史
===================

GRUB originated in 1995 when Erich Boleyn was trying to boot the GNU Hurd with the University of Utah's Mach 4 microkernel (now known as GNU Mach). Erich and Brian Ford designed the Multiboot Specification (*note Multiboot Specification: (multiboot)Top.), because they were determined not to add to the large number of mutually-incompatible PC boot methods.
GRUB起源于1995年当时就读大学的Erich Boleyn想从Utah's Mach4微核心中尝试启动GNU Hurd。Erich与Brian通过设计出多重启动技术规范,因为他们决定坚决不添加那些大量的,相互不兼容的PC启动方式。

Erich then began modifying the FreeBSD boot loader so that it would understand Multiboot. He soon realized that it would be a lot easier to write his own boot loader from scratch than to keep working on the FreeBSD boot loader, and so GRUB was born.
Erich之后开始修改FreeBSD引导加载器让其去兼容多重启动。他很快意识到他自己需要编写一个更容易更简单的引导加载程序,而不是继续坚持工作在FreeBSD的引导加载器上,因此GRUB诞生了。

Erich added many features to GRUB, but other priorities prevented him from keeping up with the demands of its quickly-expanding user base. In 1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an official GNU package, and opened its development by making the latest sources available via anonymous CVS. *Note Obtaining and Building GRUB::, for more information.
Erich给GRUB添加了很多特点,但另一方面他也因为要优先处理重点问题而无法满足速度扩大的用户群需求。到了1999年,Gordon Matzigkeit和Yoshinori K.Okuji采用GRUB作为一个官方的GNU软件包,并通过CVS开放它的项目去发展更新。


Over the next few years, GRUB was extended to meet many needs, but it quickly became clear that its design was not keeping up with the extensions being made to it, and we reached the point where it was very difficult to make any further changes without breaking existing features. Around 2002, Yoshinori K. Okuji started work on PUPA (Preliminary Universal Programming Architecture for GNU GRUB), aiming to rewrite the core of GRUB to make it cleaner, safer, more robust, and more powerful. PUPA was eventually renamed to GRUB 2, and the original version of GRUB was renamed to GRUB Legacy. Small amounts of maintenance continued to be done on GRUB Legacy, but the last release (0.97) was made in 2005 and at the time of writing it seems unlikely that there will be another.
在接下来的几年里,GRUB与它扩展满足了许多要求,但是它很快便显露出它本身的设计并不很好地兼容它的扩展,并且我们在这一问题点上很困难地在不破坏现有功能的基础上进行修改。大约2002年,yoshinori K.Okuji开始工作于PUPA(初步通用编程体系架构GNU GRUB),目的为重写出更简洁的、安全的、健壮的与强大的GRUB内核。PUPA最后被命名为GRUB2,并且把原来的GRUB版本改名为GRUB Legacy.少量的GRUB Legacy版本还保持有维护,但最新版本(0.97)截止在2005年和本文本撰写时拟乎不太可能再有更新。

By around 2007, GNU/Linux distributions started to use GRUB 2 to limited extents, and by the end of 2009 multiple major distributions were installing it by default.
大约到了2007年,GNU/Linux派系开始使用GRUB2作为有限扩展,并且在2009年年底许多发行版在默认的情况下安装了它。

1.3 Differences from previous versions
1.3 与以前的版本的区别
======================================

GRUB 2 is a rewrite of GRUB (*note History::), although it shares many characteristics with the previous version, now known as GRUB Legacy. Users of GRUB Legacy may need some guidance to find their way around this new version.
GRUB2是GRUB的重写(注:历史部分),尽管它们有许多相同之处,但(过去的版本)现在明确地被称为GRUB Legacy.使用GRUB Legacy的用户可能需要一些指导才能重新掌握新版本的使用。

* The configuration file has a new name ('grub.cfg' rather than 'menu.lst' or 'grub.conf'), new syntax (*note Configuration::) and many new commands (*note Commands::). Configuration cannot be copied over directly, although most GRUB Legacy users should not find the syntax too surprising.
* GRUB2的配置文件有了新的名字(为'grub.cfg'而不是'menu.lst'或'grub.conf'),新的语法(注:配置部分)和一些新的命令(注:命令部分)。配置是不能直接复制使用的,尽管大多数GRUB Legacy用户可能找不到这些语法而感到很意外。

* 'grub.cfg' is typically automatically generated by 'grub-mkconfig' (*note Simple configuration::). This makes it easier to handle versioned kernel upgrades.
* 'grub.cfg'通常是由'grub-mkconfig'自动生成的(注:基本的配置).这有助于它在内核版本升级中更容易处理。

* Partition numbers in GRUB device names now start at 1, not 0 (*note Naming convention::).
* 分区编号现在于GRUB驱动器表示中是为1开始,而非0(注:命名规则).

* The configuration file is now written in something closer to a full scripting language: variables, conditionals, and loops are available.
* GRUB2的配置文件内容更接近于一个完整的脚本语言:变量、条件与循环可以在这里使用。

* A small amount of persistent storage is available across reboots, using the 'save_env' and 'load_env' commands in GRUB and the 'grub-editenv' utility. This is not available in all configurations (*note Environment block::).
* 一些小批量的变量需要在重新启动后能够保持有它所储存的数据,则需要使用到GRUB2的'save_env'与'load_env'命令或使用'grub-editenv'功能。这是其他所有的配置都做不到的。(注:环境范围)

* GRUB 2 has more reliable ways to find its own files and those of target kernels on multiple-disk systems, and has commands (*note search::) to find devices using file system labels or Universally Unique Identifiers (UUIDs).
*GRUB2有更可靠的方法从多个磁盘系统中找到它自己需要的文件和这些目标内核,并且通过命令(注:搜索)去找到驱动器使用的文件系统标签或全局唯一标识符(UUID).

* GRUB 2 is available for several other types of system in addition to the PC BIOS systems supported by GRUB Legacy: PC EFI, PC coreboot, PowerPC, SPARC, and MIPS Lemote Yeeloong are all supported.
* GRUB2是可用于一些其他类型的系统与另外来自GRUB Legacy所支持的PC BIOS系统:PC EFI,PC coreboot,PowerPC,SPARC,和MIPS lemote Yeeloong(龙芯)它们都被支持。

* Many more file systems are supported, including but not limited to ext4, HFS+, and NTFS.
* 支持更多的文件系统,包括ext4、HFS+和NTFS 但远远不只这些。

* GRUB 2 can read files directly from LVM and RAID devices.
* GRUB2 能够直接从LVM和RAID驱动器里读取文件。

* A graphical terminal and a graphical menu system are available.
* 提供了一个可用的图形终端和一个图形菜单系统。

* GRUB 2's interface can be translated, including menu entry names.
* GRUB 2的界面能够被翻译,包括菜单条目名称。

* The image files (*note Images::) that make up GRUB have been reorganised; Stage 1, Stage 1.5, and Stage 2 are no more.
* GRUB的镜像文件(注:镜像)组成已经重组为;Stage 1 , Stage 1.5 ,和Stage 2里,不多不少。

* GRUB 2 puts many facilities in dynamically loaded modules, allowing the core image to be smaller, and allowing the core image to be built in more flexible ways.
* GRUB2 通过动态载入模块来扩展很多功能,因此核心镜像可以很小,并且因此能够构建更具灵活性的内核镜像。

1.4 GRUB features
1.4 GRUB的特点
=================

The primary requirement for GRUB is that it be compliant with the "Multiboot Specification", which is described in *note Multiboot Specification: (multiboot)Top.
GRUB建立于以符合"多引导规范"为基础,这个是描述自(注:多重引导规格:(多重引导)前部分)。

The other goals, listed in approximate order of importance, are:
另一个目标,大致整理列出它的重要性,为:

* Basic functions must be straightforward for end-users.
* 基本的功能必须直接面向最终用户。

* Rich functionality to support kernel experts and designers.
* 丰富的功能来支持内核专家与设计师。

* Backward compatibility for booting FreeBSD, NetBSD, OpenBSD, and Linux. Proprietary kernels (such as DOS, Windows NT, and OS/2) are supported via a chain-loading function.
* 向后兼容性引导 FreeBSD,NetBSD,OpenBSD,和Linux.专有内核(比如DOS,Windows NT,和OS/2)均支持通过链式加载器功能。

Except for specific compatibility modes (chain-loading and the Linux "piggyback" format), all kernels will be started in much the same state as in the Multiboot Specification. Only kernels loaded at 1 megabyte or above are presently supported. Any attempt to load below that boundary will simply result in immediate failure and an error message reporting the problem.
除了用特定的兼容性模式(链式-加载 和 Linux"背负式装运"格式:假如A没有权限,需要跟有权限的B一同进入的方式),否则所有的内核都将在多重引导的规范下开始在相同的状态。内核的加载目前唯一支持加载(磁盘头区域)1兆字节(1MB)或以内的空间 。任何去加载超过这个范围的尝试都将只会导致立即失败和一个这个问题的错误消息报告。

In addition to the requirements above, GRUB has the following features (note that the Multiboot Specification doesn't require all the features that GRUB supports):
除了以上的条件外,GRUB还具有一下特性(注意GRUB并不是所有的多重引导规范里的特性都支持)

Recognize multiple executable formats
识别多个可执行文件格式
Support many of the "a.out" variants plus "ELF". Symbol tables are also loaded.
支持加载许多“a.out"可执行文件的变种以及”ELF“可重定位符号表。

Support non-Multiboot kernels
支持 非-多重引导 的内核
Support many of the various free 32-bit kernels that lack Multiboot compliance (primarily FreeBSD, NetBSD, OpenBSD, and Linux). Chain-loading of other boot loaders is also supported.
支持许多各种各样的缺乏多重引导依赖性的自由的32-bit内核(主要为FreeBSD,NetBSD,OpenBSD,和Linux).另外还支持链式加载其他的引导加载程序。

Load multiples modules
加载多种模块
Fully support the Multiboot feature of loading multiple modules.
完全支持多重引导特性加载多个模块

Load a configuration file
加载配置文件
Support a human-readable text configuration file with preset boot commands. You can also load another configuration file dynamically and embed a preset configuration file in a GRUB image file. The list of commands (*note Commands::) are a superset of those supported on the command-line. An example configuration file is provided in *note Configuration.
支持人可读的文本配置文件与预设启动命令。你也可以动态地加载另一个配置文件或嵌入一个预设好了的GRUB镜像文件。它的命令列表(注:命令)是一个支持那些扩展集的命令行。并且在(注:配置)里提供了一个示例配置文件.

Provide a menu interface
提供一个菜单界面
A menu interface listing preset boot commands, with a programmable timeout, is available. There is no fixed limit on the number of boot entries, and the current implementation has space for several hundred.
一个菜单界面列表它已经预设好引导命令,此界面可以通过带超时的编程控制去自动执行。它没有固定限制那些引导的条目总数,而且目前尝试过设置好几百条范围的例子。

Have a flexible command-line interface
有一个灵活的命令行界面
A fairly flexible command-line interface, accessible from the menu, is available to edit any preset commands, or write a new boot command set from scratch. If no configuration file is present,GRUB drops to the command-line.
命令行界面相当灵活,可以从菜单中,可以编辑任何预设的命令,或从头开始编写一个新的引导命令集。如果没有配置文件存在,GRUB会下降到命令行模式。

The list of commands (*note Commands::) are a subset of those
它的 命令列表(注:命令)只是它的一个子集(子设备,分支功能)
supported for configuration files. Editing commands closely resembles the Bash command-line (*note Command-line interface::), with <TAB>-completion of commands, devices, partitions, and files in a directory depending on context.
支持配置文件。编辑命令的方式非常相似于Bash命令行方式(注:命令行界面::),依赖于目录上下文的方式通过<TAB>键可以自动补全命令名,设备名,分区名,和文件名。

Support multiple filesystem types
支持多种文件系统类型
Support multiple filesystem types transparently, plus a useful explicit blocklist notation. The currently supported filesystem types are "Amiga Fast FileSystem (AFFS)", "AtheOS fs", "BeFS", "BtrFS" (including raid0, raid1, raid10, gzip and lzo), "cpio" (little- and big-endian bin, odc and newc variants), "Linux ext2/ext3/ext4", "DOS FAT12/FAT16/FAT32", "exFAT", "HFS", "HFS+", "ISO9660" (including Joliet, Rock-ridge and multi-chunk files), "JFS", "Minix fs" (versions 1, 2 and 3), "nilfs2", "NTFS" (including compression), "ReiserFS", "ROMFS", "Amiga Smart FileSystem (SFS)", "Squash4", "tar", "UDF", "BSD UFS/UFS2", "XFS", and "ZFS" (including lzjb, gzip, zle, mirror, stripe, raidz1/2/3 and encryption in AES-CCM and AES-GCM). *Note Filesystem::, for more information.
明了简洁地支持多种文件系统模式,加上一个很好用的显式的符号表示代码块的列表。当前支持的文件系统类型"阿米加(Amiga)快速文件系统(AFFS)","AtheOS fs","BeFS","BtrFS"(其中包括raid0, raid1, raid10, gzip and lzo),"cpio"(大小端的字节存储次序,ODC(输出对象控制?)和新版本),"Linux ext2/ext3/ext4","DOS FAT12/FAT16/FAT32","exFAT","HFS","HFS+","ISO9660"(包括joliet标准,Rock-ridge和multi-chunk文件),"JFS","Minix fs"(版本1,2和3),"nilfs2","NTFS"(包括压缩),"ReiserFS","阿米加智能文件系统(Amiga Smart FileSystem-SFS)","Squash4","tar","UDF","BSD UFS/UFS2","XFS",和"ZFS"(包括lzjb,gzip,zle,mirror,stripe,raidz1/2/3和加密的AES-CCM与AES-GCM)。(注:文件系统-从中得到更多信息)

Support automatic decompression
支持自动解压缩
Can decompress files which were compressed by 'gzip' or 'xz'(1) (*note Features-Footnote-1::). This function is both automatic and transparent to the user (i.e. all functions operate upon the uncompressed contents of the specified files). This greatly reduces a file size and loading time, a particularly great benefit for floppies.(2) (*note Features-Footnote-2::)
能从压缩为"gzip"或"xz"(注:特性-补充说明-1)的文件中解压出文件。对于用户这个功能是自动的与显式的(也就是所有功能都像在未压缩内容的所指定的文件上操作)。这大大地降低了文件大小和加载时间,对于磁盘来说这是极其的好。(注:特点-补充说明-2::)

It is conceivable that some kernel modules should be loaded in a compressed state, so a different module-loading command can be specified to avoid uncompressing the modules.
可以想像那些必须的内核模块在加载时还处于压缩状态,因此一个不同的模块加载命令能够指定它避免去解压缩这个模块。

Access data on any installed device
在安装了的设备上存储数据
Support reading data from any or all floppies or hard disk(s) recognized by the BIOS, independent of the setting of the root device.
支持从任何类型的、所有的磁盘与被BIOS识别的硬盘里读取数据,不受约束地设置(所指定的)引导设备(root device)。

Be independent of drive geometry translations
独立的驱动器位置排列转换

Unlike many other boot loaders, GRUB makes the particular drive translation irrelevant. A drive installed and running with one translation may be converted to another translation without any adverse effects or changes in GRUB's configuration.
不同于很多其他的引导加载程序,GRUB使得特定的驱动器之间的转换变得无关紧要。一个驱动的安装与运行 他的一个 转换 可能被转换成另一个 转换 并且 这样的影响不利于修改GRUB的配置。

Detect all installed RAM
检测所有安装了的RAM
GRUB can generally find all the installed RAM on a PC-compatible machine. It uses an advanced BIOS query technique for finding all memory regions. As described on the Multiboot Specification (*note Multiboot Specification: (multiboot)Top.), not all kernels make use of this information, but GRUB provides it for those who do.
GRUB一般都能找出所有安装在PC-兼容机机器里的RAM。它使用一个高级的BIOS查询技术去找到所有存储器(内存)区域。根据多重引导规范里的描述(注:多重引导规范:(多种引导)前部分。),并不是所有内核都遵从这些信息内容,但GRUB提供对那些信息内容的支持。

Support Logical Block Address mode
支持逻辑快地址模式
In traditional disk calls (called "CHS mode"), there is a geometry translation problem, that is, the BIOS cannot access over 1024 cylinders, so the accessible space is limited to at least 508 MB and to at most 8GB. GRUB can't universally solve this problem, as there is no standard interface used in all machines. However, several newer machines have the new interface, Logical Block Address ("LBA") mode. GRUB automatically detects if LBA mode is available and uses it if available. In LBA mode, GRUB can access the entire disk.
在传统的磁盘调用中(调用为"CHS模式"),这里有一个结构转换(geometry translation)的问题,也就是说,BISO不能访问超过1024个硬盘柱面(视乎硬盘逻辑参数中的磁头数),所以可理解为可访问的空间最少为508MB(16个磁头数)与最作为8GB(256个磁头数)。GRUB一般不能解决这样的问题,因为没有一个标准接口能够适用于所有的机器设备。然而,一些新的机器设备拥有一些新的接口,逻辑单元地址("LBA")模式。如果LBA模式是可用的则GRUB会自动检测出并启用它。在LBA模式里,GRUB可以访问整个硬盘。

Support network booting
支持网络引导
GRUB is basically a disk-based boot loader but also has network support. You can load OS images from a network by using the "TFTP" protocol.
GRUB基本上是一个基于硬盘引导的加载程序但也可以支持网络。你可以通过使用"TFTP"协议来加载源自网络的OS镜像。

Support remote terminals
支持远程终端
To support computers with no console, GRUB provides remote terminal support, so that you can control GRUB from a remote host. Only serial terminal support is implemented at the moment.
支持没有控制台(console)的电脑,GRUB提供远程终端的支持,因此你能通过远程主机来控制GRUB。目前只能实现的仅仅只有串口终端接口。

(1) Only CRC32 data integrity check is supported (xz default is CRC64 so one should use -check=crc32 option). LZMA BCJ filters are supported.
(1) 只支持CRC32的数据完整性检查(xz 默认为CRC64 所以应该所有人都使用 -check=crc32设置)。支持LZMA BCJ过滤器。

(2) There are a few pathological cases where loading a very badly organized ELF kernel might take longer, but in practice this never happen.
(2) 在一些少数的问题案例里载入一个非常糟糕的组织好的ELF内核需要更长的时间,但实际上这是从来不会发生。

1.5 The role of a boot loader
1.5 在引导载入器中的角色
=============================

The following is a quotation from Gordon Matzigkeit, a GRUB fanatic:
Some people like to acknowledge both the operating system and kernel when they talk about their computers, so they might say they use "GNU/Linux" or "GNU/Hurd". Other people seem to think that the kernel is the most important part of the system, so they like to call their GNU operating systems "Linux systems."
这里以下论述是引用自Gordon Matzigkeit,一个GRUB狂热者:
有些人当谈及他们计算机里的操作系统与内核时偏向于说这两者是分开的,于是他们可能会说他们用的是"GNU/Linux"或"GNU/Hurd"。另一些人似乎认为内核是系统里最重要的组成部分,所以他们喜欢称之为GNU操作系统"Linux系统"。


I, personally, believe that this is a grave injustice, because the_boot loader_ is the most important software of all. I used to refer to the above systems as either "LILO"(1) (*note Role of a boot loader-Footnote-1::) or "GRUB" systems.
我,就我而言,相信这是一个严重的不公正,因为引导加载器是所有软件中最重要的。我指上述系统作为"LILO"(1)(注:引导加载器角色-补充说明-1)或"GRUB"系统。
Unfortunately, nobody ever understood what I was talking about; now I just use the word "GNU" as a pseudonym for GRUB.
不幸地,没有人明白我在说什么;现在我只是用"GNU"作为我在GRUB里的笔名。
So, if you ever hear people talking about their alleged "GNU"systems, remember that they are actually paying homage to the best boot loader around... GRUB!
因此,如果你曾经听到人们谈论他们的所谓"GNU"系统,记住他们实际上是向最好的引导加载器表示敬意...GRUB!

We, the GRUB maintainers, do not (usually) encourage Gordon's level of fanaticism, but it helps to remember that boot loaders deserve recognition. We hope that you enjoy using GNU GRUB as much as we did writing it.
到此,GRUB的维护者们,我们(通常)不鼓励像Gordon's这样的狂热程度,但它有助于你记住引导加载器该有的认可。我们希望你喜欢使用GNU GRUB并且跟我们一样熟练使用。


(1) The LInux LOader, a boot loader that everybody uses, but nobody likes.
(1) 这个Linux加载器,每个人都要使用的一个引导加载器,但没有人喜欢它。
上次由 kin3z 在 2015-05-12 10:16,总共编辑 2 次。
shamrol
帖子: 3
注册时间: 2015-01-25 22:03
系统: win8

Re: GRUB2官方文档翻译项目2-01

#2

帖子 shamrol » 2015-05-06 8:57




从我的 iPad 发送,使用 Tapatalk
回复