Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
章 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 項目設定來反映這項範例,開機管理程式就會載入超管理器、
initrd
映像檔,以及 Linux 核心。因為核心的項目位於其它項目的上方,所以核心會先載入記憶體中。接著開機管理程式會傳送(與接收)指令列引數至超管理器與 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 參數來設定虛擬化的管理程序:
mem
這會限制 domain0 所能使用的記憶體數量。
com1=115200, 8n1
這能使系統中的第一個序列埠擔任序列埠主控台(com2 會被指定為下一個埠口,等等...)。
dom0_mem
這會限制 domain0 所能使用的記憶體數量。
dom0_max_vcpus
這會限制 domain0 所能見的 CPU 數量。
acpi
這會將 ACPI 管理程序切換到管理程序與 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
這會以中斷結果會停用 APIC。