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

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
hcym
帖子: 15634
注册时间: 2007-05-06 2:46

#46

帖子 hcym » 2007-05-07 19:16

试试改为VISTA


难弄哦
头像
天涯海客
帖子: 69
注册时间: 2007-05-12 23:50

#47

帖子 天涯海客 » 2007-05-18 16:48

szlychee 写了:记得有一个字符界面分辨率的选项,好像是vga=???什么的。请问1280×1024如何设置?
在系统选项中有一个调节屏幕分辨率的选项。你可以用这个试一下。 :lol:
jackbest1984
帖子: 20
注册时间: 2007-05-11 19:11

#48

帖子 jackbest1984 » 2007-05-23 21:28

谢谢了哈 ~
学习了 ~
头像
angel502108
帖子: 65
注册时间: 2006-12-27 17:26

哈哈……最后,我来一个总结

#49

帖子 angel502108 » 2007-05-26 18:59

在终端中输入:

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst

第一行(sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup)表示备份,下一行表示用编辑器打开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 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

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=d446a229-342d-4ea1-8fd2-748264cd3feb ro
# kopt_2_6=root=/dev/sda8 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,7)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash locale=zh_CN

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title Ubuntu, kernel 2.6.17-11-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sda8 ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.17-11-generic
quiet
savedefault
boot

title Ubuntu, kernel 2.6.17-11-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-11-generic root=/dev/sda8 ro single
initrd /boot/initrd.img-2.6.17-11-generic
boot

title Ubuntu, kernel 2.6.17-10-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda8 ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/sda8 ro single
initrd /boot/initrd.img-2.6.17-10-generic
boot

title Ubuntu, memtest86+
root (hd0,7)
kernel /boot/memtest86+.bin
quiet
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/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
大家看到红色加大的default 0,

它默认为0,即表示
title Ubuntu, kernel 2.6.17-11-generic
如果想把启动菜单中的Microsoft Windows XP Professional设置为默认的启动系统,只需把 0 改为 6

即可,因为它在位置6(第6个title),这里特别强调一下,并不是楼上有的朋友说的行数减一,或者从0开始。
头像
alpeak
帖子: 94
注册时间: 2007-05-13 19:52
来自: Soochow, China
联系:

#50

帖子 alpeak » 2007-06-10 16:03

怎么每一行都有SAVEDEFAULT啊.
这一句的作用是什么能不能告诉我啊.谢谢.
armeria
帖子: 123
注册时间: 2007-05-29 5:20

#51

帖子 armeria » 2007-06-12 5:56

alpeak 写了:怎么每一行都有SAVEDEFAULT啊.
这一句的作用是什么能不能告诉我啊.谢谢.
## 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
头像
alpeak
帖子: 94
注册时间: 2007-05-13 19:52
来自: Soochow, China
联系:

#52

帖子 alpeak » 2007-06-12 19:37

armeria 写了:
alpeak 写了:怎么每一行都有SAVEDEFAULT啊.
这一句的作用是什么能不能告诉我啊.谢谢.
## 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
看到这个提示的.但是不懂.或者说没看明白. :(
dannyliyang
帖子: 2
注册时间: 2007-03-17 22:08

#53

帖子 dannyliyang » 2007-06-19 10:38

恩 看过了
头像
millenniumdark
论坛版主
帖子: 4159
注册时间: 2005-07-02 14:41
系统: Ubuntu 14.04 (Kylin)
联系:

#54

帖子 millenniumdark » 2007-06-19 19:17

angel502108 写了:因为它在位置6(第6个title),这里特别强调一下,并不是楼上有的朋友说的行数减一,或者从0开始。
你再数数看,如果从0开始算,就是第6个title 从1开始,就是第7个
头像
wuzhaoyoung
帖子: 80
注册时间: 2007-08-05 21:58
来自: 浙江杭州+台州

#55

帖子 wuzhaoyoung » 2007-08-05 22:52

纯新人~

不好意思~

以后请大家多关照了
流烈彬
帖子: 33
注册时间: 2005-10-07 23:06

#56

帖子 流烈彬 » 2007-09-18 0:09

一直一个。。。系统
shannon_sdu
帖子: 5
注册时间: 2007-06-10 13:05

#57

帖子 shannon_sdu » 2007-10-08 21:14

其实,我觉得如果楼主在帖子中解释这个列表文件的时候,把前面的解释的头(包含default 0的那部分)加上,就不会出这么多麻烦了,就像49楼那样。
不过49楼所说的“因为它在位置6(第6个title),这里特别强调一下,并不是楼上有的朋友说的行数减一,或者从0开始”我觉得好像不太对,很明显,列表里一共有7个title,而xp在第七个,第一个是default 0的话,那么第七个就是default 6

是应该这么理解的吧
huang2030
帖子: 21
注册时间: 2007-12-17 22:03

#58

帖子 huang2030 » 2007-12-19 13:20

不错,谢谢了
独山子
帖子: 7
注册时间: 2007-12-21 22:15

#59

帖子 独山子 » 2008-01-20 20:39

学习了,进去看了看,没有动,明白意思了
默认的就是ubuntu,以后就用他
偶然花开
帖子: 35
注册时间: 2007-12-03 15:22

#60

帖子 偶然花开 » 2008-02-03 16:59

我每次开机看到启动菜单那么一大串——七个哦,实在不爽,而且内核升级之后启动选项里还有旧的内核,是不是可以删掉啊?如下是我的menulst里的启动选项:
## ## End Default Options ##

title Ubuntu hardy (development branch), kernel 2.6.24-5-generic
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-5-generic root=UUID=8b201e63-845c-47fe-b03a-db6c349eade8 ro quiet splash
initrd /boot/initrd.img-2.6.24-5-generic
quiet

title Ubuntu hardy (development branch), kernel 2.6.24-5-generic (recovery mode)
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-5-generic root=UUID=8b201e63-845c-47fe-b03a-db6c349eade8 ro single
initrd /boot/initrd.img-2.6.24-5-generic

title Ubuntu hardy (development branch), kernel 2.6.24-3-generic
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-3-generic root=UUID=8b201e63-845c-47fe-b03a-db6c349eade8 ro quiet splash
initrd /boot/initrd.img-2.6.24-3-generic
quiet

title Ubuntu hardy (development branch), kernel 2.6.24-3-generic (recovery mode)
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-3-generic root=UUID=8b201e63-845c-47fe-b03a-db6c349eade8 ro single
initrd /boot/initrd.img-2.6.24-3-generic

title Ubuntu hardy (development branch), memtest86+
root (hd0,8)
kernel /boot/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:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1

有kernel 2.6.24-5-generic,也有kernel 2.6.24-3-generic,请问kernel 2.6.24-3-generic的是否可以删除?那样会简洁一些。先谢谢了!
回复