root@ns:~# vi /boot/grub/menu.lst
# 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 use 'savedefault' or your
# array will desync and will not let you boot your system.
第一步:设置默认启动选项
default 6 #从0开始,如果设置第N个Title为启动选项,此值设为N-1
default的意思就是默认情况下计算机要选择启动的系统,如果起后面的参数设置为“0“代表从第一个启动系统计算机,如果设置为“1”代表从第二系统启动计算机,依次类推选择你要优先启动的系统。
第二步:设置启动许等待的时间
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5
timeout 的意思是设置计算机默认要启动的系统需要等待的时间。在此设为5秒
好了,差不多设置完毕。此时计算机在5秒后就默认启动Microsoft Windows XP xqfeng2008 系统
## ## End Default Options ##
如下的title是你已安装的操作系统,在开机时显示的顺序。依次为0 1 2 3 4 ......
title Ubuntu 8.04.2, kernel 2.6.24-23-generic 这是对应default 0
root (hd0,5)
kernel /vmlinuz-2.6.24-23-generic root=UUID=0f4e7ca3-9054-4a66-a9b6-d8cfd43eaf3e ro quiet splash
initrd /initrd.img-2.6.24-23-generic
quiet
title Ubuntu 8.04.2, kernel 2.6.24-23-generic (recovery mode) 这是对应default 1
root (hd0,5)
kernel /vmlinuz-2.6.24-23-generic root=UUID=0f4e7ca3-9054-4a66-a9b6-d8cfd43eaf3e ro single
initrd /initrd.img-2.6.24-23-generic
title Ubuntu 8.04.2, kernel 2.6.22-14-generic 这是对应default 2
root (hd0,5)
kernel /vmlinuz-2.6.22-14-generic root=UUID=0f4e7ca3-9054-4a66-a9b6-d8cfd43eaf3e ro quiet splash
initrd /initrd.img-2.6.22-14-generic
quiet
title Ubuntu 8.04.2, kernel 2.6.22-14-generic (recovery mode) 这是对应default 3
root (hd0,5)
kernel /vmlinuz-2.6.22-14-generic root=UUID=0f4e7ca3-9054-4a66-a9b6-d8cfd43eaf3e ro single
initrd /initrd.img-2.6.22-14-generic
title Ubuntu 8.04.2, memtest86+ 这是对应default 4
root (hd0,5)
kernel /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: 这是对应default 5
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP xqfeng2008 这是对应default 6
root (hd0,0)
savedefault
makeactive
chainloader +1