硬盘安装9.04后系统选择无windows

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
头像
tututa
帖子: 11
注册时间: 2009-04-20 20:29

硬盘安装9.04后系统选择无windows

#1

帖子 tututa » 2009-04-25 15:43

前日刚硬盘安装ubuntu9.04

安装完毕后启动几次都直接进入ubuntu,把windows给直接忽略了

进ubuntu前有3妙按esc的选项

进入后也只有ubuntu的3个选项 没有windows的选项

有时需要windows,但不能进入,该怎么做?

如果编写grub的话请说明详细步骤……

谢谢
그해 겨울...
xiaohenet
帖子: 3
注册时间: 2008-10-12 4:02

Re: 硬盘安装9.04后系统选择无windows

#2

帖子 xiaohenet » 2009-04-25 21:46

具体实现:

cat >> /boot/grub/menu.lst << "EOF"
title Microsoft Windows Xp
rootnoverify (hd0,0)
chainloader +1
EOF


其中
1. menu.lst是grub配置文件,也可能是grub.conf,视具体情况修改
2. rootnoverify (hd0,0)中,hd0是硬盘序号,0是分区序号,都是从0开始,视具体情况修改
BillyChow
帖子: 42
注册时间: 2007-06-12 17:49

Re: 硬盘安装9.04后系统选择无windows

#3

帖子 BillyChow » 2009-04-27 19:32

have a try...
thanks for upstairs.
头像
Oaksmanor
帖子: 20
注册时间: 2009-05-12 23:10

Re: 硬盘安装9.04后系统选择无windows

#4

帖子 Oaksmanor » 2009-05-13 0:31

我从硬盘的镜像文件成功安装了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系统。
图片
头像
darasion
帖子: 1153
注册时间: 2007-12-05 12:25

Re: 硬盘安装9.04后系统选择无windows

#5

帖子 darasion » 2009-05-13 0:36

:em02

grub 菜单还可以隐藏的。
碧海a星辰
帖子: 4
注册时间: 2009-05-10 18:27

Re: 硬盘安装9.04后系统选择无windows

#6

帖子 碧海a星辰 » 2009-05-13 9:09

sudo gedit /boot/grub/menu.lst这条命令就进不去?!!
头像
fjgggeee
帖子: 121
注册时间: 2008-09-08 19:09

Re: 硬盘安装9.04后系统选择无windows

#7

帖子 fjgggeee » 2009-05-13 15:25

你进/boot/grub/看看,可能你的menu.lst已经丢失了~
头像
Oaksmanor
帖子: 20
注册时间: 2009-05-12 23:10

Re: 硬盘安装9.04后系统选择无windows

#8

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

fjgggeee 写了:你进/boot/grub/看看,可能你的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
Super126
帖子: 557
注册时间: 2008-03-30 8:46
来自: 江西吉安

Re: 硬盘安装9.04后系统选择无windows

#9

帖子 Super126 » 2009-05-13 21:46

Oaksmanor 写了:我从硬盘的镜像文件成功安装了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系统。
图片
貌似你写错了,改改吧:

代码: 全选

title Microsoft Windows XP Professional
root (hd0,0)
chainloader +1
或者:

代码: 全选

title Microsoft Windows XP Professional
chainloader (hd0,0)+1
很明显,你搞错了:
Oaksmanor 写了:## ## End Default Options ##

tital Microsoft Windows XP Professional //title not tital
rootnoverify (hd0,0)
savedefault
makeactive //this common is to set active
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
PS: LZ也可以这么搞。
回复