Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

9.7. GRUB選​​​​​​​單​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​案​​​​​​​

The configuration file (/boot/grub/grub.conf), which is used to create the list of operating systems to boot in GRUB's menu interface, essentially allows the user to select a pre-set group of commands to execute. The commands given in 節 9.6, “GRUB 指​​​​​​​令​​​​​​​” can be used, as well as some special commands that are only available in the configuration file.

9.7.1. 設​​​​​​​定​​​​​​​檔​​​​​​​結​​​​​​​構​​​​​​​

GRUB 選​​​​​​​單​​​​​​​介​​​​​​​面​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​為​​​​​​​ /boot/grub/grub.conf。​​​​​​​這​​​​​​​個​​​​​​​指​​​​​​​令​​​​​​​將​​​​​​​選​​​​​​​單​​​​​​​介​​​​​​​面​​​​​​​的​​​​​​​通​​​​​​​用​​​​​​​參​​​​​​​數​​​​​​​放​​​​​​​置​​​​​​​於​​​​​​​檔​​​​​​​案​​​​​​​的​​​​​​​上​​​​​​​端​​​​​​​,接​​​​​​​著​​​​​​​為​​​​​​​每​​​​​​​個​​​​​​​作​​​​​​​業​​​​​​​核​​​​​​​心​​​​​​​的​​​​​​​小​​​​​​​節​​​​​​​或​​​​​​​選​​​​​​​單​​​​​​​上​​​​​​​列​​​​​​​出​​​​​​​的​​​​​​​作​​​​​​​業​​​​​​​系​​​​​​​統​​​​​​​。​​​​​​​
下​​​​​​​列​​​​​​​為​​​​​​​設​​​​​​​計​​​​​​​來​​​​​​​啟​​​​​​​動​​​​​​​ Red Hat Enterprise Linux 或​​​​​​​微​​​​​​​軟​​​​​​​視​​​​​​​窗​​​​​​​ 2000 的​​​​​​​最​​​​​​​基​​​​​​​本​​​​​​​ GRUB 選​​​​​​​單​​​​​​​設​​​​​​​定​​​​​​​檔​​​​​​​:
default=0 
timeout=10 
splashimage=(hd0,0)/grub/splash.xpm.gz 
hiddenmenu 
title Red Hat Enterprise Linux Server (2.6.18-2.el5PAE)         
root (hd0,0)         
kernel /boot/vmlinuz-2.6.18-2.el5PAE ro root=LABEL=/1 rhgb quiet       
initrd /boot/initrd-2.6.18-2.el5PAE.img

# section to load Windows 
title Windows         
rootnoverify (hd0,0)         
chainloader +1
這​​​​​​​個​​​​​​​檔​​​​​​​案​​​​​​​設​​​​​​​定​​​​​​​ GRUB 建​​​​​​​立​​​​​​​一​​​​​​​個​​​​​​​以​​​​​​​ Red Hat Enterprise Linux 為​​​​​​​預​​​​​​​設​​​​​​​作​​​​​​​業​​​​​​​系​​​​​​​統​​​​​​​的​​​​​​​選​​​​​​​單​​​​​​​,並​​​​​​​設​​​​​​​定​​​​​​​自​​​​​​​動​​​​​​​開​​​​​​​機​​​​​​​時​​​​​​​間​​​​​​​為​​​​​​​ 10 秒​​​​​​​。​​​​​​​有​​​​​​​兩​​​​​​​個​​​​​​​扇​​​​​​​區​​​​​​​,每​​​​​​​個​​​​​​​各​​​​​​​有​​​​​​​一​​​​​​​個​​​​​​​作​​​​​​​業​​​​​​​系​​​​​​​統​​​​​​​項​​​​​​​目​​​​​​​,與​​​​​​​特​​​​​​​定​​​​​​​的​​​​​​​系​​​​​​​統​​​​​​​磁​​​​​​​碟​​​​​​​分​​​​​​​割​​​​​​​區​​​​​​​列​​​​​​​表​​​​​​​。​​​​​​​

注意

請​​​​​​​注​​​​​​​意​​​​​​​,預​​​​​​​設​​​​​​​設​​​​​​​定​​​​​​​為​​​​​​​整​​​​​​​數​​​​​​​。​​​​​​​這​​​​​​​歸​​​​​​​類​​​​​​​於​​​​​​​ GRUB 設​​​​​​​定​​​​​​​檔​​​​​​​中​​​​​​​的​​​​​​​第​​​​​​​一​​​​​​​ title 行​​​​​​​。​​​​​​​在​​​​​​​上​​​​​​​個​​​​​​​範​​​​​​​例​​​​​​​中​​​​​​​,如​​​​​​​於​​​​​​​將​​​​​​​ 微​​​​​​​軟​​​​​​​視​​​​​​​窗​​​​​​​ 扇​​​​​​​區​​​​​​​設​​​​​​​為​​​​​​​預​​​​​​​設​​​​​​​,將​​​​​​​ default=0 更​​​​​​​改​​​​​​​為​​​​​​​ default=1。​​​​​​​
Configuring a GRUB menu configuration file to boot multiple operating systems is beyond the scope of this chapter. Consult 節 9.9, “其​​​​​​​它​​​​​​​的​​​​​​​資​​​​​​​源​​​​​​​” for a list of additional resources.