多系统下更改引导装载程序的方法


 本机已有系统fedora8+Windows_XP,更改启动时的引导顺序,方法如下:

    进入fedora8,先备份/etc/grub.conf文件,在命令行下输入:

    #gedit /etc/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,7)

    # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00

    # initrd /initrd-version.img

    #boot=/dev/sda ——这是GRUB安装的位置

    default=2 ——启动时GRUB将默认启动序号为2的操作系统,即Windows_XP

    timeout=5 ——启动时菜单等待时间,可以自行修改

    splashimage=(hd0,7)/grub/splash.xpm.gz ——启动序号依次从0递增,Fedora (2.6.24.5-85.fc8)序号为0, Fedora (2.6.23.1-42.fc8)为1,Windows_XP为2.如果把Windows_XP排在最前面,则其启动序号为0.为了默认启动Windows_XP,则前面的default=2应改为default=0.

    hiddenmenu

    title Fedora (2.6.24.5-85.fc8) ——启动时Fedora (2.6.24.5-85.fc8) 菜单的标题,启动序号为0

    root (hd0,7)

    kernel /vmlinuz-2.6.24.5-85.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

    initrd /initrd-2.6.24.5-85.fc8.img

    title Fedora (2.6.23.1-42.fc8) ——Fedora (2.6.23.1-42.fc8) 菜单的标题,启动序号为1

    root (hd0,7)

    kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

    initrd /initrd-2.6.23.1-42.fc8.img

    title Windows_XP ——Windows_XP 系统的菜单标题,启动序号为2

    rootnoverify (hd0,0)

    chainloader +1

    所以,要更改启动顺序,只需要更改default=2这一行中的值

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3