如何更改启动顺序

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
lxxinnn
帖子: 152
注册时间: 2008-11-01 6:50

如何更改启动顺序

#1

帖子 lxxinnn » 2009-01-29 10:37

我按照UBUNTU8.04的安装方法安装后出现在了一个启动菜单,要移动光标选择要启动的操作系统。我想要常用的XP,但XP在最后一项,每次要移下光标才行,我按照的论坛里的方法改动了default 11,但重启后仍和原来的一样,下边是我的MEUN。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 11

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

## 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=1483b705-110f-4e40-a616-216f2c17ed8e ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## 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

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## 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

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.04.2, kernel 2.6.24-23-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.04.2, kernel 2.6.24-23-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro single
initrd /boot/initrd.img-2.6.24-23-generic

title Ubuntu 8.04.2, kernel 2.6.24-22-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.24-22-generic
quiet

title Ubuntu 8.04.2, kernel 2.6.24-22-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro single
initrd /boot/initrd.img-2.6.24-22-generic

title Ubuntu 8.04.2, kernel 2.6.24-21-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.24-21-generic
quiet

title Ubuntu 8.04.2, kernel 2.6.24-21-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro single
initrd /boot/initrd.img-2.6.24-21-generic

title Ubuntu 8.04.2, kernel 2.6.24-19-generic
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro quiet splash locale=zh_CN
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.2, kernel 2.6.24-19-generic (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=1483b705-110f-4e40-a616-216f2c17ed8e ro single
initrd /boot/initrd.img-2.6.24-19-generic

title Ubuntu 8.04.2, memtest86+
root (hd0,7)
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 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1


default 11这是地方原来的default 0
头像
Mosky
帖子: 17
注册时间: 2009-01-29 0:33

Re: 如何更改启动顺序

#2

帖子 Mosky » 2009-01-29 14:45

您好,
要不要试看看Startup Manager XD"
这是一个图形化的开机选单编辑器。

(最近一直似乎推荐人用啊 XD")

代码: 全选

sudo apt-get install startupmanager
安装好后在系统/管理可以找的到: )

印象中,default的值是从0开始算的吧?
刚刚看了一下英文说明,应该是从0开始的,
所以这里应该设成 10 ?

看了一下您的开机选单,还满多旧核心的选项,
如果不需要的话,可以先备份一下开机选单,
再把那些不用的选项给移除,不会有事的 : )

有事的话用Live CD修吧 (被踢飞
lxxinnn
帖子: 152
注册时间: 2008-11-01 6:50

Re: 如何更改启动顺序

#3

帖子 lxxinnn » 2009-01-30 0:23

用Startup Manager XD"这个也可以,
这是一个图形化的开机选单编辑器。但要先要有ROOT权限,在ROOT下运行里边带单引号的那个提示命令就行了。

找到一个去掉旧内核的方法,很好用的用这个可以删除旧内核
sudo aptitude purge ~ilinux-image-.*\(\!`uname -r`\)
yankai.720p
帖子: 1
注册时间: 2009-01-30 15:52

Re: 如何更改启动顺序

#4

帖子 yankai.720p » 2009-02-07 0:28

的确不错,表扬
samuraishw
帖子: 5
注册时间: 2009-04-16 8:33

Re: 如何更改启动顺序

#5

帖子 samuraishw » 2009-04-16 8:39

最简单的方法就是把这些移动到ubuntu前面就可以了
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
我就是这么弄的,修改后保存然后重起,重起时会有一会没反映,不要着急,等一下就可以了,之后会发现xp在最上面,然后下面好象有一个是other operate system 但是下面就什么都没有了.
头像
lerosua
论坛版主
帖子: 8455
注册时间: 2007-11-29 9:41
联系:

Re: 如何更改启动顺序

#6

帖子 lerosua » 2009-04-16 9:39

真多啊 改default 11那个数字,
头像
yulin
帖子: 36
注册时间: 2009-03-18 15:52
联系:

Re: 如何更改启动顺序

#7

帖子 yulin » 2009-04-20 0:08

我觉得最简单的方法是在VI 里面修改就可以了。把那个Default的数值改下就可以了

用Root

OK
就这样
回复