codingstandards 发表于 2013-2-4 13:30:56

双系统GRUB配置文件示例

一台工控机上安装了 WindowsXP 和 RHEL5.4 双系统,采用 GRUB 作为系统引导管理器。先安装WindowsXP,再安装Linux,GRUB会自动生成系统引导配置文件 /boot/grub/grub.conf。下面是配置文件的实际内容:
 
文件:/boot/grub/grub.conf
# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE:You have a /boot partition.This means that#          all kernel and initrd paths are relative to /boot/, eg.#          root (hd0,4)#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00#          initrd /initrd-version.img#boot=/dev/hdcdefault=0timeout=15splashimage=(hd0,4)/grub/splash.xpm.gzhiddenmenutitle Red Hat Enterprise Linux Server (2.6.18-164.el5PAE)      root (hd0,4)      kernel /vmlinuz-2.6.18-164.el5PAE ro root=/dev/VolGroup00/LogVol00      initrd /initrd-2.6.18-164.el5PAE.imgtitle Windows xp      rootnoverify (hd0,0)      chainloader +1 
其中 default=0 表示自动引导到Linux系统,如果改成 default=1 则自动引导到WindowsXP系统。此配置的修改方法是由我的同事 darrylee 提供的。
 
注意:有多个符号链接指向 /boot/grub/grub.conf ,包括 /boot/grub/menu.lst 和 /etc/grub.conf,如下所示:
# ls -l /boot/grub/grub.conf /boot/grub/menu.lst /etc/grub.conf
-rw------- 1 root root 684 09-24 11:03 /boot/grub/grub.conf
lrwxrwxrwx 1 root root  11 09-17 12:31 /boot/grub/menu.lst -> ./grub.conf
lrwxrwxrwx 1 root root  22 09-17 12:31 /etc/grub.conf -> ../boot/grub/grub.conf
#
 
 
页: [1]
查看完整版本: 双系统GRUB配置文件示例