[已解决]高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

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

[已解决]高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#1

帖子 Oaksmanor » 2009-05-12 23:29

我从硬盘的镜像文件成功安装了ubuntu 9.04,重启后只有下列三项而没有windows启动项。

ubuntu9.04, kernel 2.6.28-11-generic
ubuntu9.04, kernel 2.6.28-11-generic (recovery mode)
ubuntu9.04, memtest86+




只有经GRUB选择界面选择命令行方式通过如下命令启动windows:

GRUB>root (hd0,0)

GRUB>chainloader +1

GRUB>boot


之后windows可以正常启动……。 :em06
难道我每次想进windows都得从GRUB的命令行进不成?



我也考虑过通过如下方式更改menu.lst文件,但是毫无效果。

真是不明白为什么windows从GRUB的命令行进入没问题,而写入menu.lst文件却没有效果呢?

帮我想个办法吧……



设置XP为开机默认启动。ubuntu安装后每次开机都是默认进入ubuntu系统的,对于以windows为主的朋友,每次开机都要守在画面切换到XP启动,可见十分麻烦,通过下面,你可以设置让你的XP系统为第一启动,
1.打开终端(应用程序——>附件——>终端),输入sudo gedit /boot/grub/menu.lst,敲下回车,这时要求输入password,输入登录系统的密码,在终端里不能显示输入的密码,这是正常的,输入后回车打开编辑窗口。
图片
2.通过下图不难理解,windows XP被放在最下面,顺序与开机出现画面一样,我们要做的就是把这一段拖上面位置,让它成第一启动!右键剪切如图的那段。
图片
3.然后再鼠标往中滑动几行,找到## ## End Default Options ##,将刚才剪切的那段粘贴到这里,再敲回车换行,最后保存。
图片
4.以下是我设置后的效果,相信你的也一样了,现在重启看看是不是第一项进入XP系统,第二项进入ubuntu系统。
图片
上次由 Oaksmanor 在 2009-05-14 11:57,总共编辑 3 次。
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: 高手进啊! 我成功安装了ubuntu 9.04,只是重启后没有windows启动项。

#2

帖子 速腾1994 » 2009-05-12 23:48

:em11 :em04
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#3

帖子 billbear » 2009-05-13 11:25

改成什么样了? 贴你的 menu.lst
eos
帖子: 419
注册时间: 2007-02-06 16:21

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#4

帖子 eos » 2009-05-13 14:48

你只要修改menu.lst中一个参数就行了,将光标栏放到第4位就行了。
头像
Oaksmanor
帖子: 20
注册时间: 2009-05-12 23:10

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#5

帖子 Oaksmanor » 2009-05-13 16:20

eos 写了:你只要修改menu.lst中一个参数就行了,将光标栏放到第4位就行了。
首先感谢您的回复。

我的问题是在grub的菜单中根本没有windows启动项,
只有下列三项:

ubuntu9.04, kernel 2.6.28-11-generic
ubuntu9.04, kernel 2.6.28-11-generic (recovery mode)
ubuntu9.04, memtest86+


即使我已将windows的内容添加到menu.lst中。
目前想启动windows只能通过grub>的命令行。
grub>root (hd0,0)
grub>chainloader +1
grub>boot

而后启动windows系统... ...
头像
adagio
论坛版主
帖子: 22110
注册时间: 2008-02-17 23:47
来自: 美丽富饶的那啥星球

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#6

帖子 adagio » 2009-05-13 17:16

把windows那一片放到最后,开头找找"defaults=0",改成"defaults=3"
明天就换大三八!
——8核CPU、8G内存、8T硬盘……
8卡交火,80寸大屏放8个……
IPv8的光纤要8条……

---------------------------------------------------------------------------------
[图片版]新手当自强(续)FAQ
[新手进阶]挂载、fstab、调整linux分区
[图片版]E17桌面环境配置手把手
头像
kurai
帖子: 764
注册时间: 2009-04-17 10:42

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#7

帖子 kurai » 2009-05-13 18:46

你贴你的menu.lst出来看看,
你发的教程是没错误的,有可能你写的时候写错了~~~
eos
帖子: 419
注册时间: 2007-02-06 16:21

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#8

帖子 eos » 2009-05-13 20:09

把menu.lst贴出来
clear119
帖子: 60
注册时间: 2008-11-07 10:58

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#9

帖子 clear119 » 2009-05-13 20:22

刚找到的,或许对你有用
附件
GRUB学习笔记.pdf
(154.65 KiB) 已下载 129 次
头像
Oaksmanor
帖子: 20
注册时间: 2009-05-12 23:10

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#10

帖子 Oaksmanor » 2009-05-13 21:44

eos 写了:把menu.lst贴出来
Thanks,every one! I donot have a chinese input method yet, so only choice are english.
you say may be the menu.lst file is not exist.
:em02 not really. it's exist. /boot/grub/menu.lst right there.
now i will show my menu.lst file

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

## 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=f6468679-d917-4d13-b8bd-1e04a0cd3a5b ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=f6468679-d917-4d13-b8bd-1e04a0cd3a5b

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

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

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

tital Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1


title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid f6468679-d917-4d13-b8bd-1e04a0cd3a5b
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=f6468679-d917-4d13-b8bd-1e04a0cd3a5b ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid f6468679-d917-4d13-b8bd-1e04a0cd3a5b
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=f6468679-d917-4d13-b8bd-1e04a0cd3a5b ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid f6468679-d917-4d13-b8bd-1e04a0cd3a5b
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST









********@********-laptop:~$ sudo fdisk -l
[sudo] password for ********:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x22f222f1

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5099 40957686 7 HPFS/NTFS
/dev/sda2 5100 19332 114326572+ f W95 Ext'd (LBA)
/dev/sda3 19333 19457 1004062+ 82 Linux swap / Solaris
/dev/sda5 5100 15633 84614323+ 7 HPFS/NTFS
/dev/sda6 15634 19332 29712186 83 Linux
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#11

帖子 smallapple » 2009-05-13 22:02

tital Microsoft Windows XP Professional
title Microsoft Windows XP Professional
:em06
头像
asmsa
帖子: 258
注册时间: 2008-11-16 19:56
来自: 火星

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#12

帖子 asmsa » 2009-05-13 22:07

老大,带#的行不要贴了,浪费论坛空间。
您的每句话,我都认真的看
您的每个难题,我都帮您尽量解决~
ubuntu 社区会员 asmsa
头像
Oaksmanor
帖子: 20
注册时间: 2009-05-12 23:10

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#13

帖子 Oaksmanor » 2009-05-13 22:50

smallapple 写了:
tital Microsoft Windows XP Professional
title Microsoft Windows XP Professional
:em06
:em05 Oh my god! thank you so much. It's my fault. How stupid I am! :em03
头像
Oaksmanor
帖子: 20
注册时间: 2009-05-12 23:10

Re: 高手进啊! windows从GRUB>的命令行进入没问题,而写入menu.lst文件却没有效果呢?

#14

帖子 Oaksmanor » 2009-05-14 11:59

kurai 写了:你贴你的menu.lst出来看看,
你发的教程是没错误的,有可能你写的时候写错了~~~
:em05 很不幸,你猜对了,呵呵 :em06
回复