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

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

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

#1

帖子 kin3z » 2015-05-12 10:20

2 Naming convention
2 命名规则
*******************

The device syntax used in GRUB is a wee bit different from what you may have seen before in your operating system(s), and you need to know it so that you can specify a drive/partition.
在GRUB中设备的名称与你之前在操作系统中看到的稍稍不同,你需要知道它们才能确定一个驱动器或分区。
Look at the following examples and explanations:
看下面的例子和解释:
(fd0)
(fd0)
First of all, GRUB requires that the device name be enclosed with '(' and ')'. The 'fd' part means that it is a floppy disk. The number '0' is the drive number, which is counted from _zero_. This expression means that GRUB will use the whole floppy disk.
首先,GRUB要求设备名称写在圆括号()中,fd代表着软盘(floppy disk),数字0是驱动器的编号,由0开始递增。这个表达式意味着GRUB会使用整个软盘。

(hd0,msdos2)
(hd0,msdos2)
Here, 'hd' means it is a hard disk drive. The first integer '0' indicates the drive number, that is, the first hard disk, the string 'msdos' indicates the partition scheme, while the second integer, '2', indicates the partition number (or the PC slice number in the BSD terminology). The partition numbers are counted from _one_, not from zero (as was the case in previous versions of GRUB). This expression means the second partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk.
这里,'hd'意味着它是一块硬盘驱动器(hard disk),第一个整数'0'表明了驱动器编号,及第一块硬盘,字符串'msdos'指明了分区方案,第二个整数2表示分区编号(或者是在BSD终端中的切片(slices)编号)。分区号从1开始,而不是0(有别于GRUB以前的版本),这个表达式表示第1块硬盘驱动器上的第2个分区,这种情况下,GRUB使用的是磁盘的一个分区,而不是整个磁盘.

(hd0,msdos5)
(hd0,msdos5)
This specifies the first "extended partition" of the first hard disk drive. Note that the partition numbers for extended partitions are counted from '5', regardless of the actual number of primary partitions on your hard disk.
这个表示第一块磁盘驱动器上的第一个扩展分区,注意的是扩展分区 的分区号从5开始,无论你硬盘上的主分区的实际编号是多少。

(hd1,msdos1,bsd1)
(hd1,msdos1,bsd1)
This means the BSD 'a' partition on first PC slice number of the second hard disk.
这个意味着BSD系统上第二块硬盘的第一切片号的a分区。

Of course, to actually access the disks or partitions with GRUB, you need to use the device specification in a command, like 'set root=(fd0)' or 'parttool (hd0,msdos3) hidden-'. To help you find out which number specifies a partition you want, the GRUB command-line (*note Command-line interface::) options have argument completion. This means that, for example, you only need to type
当然,真正要通过GRUB访问到磁盘或分区,你需要在命令中指定设备,如 'set root=(fd0)'或'parttool(hd0,msdos3) hidden-'。为了帮助你找到想要访问的 分区的编号,GRUB命令行(*此处指命令行界面)选项有参数补全的功能。例 如,你只需要输入
set root=(
set root=(
followed by a <TAB>, and GRUB will display the list of drives,partitions, or file names. So it should be quite easy to determine the name of your target partition,even with minimal knowledge of the syntax.
接着按一下tab,GRUB就会显示驱动器、分区或文件名列表。因此 即使对语法了解甚少,确定目标分区应该也是相当容易的。

Note that GRUB does _not_ distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally,any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.
注意GRUB不会区分IDE和SCSI,它仅仅是从0开始数驱动器号,而不管 它们的类型。一般地,IDE驱动器编号都小于SCSI驱动器编号,除非你 在BIOS中为了改变启动顺序而交换了IDE和SCSI驱动器。

Now the question is, how to specify a file? Again, consider an example:
现在问题是,如何指明一个文件?同样,考虑一个例子:
(hd0,msdos1)/vmlinuz
(hd0,msdos1)/vmlinuz
This specifies the file named 'vmlinuz', found on the first partition of the first hard disk drive. Note that the argument completion works with file names, too.
这个指明了位于硬盘1上分区1里名为vmlinuz的文件,注意参数自动 补全对文件名同样有效。

That was easy, admit it. Now read the next chapter, to find out how to actually install GRUB on your drive.
必须承认以上内容都很简单。现在来阅读下一章,明白如何 真正 安装GRUB到硬盘上。
头像
lhw828
帖子: 2797
注册时间: 2007-03-15 16:58
来自: 湖北武汉
联系:

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

#2

帖子 lhw828 » 2015-05-16 23:31

grub啥时候才能不beta?
kin3z
帖子: 56
注册时间: 2011-11-01 14:22

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

#3

帖子 kin3z » 2015-05-18 11:03

lhw828 写了:grub啥时候才能不beta?
其实GRUB都应该将近十年了吧,查阅资料说1.99卡了很久,这才是测试版本,最后突破2.0了,基本无什么缺陷了。

但为什么还挂测试,可能因为引导启动的技术繁多,更新与硬件兼容问题上,日后还需要修修补补,所以就挂着了,但无新情况,GRUB还是很完善的了,尤其它的仿生方面,我亲眼见过它已经被应用到无盘的系统上了,而且运行很好,所以才勾起我对它的兴趣。
回复