修改grub文件,改变引导顺序
发布时间:2007-04-17 00:55:31来源:红联作者:Message
装上fedora近两周了,说心里话,个人感觉在易用性上和Windows相差很大。我分配10G的空间用于Linux,主要用于学习,一时脱离XP办不到。在装好fedora后,便由grub来引导,不作选择则默认进入fedora。然而我用fedora时间还不多,仅学习时使用,每次都在开机时选择一次,显然正常人都会不爽。摸索了近两小时(有一小时是在找过时的LILO),终于找到了是grub作怪。
以下是一点小心得,仅献给和我一样的Linux新手。用KEdit打开/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,8)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hdc
default=0 (这个便是设置默认引导的,从0开始。改为1,就可直接从XP引导。)
timeout=5 (在出现grub界面后默认等待时间,单位为秒,我将其改为3。)
splashimage=(hd0,8)/grub/splash.xpm.gz (据说是grub界面的图片,我没修改。)
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6) (首个引导选项名称。)
root (hd0,8)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-1.2798.fc6.img
title Other (这个原来便是Win的引导选项,把Other改为Microsoft Windows XP SP2,下次引导时便显示Windows了。)
rootnoverify (hd0,0)
chainloader +1
修改完保存一下,重启就OK可见到效果啦。其他的那么多,说实话我也不是很懂,呵呵~~还请路过的高手多多指教。
PS:此文在Linux下完成。