GRUB 菜单界面配置文件是 /boot/grub/grub.conf
。为菜单界面设置全局参数的命令位于这个文件的顶部,后面的内容是菜单里列出的每个操作系统或者内核。
The following is a very basic GRUB menu configuration file designed to boot either Fedora or Microsoft Windows Vista:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.27.19-170.2.35.fc10.i686)
root (hd0,1)
kernel /vmlinuz-2.6.27.19-170.2.35.fc10.i686 ro root=UUID=04a07c13-e6bf-6d5a-b207-002689545705 rhgb quiet
initrd /initrd-2.6.27.19-170.2.35.fc10.i686.img
# section to load Windows
title Windows
rootnoverify (hd0,0)
chainloader +1
This file configures GRUB to build a menu with Fedora as the default operating system and sets it to autoboot after 10 seconds. Two sections are given, one for each operating system entry, with commands specific to the system disk partition table.
Note
注意,default 被设置为一个整数。这指定了 GRUB 配置文件里的第一个 title
行。在前面的例子里,如果要把 Windows
设置为缺省选项,你可以把 default=0
修改为 default=1
。
配置 GRUB 菜单配置文件来引导多个操作系统超出了本章的范围。请参考
第 E.8 节 “其它资料” 来获取其他的资源的列表。