在开机管理程序中怎么把windows调到最前面

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
xiaoling
帖子: 52
注册时间: 2008-07-04 17:35

在开机管理程序中怎么把windows调到最前面

#1

帖子 xiaoling » 2008-11-04 11:50

我装的是windows2003跟u8.04
/boot/grub/menu.lst脚本如下:
wmxez@ubuntu:~/桌面$ cat /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 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=5a35e889-a87f-4999-b037-b6e82885a588 ro

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

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

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

## 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.1, kernel 2.6.24-21-generic
root (hd1,5)
kernel /vmlinuz-2.6.24-21-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro quiet splash
initrd /initrd.img-2.6.24-21-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root (hd1,5)
kernel /vmlinuz-2.6.24-21-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro single
initrd /initrd.img-2.6.24-21-generic

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd1,5)
kernel /vmlinuz-2.6.24-19-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro quiet splash
initrd /initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd1,5)
kernel /vmlinuz-2.6.24-19-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro single
initrd /initrd.img-2.6.24-19-generic

title Ubuntu 8.04.1, kernel 2.6.24-16-generic
root (hd1,5)
kernel /vmlinuz-2.6.24-16-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro quiet splash
initrd /initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root (hd1,5)
kernel /vmlinuz-2.6.24-16-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro single
initrd /initrd.img-2.6.24-16-generic

title Ubuntu 8.04.1, memtest86+
root (hd1,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:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Server 2003
root (hd0,0)
savedefault
makeactive
chainloader +1
问题是在开机管理程序中怎么把windows调到最前面?谢谢!
头像
jeffwei
帖子: 1344
注册时间: 2007-05-12 22:48

Re: 在开机管理程序中怎么把windows调到最前面

#2

帖子 jeffwei » 2008-11-04 12:17

你的内核太多了,留一个稳定的够了
你把

代码: 全选

default 0
改成

代码: 全选

default 8
就是默认启动win2003了

代码: 全选

timeout 10
的10表示等待的秒数,可以自己改
8是这么来的,你启动的时候看到n行,那么要默认启动那个就把0改成n-1,因为从0开始计数,所以不是n
在menu.lst你面就是数前面没有#的title有几个
开头有#的行都注释掉了的,不起作用了。所以你可以把不要的注释掉,当然最好直接卸载了
xiaoling
帖子: 52
注册时间: 2008-07-04 17:35

Re: 在开机管理程序中怎么把windows调到最前面

#3

帖子 xiaoling » 2008-11-04 20:12

jeffwei 写了:你的内核太多了,留一个稳定的够了
你把

代码: 全选

default 0
改成

代码: 全选

default 8
就是默认启动win2003了

代码: 全选

timeout 10
的10表示等待的秒数,可以自己改
8是这么来的,你启动的时候看到n行,那么要默认启动那个就把0改成n-1,因为从0开始计数,所以不是n
在menu.lst你面就是数前面没有#的title有几个
开头有#的行都注释掉了的,不起作用了。所以你可以把不要的注释掉,当然最好直接卸载了
应该是把default 8改为 default 7吧 因为它是从0-7开始算的 所以应该是7 yes?
写脚本有注释就是方便 不过自己没好好看 有些单词不懂 知道个大概
谢谢!
xiaoling
帖子: 52
注册时间: 2008-07-04 17:35

Re: 在开机管理程序中怎么把windows调到最前面

#4

帖子 xiaoling » 2008-11-04 20:53

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd1,5)
kernel /vmlinuz-2.6.24-21-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro quiet splash
initrd /initrd.img-2.6.24-21-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-21-generic (recovery mode)
root (hd1,5)
kernel /vmlinuz-2.6.24-21-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro single
initrd /initrd.img-2.6.24-21-generic

title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd1,5)
kernel /vmlinuz-2.6.24-19-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro quiet splash
initrd /initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd1,5)
kernel /vmlinuz-2.6.24-19-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro single
initrd /initrd.img-2.6.24-19-generic

title Ubuntu 8.04.1, kernel 2.6.24-16-generic
root (hd1,5)
kernel /vmlinuz-2.6.24-16-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro quiet splash
initrd /initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root (hd1,5)
kernel /vmlinuz-2.6.24-16-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro single
initrd /initrd.img-2.6.24-16-generic

title Ubuntu 8.04.1, memtest86+
root (hd1,5)
kernel /memtest86+.bin
quiet
还想问下这段脚本怎么没看到类似"echo"的命令啊它是用其他脚本语言写的?
还有就是开机管理程序界面只有:它们每段开头的第一行显示并没这些”root (hd1,5)
kernel /vmlinuz-2.6.24-16-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro single
initrd /initrd.img-2.6.24-16-generic“选择e进行编辑才会有除每段第一行外的内容出现
why?
cnjsyz
帖子: 9
注册时间: 2008-10-06 10:25

Re: 在开机管理程序中怎么把windows调到最前面

#5

帖子 cnjsyz » 2008-11-05 22:58

试试我的方法,不知行不行。把
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Server 2003
root (hd0,0)
savedefault
makeactive
chainloader +1

剪切到下面的空行中
## ## End Default Options ##

title Ubuntu 8.04.1, kernel 2.6.24-21-generic
root (hd1,5)
kernel /vmlinuz-2.6.24-21-generic root=UUID=5a35e889-a87f-4999-b037-b6e82885a588 ro quiet splash
initrd /initrd.img-2.6.24-21-generic
quiet

试一下我的XP和U8.10成功了,就是时间没改好。
dailyubuntu
帖子: 13
注册时间: 2008-11-12 13:39

Re: 在开机管理程序中怎么把windows调到最前面

#6

帖子 dailyubuntu » 2008-11-12 14:22

对于在windowns中安装ubuntu8.04的双系统
右键点击我的电脑-》系统属性-》高级-》启动和故障恢复-》设置-》默认操作系统中选择哪个在前
回复