第 6 章 配​​​​​​​置​​​​​​​ GRUB

GNU Grand Unified Boot Loader (or GRUB) is a program which enables the user to select which installed operating system or kernel to load at system boot time. It also allows the user to pass arguments to the kernel. The GRUB configuration file (located in /boot/grub/grub.conf) is used to create a list of operating systems to boot in GRUB's menu interface. When you install the kernel-xen RPM, a post script adds kernel-xen entries to the GRUB configuration file. You can edit the grub.conf file and enable the following GRUB parameter:
title Red Hat Enterprise Linux Server (2.6.18-3.el5xen)
root   (hd0; 0)
kernel  /xen.gz.-2.6.18-3.el5
module  /vmlinuz-2.6..18-3.el5xen ro root=/dev/VolGroup00/LogVol00  rhgb quiet
module  /initrd-2.6.18-3. el5xenxen.img

如​​​​​​​果​​​​​​​你​​​​​​​设​​​​​​​置​​​​​​​与​​​​​​​示​​​​​​​例​​​​​​​相​​​​​​​同​​​​​​​的​​​​​​​ Linux grub 条​​​​​​​目​​​​​​​,引​​​​​​​导​​​​​​​装​​​​​​​载​​​​​​​程​​​​​​​序​​​​​​​会​​​​​​​载​​​​​​​入​​​​​​​ hypervisor、​​​​​​​initrd 映​​​​​​​像​​​​​​​和​​​​​​​ Linux 内​​​​​​​核​​​​​​​。​​​​​​​既​​​​​​​然​​​​​​​关​​​​​​​于​​​​​​​内​​​​​​​核​​​​​​​的​​​​​​​条​​​​​​​目​​​​​​​是​​​​​​​在​​​​​​​所​​​​​​​有​​​​​​​其​​​​​​​他​​​​​​​条​​​​​​​目​​​​​​​之​​​​​​​上​​​​​​​,内​​​​​​​核​​​​​​​会​​​​​​​先​​​​​​​被​​​​​​​载​​​​​​​入​​​​​​​内​​​​​​​存​​​​​​​。​​​​​​​引​​​​​​​导​​​​​​​装​​​​​​​载​​​​​​​程​​​​​​​序​​​​​​​向​​​​​​​ hypervisor 和​​​​​​​ Linux 内​​​​​​​核​​​​​​​发​​​​​​​送​​​​​​​(和​​​​​​​接​​​​​​​受​​​​​​​)命​​​​​​​令​​​​​​​行​​​​​​​参​​​​​​​数​​​​​​​。​​​​​​​下​​​​​​​面​​​​​​​的​​​​​​​示​​​​​​​例​​​​​​​条​​​​​​​目​​​​​​​展​​​​​​​示​​​​​​​了​​​​​​​怎​​​​​​​样​​​​​​​把​​​​​​​ Domain0 linux 内​​​​​​​核​​​​​​​内​​​​​​​存​​​​​​​限​​​​​​​制​​​​​​​在​​​​​​​ 800MB 之​​​​​​​内​​​​​​​:

title Red Hat Enterprise Linux Server (2.6.18-3.el5xen)
root   (hd0; 0)
kernel  /xen.gz.-2.6.18-3.el5 dom0_mem=800M
module  /vmlinuz-2.6..18-3.el5xen ro root=/dev/VolGroup00/LogVol00  rhgb quiet
module  /initrd-2.6.18-3. el5xenxen.img

你​​​​​​​可​​​​​​​以​​​​​​​使​​​​​​​用​​​​​​​这​​​​​​​些​​​​​​​ GRUB 参​​​​​​​数​​​​​​​来​​​​​​​配​​​​​​​置​​​​​​​虚​​​​​​​拟​​​​​​​化​​​​​​​管​​​​​​​理​​​​​​​程​​​​​​​序​​​​​​​(hypervisor):
mem

这​​​​​​​限​​​​​​​制​​​​​​​了​​​​​​​可​​​​​​​用​​​​​​​于​​​​​​​ domain0 的​​​​​​​内​​​​​​​存​​​​​​​数​​​​​​​量​​​​​​​。​​​​​​​

com1=115200, 8n1

这​​​​​​​启​​​​​​​用​​​​​​​了​​​​​​​系​​​​​​​统​​​​​​​里​​​​​​​的​​​​​​​第​​​​​​​一​​​​​​​个​​​​​​​串​​​​​​​口​​​​​​​来​​​​​​​充​​​​​​​当​​​​​​​串​​​​​​​行​​​​​​​控​​​​​​​制​​​​​​​台​​​​​​​(com2 被​​​​​​​分​​​​​​​配​​​​​​​给​​​​​​​下​​​​​​​一​​​​​​​个​​​​​​​端​​​​​​​口​​​​​​​,诸​​​​​​​如​​​​​​​此​​​​​​​类​​​​​​​)。​​​​​​​
 
dom0_mem
这​​​​​​​限​​​​​​​制​​​​​​​了​​​​​​​可​​​​​​​用​​​​​​​于​​​​​​​ domain0 的​​​​​​​内​​​​​​​存​​​​​​​数​​​​​​​量​​​​​​​。​​​​​​​
dom0_max_vcpus
这​​​​​​​限​​​​​​​制​​​​​​​了​​​​​​​ domain0 可​​​​​​​见​​​​​​​的​​​​​​​ CPU 数​​​​​​​量​​​​​​​。​​​​​​​
acpi
这​​​​​​​把​​​​​​​ ACPI hypervisor 切​​​​​​​换​​​​​​​至​​​​​​​ hypervisor 和​​​​​​​ domain0。​​​​​​​ACPI 参​​​​​​​数​​​​​​​的​​​​​​​选​​​​​​​项​​​​​​​包​​​​​​​括​​​​​​​:

/*   ****  Linux config options: propagated to domain0  ****/
/*   "acpi=off":      Disables both ACPI table parsing and interpreter.   */
/*   "acpi=force":    Overrides the disable blacklist.                    */
/*   "acpi=strict":   Disables out-of-spec workarounds.                   */
/*   "acpi=ht":       Limits ACPI from boot-time to enable HT.            */
/*   "acpi=noirq":    Disables ACPI interrupt routing.                    */


noacpi

这​​​​​​​禁​​​​​​​用​​​​​​​了​​​​​​​用​​​​​​​于​​​​​​​ interrupt delivery 的​​​​​​​ ACPI。​​​​​​​

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