对于使用ubuntu9.10+的人来说最大的问题就是怎么修改系统的启动顺序。以前的版本可以通过修改menu.lst来更改启动顺序。现在我们需要做得只是修改 /etc/default/grub 文件即可
在终端输入
sudo gedit /etc/default/grub
打开如下文字:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=4
----------默认的是0 改为你学要启动系统的位置即可,可以在开机的时候自己数以下
#GRUB_HIDDEN_TIMEOUT=0
----------这一项是决定要不要隐藏开机系统选择界面的,不用管它
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=3
----------这一项改变开机时选择系统时间的,一般改为3就可以了
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=" vga=792 splash"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1280x800
------------改变选择系统界面的分辨率,一般默认即可,也可以改为你机子的分辨率,记得把前面的#去掉
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
修改完成后,保存,退出,然后在终端输入
sudo update-grub
重置你的配置不然你的修改是不会起作用的。
关于grub2的更多设置可以参考:
http://docs.google.com/Doc?docid=0AeVQ5PqmbeaoZGc0czgyOWtfMjRjbWo0ODVoYw&hl=en
______________________________________________________________________________________________ ------------------------------------------------------------------------------------------------------------------------------------
经过grub2的资料学习,发现grub2是通过/etc/grub.d/目录下的文件顺序来决定启动项顺序的: $cd /etc/grub.d
30_os-prober是grub2自动生成的,因为我安装ubuntu linux之前就有vista在电脑上。目录下有各README文件,打开查看里面的内容:
大意是: 该目录下的可以执行文件的顺序是按照shell扩展来排列的(就是按首字符排列的意思,用来配置grub的顺序)。 00_开头的文件是预留给00_header的 可以新建和改变文件的顺序来配置gurb2的启动顺序。 知道以上这些就好办了。我们只要把30_os-prober的顺序设置到10_linux之前就可以让windows的选项在linux之前。 运行以下命令把30_os-prober复制一份并且重命名为09_os-prober: $sudo cp 30_os-prober 09_os-prober 然后去掉30_os-prober的可执行权限: $sudo chmod 644 30_os-prober -rwxr-xr-x 1 root root 3296 2009-10-24 08:44 00_header 然后打开/etc/default/grub把默认启动改成你要的那个: $sudo gedit /etc/default/grub 找到GRUB_DEFAULT=,改后面的参数。(注意linux的顺序是从0开始的哦),我设置为第一项vista,于是把默认改成噢0(GRUB_DEFAULT=0) 最后更新grub: $sudo update-grub [sudo] password for shawn: |