Ubuntu和WIN XP双系统启动项设置详解!!!

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
yaoyuan3333
帖子: 11
注册时间: 2006-12-22 8:46

Ubuntu和WIN XP双系统启动项设置详解!!!

#1

帖子 yaoyuan3333 » 2007-03-07 10:11

[整理]有關設置grub默認進入的操作系統的問題

[說明]本帖是根据論壇里相應的帖子整理的。

oneleaf 写道:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
修改中间的 default=0


你想默認進入的操作系統位於第幾項(從0開始計算)。就把0改成幾。


下面是一個例子

假定menu.lst如下:
代码:

title Ubuntu, kernel 2.6.10-5-686
root (hd0,4)
kernel /boot/vmlinuz-2.6.10-5-686 root=/dev/hda5 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-686
savedefault
boot

title Ubuntu, kernel 2.6.10-5-686 (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.10-5-686 root=/dev/hda5 ro single
initrd /boot/initrd.img-2.6.10-5-686
savedefault
boot

title Ubuntu, kernel 2.6.10-5-386
root (hd0,4)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda5 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot

title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda5 ro single
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot

title Ubuntu, kernel memtest86+
root (hd0,4)
kernel /boot/memtest86+.bin
savedefault
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 Pro
root (hd0,0)
savedefault
makeactive
chainloader +1


假如你想把win xp作為默認的操作系統,那就把default=0改為default=6



# menu.lst - See: grub(Cool, info grub, update-grub(Cool (从第一行起)
# grub-install(Cool, grub-floppy(Cool,
# 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 (这一行就是教程里所谓的“修改中间的 default=0”,其实没=号,要讲清才能处处体现为初学者着想。)
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10 (这一行是设置启动的时间。)



一个linux初接触者
yaoyuan3333
回复