{comm_author} 在 {comm_posttime} 说:
{comm_content}
需要修改
/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 |
共设置了5个选项。
如果default为0的话,则表示默认启动第一个系统;
如果想设置为XP为默认启动系统,需要将default设置为4。