红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Ubuntu

Ubuntu7.10与Windows双系统下修改Grub启动顺序

发布时间:2007-11-17 01:26:02来源:红联作者:redfans
需要修改
/boot/grub/menu.lst文件
需要root权限

注意:
1. 引导文件很重要,所以修改的时候要谨慎,提前备份一下;

sudo cp /boot/grub/menu.lst /boot/grub/menu_backup.lst //使用root权限cp备份menu.lst文件

2. 命令行下root权限调用gedit修改:

sudo gedit /boot/grub/menu.lst //使用gedit修改menu.lst文件

3. menu.lst文件中的内容:

a. 可以查看

## ## End Default Options ##
之后的部分列出了各个系统的列表及顺序

b. 搜索

## default num
可以设置默认的启动系统,

default 0
之后的数字即是a中系统的顺序,注意是从0开始。

例如:
倘若a.中列出来的系统分别为:[code]## ## End Default Options ##

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=0a8135b7-7a72-4ad1-8df3-865210546957 ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.22-14-generic
quiet


title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,7)kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=0a8135b7-7a72-4ad1-8df3-865210546957 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,7)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1[/code]共设置了5个选项。

如果default为0的话,则表示默认启动第一个系统;
如果想设置为XP为默认启动系统,需要将default设置为4。
文章评论

共有 2 条评论

  1. qiqixx 于 2007-11-20 21:26:03发表:

    貌似在RF6的介个文件中看到类似的东东,修改下试试(o):tx ,谢谢分享(e:e2s

  2. uengfyj 于 2007-11-20 16:42:38发表:

    thanks,great!