首 页文章中心

Linux学习网

您的位置Linux学习网 > Linux基本应用 > 文章内容

让ubuntu固定启动某一项

作者:佚名  来源:不详  发布时间:2007-12-29 8:08:00
这个问题的来由是这样:
如果你有一个朋友,希望使用你的计算机(他希望使用Windows)。可是当计算机启动的时候,他有可能被Grub列出的操作系统启动给弄蒙了,甚至不知道要用键盘来选择启动Windows(如果默认不是Windows的话),于是Ubuntu启动了,于是他进入了一个陌生的世界。当然你可以从头开始教,如果还是一个漂亮MM的时候。可是如果他是一个纯粹的“计算机使用主义者”的话,只想进入熟悉的Windows系统,这就要需要重新启动你的系统,甚至有的时候,让人觉得你是在故意炫耀你的计算机水平。

如何解决?
在Grub里面,改动/boot/grub/menu.lst里面的defaultnumber,就可以设置默认项了。OK,现在搞定了。不过,好日子没过多久,在你apt更新,安装了新的linux kernel就失效了。因为系统清单更新了,设置也就指向了错误的选项,大部分是memtest+。

我看到有的说,设置defaultnumber为-1,就可以默认启动Windows了,不过我从来没有成功过。

有一天,我从menu.lst里面看到了这些:
## 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

现在好像可以了。

自己琢磨吧。
收藏本页到: 365Key | del.icio.us | | 添加到雅虎收藏+
  • 网站帮助 - 广告合作 - 网站地图