原文来自:http://www.blogjava.net/waterjava/archi ... 31590.html装了Ubuntu和XP双系统后,变得很麻烦,每次都得在启动菜单上选来选去,浪费了不少时间。
现在想修改使XP成为默认的操作系统,怎么办呢?
其实很简单,修改 /boot/grub/menu.lst 文件,使其中 default 值变动一下即可。
过程如下:
1、打开命令行终端;
2、输入:注: 第一句做备份用。代码: 全选
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak sudo gedit /boot/grub/menu.lst
3、假设文件内容如下:
--------------------------------------------------------------------------------------------------------------------------代码: 全选
# menu.lst - See: grub(8), info grub, update-grub(8) # grub-install(8), grub-floppy(8), # grub-md5-crypt, /usr/share/doc/grub # and /usr/share/doc/grub-doc/. ## default num # Set the default entry to the entry number NUM. Numbering starts from 0, and # the entry number 0 is the default if the command is not used. # # You can specify 'saved' instead of a number. In this case, the default entry # is the entry saved with the command 'savedefault'. # WARNING: If you are using dmraid do not change this entry to 'saved' or your # array will desync and will not let you boot your system. default 0 ## timeout sec # Set a timeout, in SEC seconds, before automatically booting the default entry # (normally the first entry defined). timeout 10 ## hiddenmenu # Hides the menu by default (press ESC to see the menu) #hiddenmenu ## ## End Default Options ## title Ubuntu, kernel 2.6.15-23-386 root (hd0,2) kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash initrd /boot/initrd.img-2.6.15-23-386 savedefault boot title Ubuntu, kernel 2.6.15-23-386 (recovery mode) root (hd0,2) kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single initrd /boot/initrd.img-2.6.15-23-386 boot title Ubuntu, memtest86+ root (hd0,2) kernel /boot/memtest86+.bin boot ### 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/hda1 title Microsoft Windows XP Professional root (hd0,0) savedefault makeactive chainloader +1
现在default值为0,意即启动排行第一的操作系统,这里代表的就是Ubuntu, kernel 2.6.15-23-386。
现在把它修改成“default 4”,那么XP就成为默认的操作系统了。
因为从零数起,以title打头的Microsoft Windows XP Professional这一行排序为4。
另外我们还可以通过修改timeout的值来变更默认等待时间。
[分享]刚刚找的一个双系统修改默认启动系统的方法!!
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 310
- 注册时间: 2007-03-07 14:56
- 来自: 山东菏泽成武
- 联系:
[分享]刚刚找的一个双系统修改默认启动系统的方法!!
- aerowolf
- 帖子: 1787
- 注册时间: 2006-02-25 17:09
- 来自: 西安
-
- 帖子: 310
- 注册时间: 2007-03-07 14:56
- 来自: 山东菏泽成武
- 联系:
正在看呢aerowolf 写了:恭喜,你的喜悦让我想起了自己几年前的心情,当时我也遇到并解决了相同的问题。
有空试试viewtopic.php?t=34110,一劳永逸,真的好用。
呵呵
还是你推荐的办法好!
自检也快
-
- 帖子: 3
- 注册时间: 2013-03-21 18:31
- 系统: win7+ubuntu
Re: [分享]刚刚找的一个双系统修改默认启动系统的方法!!
mark
不错,新手会用到!!
不错,新手会用到!!