9.4. GRUB 术​​​​​​​语​​​​​​​

在​​​​​​​使​​​​​​​用​​​​​​​ GRUB 之​​​​​​​前​​​​​​​,需​​​​​​​要​​​​​​​了​​​​​​​解​​​​​​​的​​​​​​​最​​​​​​​重​​​​​​​要​​​​​​​的​​​​​​​一​​​​​​​件​​​​​​​事​​​​​​​情​​​​​​​就​​​​​​​是​​​​​​​它​​​​​​​怎​​​​​​​样​​​​​​​引​​​​​​​用​​​​​​​设​​​​​​​备​​​​​​​,如​​​​​​​硬​​​​​​​盘​​​​​​​和​​​​​​​分​​​​​​​区​​​​​​​。​​​​​​​这​​​​​​​些​​​​​​​信​​​​​​​息​​​​​​​在​​​​​​​配​​​​​​​置​​​​​​​ GRUB 来​​​​​​​引​​​​​​​导​​​​​​​多​​​​​​​个​​​​​​​操​​​​​​​作​​​​​​​系​​​​​​​统​​​​​​​时​​​​​​​尤​​​​​​​为​​​​​​​重​​​​​​​要​​​​​​​。​​​​​​​

9.4.1. 设​​​​​​​备​​​​​​​名​​​​​​​

当​​​​​​​用​​​​​​​ GRUB 引​​​​​​​用​​​​​​​特​​​​​​​定​​​​​​​的​​​​​​​设​​​​​​​备​​​​​​​时​​​​​​​,可​​​​​​​以​​​​​​​使​​​​​​​用​​​​​​​下​​​​​​​面​​​​​​​的​​​​​​​格​​​​​​​式​​​​​​​(注​​​​​​​意​​​​​​​,从​​​​​​​语​​​​​​​法​​​​​​​上​​​​​​​来​​​​​​​讲​​​​​​​,括​​​​​​​号​​​​​​​和​​​​​​​逗​​​​​​​号​​​​​​​都​​​​​​​是​​​​​​​非​​​​​​​常​​​​​​​重​​​​​​​要​​​​​​​的​​​​​​​):
(<type-of-device><bios-device-number>,<partition-number>)
The <type-of-device> specifies the type of device from which GRUB boots. The two most common options are hd for a hard disk or fd for a 3.5 diskette. A lesser used device type is also available called nd for a network disk. Instructions on configuring GRUB to boot over the network are available online at http://www.gnu.org/software/grub/manual/.
The <bios-device-number> is the BIOS device number. The primary IDE hard drive is numbered 0 and a secondary IDE hard drive is numbered 1. This syntax is roughly equivalent to that used for devices by the kernel. For example, the a in hda for the kernel is analogous to the 0 in hd0 for GRUB, the b in hdb is analogous to the 1 in hd1, and so on.
The <partition-number> specifies the number of a partition on a device. Like the <bios-device-number>, most types of partitions are numbered starting at 0. However, BSD partitions are specified using letters, with a corresponding to 0, b corresponding to 1, and so on.

注意

GRUB 下​​​​​​​的​​​​​​​设​​​​​​​备​​​​​​​编​​​​​​​号​​​​​​​总​​​​​​​是​​​​​​​从​​​​​​​ 0,而​​​​​​​不​​​​​​​是​​​​​​​从​​​​​​​ 1 开​​​​​​​始​​​​​​​的​​​​​​​。​​​​​​​这​​​​​​​是​​​​​​​新​​​​​​​用​​​​​​​户​​​​​​​最​​​​​​​常​​​​​​​犯​​​​​​​的​​​​​​​错​​​​​​​误​​​​​​​之​​​​​​​一​​​​​​​。​​​​​​​
例​​​​​​​如​​​​​​​,如​​​​​​​果​​​​​​​系​​​​​​​统​​​​​​​有​​​​​​​一​​​​​​​个​​​​​​​以​​​​​​​上​​​​​​​的​​​​​​​硬​​​​​​​盘​​​​​​​,GRUB 会​​​​​​​用​​​​​​​ (hd0) 来​​​​​​​引​​​​​​​用​​​​​​​第​​​​​​​一​​​​​​​个​​​​​​​硬​​​​​​​盘​​​​​​​,用​​​​​​​ (hd1) 来​​​​​​​引​​​​​​​用​​​​​​​第​​​​​​​二​​​​​​​个​​​​​​​硬​​​​​​​盘​​​​​​​。​​​​​​​GRUB 用​​​​​​​ (hd0,0) 引​​​​​​​用​​​​​​​第​​​​​​​一​​​​​​​个​​​​​​​硬​​​​​​​盘​​​​​​​里​​​​​​​的​​​​​​​第​​​​​​​一​​​​​​​个​​​​​​​分​​​​​​​区​​​​​​​,用​​​​​​​ (hd1,2) 引​​​​​​​用​​​​​​​第​​​​​​​二​​​​​​​个​​​​​​​硬​​​​​​​盘​​​​​​​里​​​​​​​的​​​​​​​第​​​​​​​三​​​​​​​个​​​​​​​分​​​​​​​区​​​​​​​。​​​​​​​
GRUB 通​​​​​​​常​​​​​​​使​​​​​​​用​​​​​​​下​​​​​​​面​​​​​​​的​​​​​​​规​​​​​​​则​​​​​​​来​​​​​​​命​​​​​​​名​​​​​​​设​​​​​​​备​​​​​​​和​​​​​​​分​​​​​​​区​​​​​​​:
  • 不​​​​​​​管​​​​​​​系​​​​​​​统​​​​​​​的​​​​​​​硬​​​​​​​盘​​​​​​​驱​​​​​​​动​​​​​​​器​​​​​​​是​​​​​​​ IDE 还​​​​​​​是​​​​​​​ SCSI,所​​​​​​​有​​​​​​​的​​​​​​​硬​​​​​​​盘​​​​​​​驱​​​​​​​动​​​​​​​器​​​​​​​都​​​​​​​用​​​​​​​字​​​​​​​母​​​​​​​ hd 开​​​​​​​始​​​​​​​。​​​​​​​而​​​​​​​ fd 用​​​​​​​来​​​​​​​指​​​​​​​定​​​​​​​ 3.5 寸​​​​​​​软​​​​​​​盘​​​​​​​。​​​​​​​
  • 要​​​​​​​指​​​​​​​定​​​​​​​整​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​而​​​​​​​不​​​​​​​是​​​​​​​某​​​​​​​个​​​​​​​分​​​​​​​区​​​​​​​,可​​​​​​​以​​​​​​​把​​​​​​​分​​​​​​​区​​​​​​​号​​​​​​​码​​​​​​​和​​​​​​​逗​​​​​​​号​​​​​​​都​​​​​​​去​​​​​​​掉​​​​​​​。​​​​​​​当​​​​​​​ GRUB 为​​​​​​​某​​​​​​​个​​​​​​​特​​​​​​​定​​​​​​​磁​​​​​​​盘​​​​​​​配​​​​​​​置​​​​​​​主​​​​​​​引​​​​​​​导​​​​​​​分​​​​​​​区​​​​​​​时​​​​​​​,这​​​​​​​很​​​​​​​重​​​​​​​要​​​​​​​。​​​​​​​例​​​​​​​如​​​​​​​,(hd0) 指​​​​​​​定​​​​​​​了​​​​​​​第​​​​​​​一​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​上​​​​​​​的​​​​​​​主​​​​​​​引​​​​​​​导​​​​​​​分​​​​​​​区​​​​​​​,(hd3) 指​​​​​​​定​​​​​​​第​​​​​​​四​​​​​​​个​​​​​​​设​​​​​​​备​​​​​​​上​​​​​​​的​​​​​​​主​​​​​​​引​​​​​​​导​​​​​​​分​​​​​​​区​​​​​​​。​​​​​​​
  • 如​​​​​​​果​​​​​​​系​​​​​​​统​​​​​​​有​​​​​​​多​​​​​​​个​​​​​​​驱​​​​​​​动​​​​​​​器​​​​​​​设​​​​​​​备​​​​​​​,在​​​​​​​ BIOS 里​​​​​​​设​​​​​​​置​​​​​​​引​​​​​​​导​​​​​​​顺​​​​​​​序​​​​​​​就​​​​​​​很​​​​​​​重​​​​​​​要​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​系​​​​​​​统​​​​​​​只​​​​​​​有​​​​​​​ IDE 或​​​​​​​ SCSI 驱​​​​​​​动​​​​​​​器​​​​​​​,这​​​​​​​当​​​​​​​然​​​​​​​很​​​​​​​简​​​​​​​单​​​​​​​,但​​​​​​​是​​​​​​​如​​​​​​​果​​​​​​​两​​​​​​​种​​​​​​​设​​​​​​​备​​​​​​​都​​​​​​​有​​​​​​​的​​​​​​​话​​​​​​​,使​​​​​​​存​​​​​​​放​​​​​​​引​​​​​​​导​​​​​​​分​​​​​​​区​​​​​​​的​​​​​​​驱​​​​​​​动​​​​​​​器​​​​​​​先​​​​​​​被​​​​​​​访​​​​​​​问​​​​​​​就​​​​​​​很​​​​​​​关​​​​​​​键​​​​​​​了​​​​​​​。​​​​​​​

为了尽快向用户提供最新的信息,本文档可能会包括由机器自动从英文原文翻译的内容。如需更多信息,请参阅此说明。