启动菜单看不到win7[已经解决了]

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
语林0
帖子: 3
注册时间: 2009-06-02 19:18

启动菜单看不到win7[已经解决了]

#1

帖子 语林0 » 2009-06-02 20:51

我先安装windows7,然后是ubuntu9.04,然后修改grub增加windows启动项。
具体步骤如下:
1.复制ubuntu9.04光盘镜像文件到C盘根目录
2.复制镜像文件中casper目录下的initrd.gz和vmlinuz到C盘根目录
3.下载grub4dos,解压其中的grldr、grldr.mbr、grub.exe到C盘根目录
4.新建memu.lst文件内容如下:
代码:

代码: 全选

title  Install Ubuntu 9.04
 root (hd0,0)
 kernel (hd0,0)/vmlinuz boot=casper iso-scan/filename=/ubuntu-9.04-desktop-i386.iso ro quiet splash locale=zh_CN.UTF-8
 initrd /initrd.gz
 boot
5.复制xp系统里的boot.ini到C盘根目录,代码如下:

代码: 全选

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
c:\grldr.mbr="grub"
之后 就是重启进入自动安装了
=======================================
=======================================
问题是:现在 重启后只有下列三项而没有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。 再重启又没windows了 :em20

这是我现在的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		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
#
#

#
# 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=2e7276aa-8bc6-4db5-89e1-ab5d705b45de ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=2e7276aa-8bc6-4db5-89e1-ab5d705b45de

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

[b]tille           Windows 7
root            (hd0,0)
savedefault
makeactive
chainloader     +1[/b]   这几行粗体字是我根据论坛上的方法加的,可没效果

title		Ubuntu 9.04, kernel 2.6.28-11-generic
uuid		2e7276aa-8bc6-4db5-89e1-ab5d705b45de
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=2e7276aa-8bc6-4db5-89e1-ab5d705b45de 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		2e7276aa-8bc6-4db5-89e1-ab5d705b45de
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=2e7276aa-8bc6-4db5-89e1-ab5d705b45de ro  single
initrd		/boot/initrd.img-2.6.28-11-generic

title		Ubuntu 9.04, memtest86+
uuid		2e7276aa-8bc6-4db5-89e1-ab5d705b45de
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST
我的硬盘分区
sudo fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0b1d0b1

Device Boot Start End Blocks Id System 是60G的盘
/dev/sda1 * 1 2432 19535008+ 7 HPFS/NTFS 我记得在安装时看的,这里好像是Win7 的C盘 18.6G
/dev/sda2 2433 7296 39070080 5 Extended 这里是什么不知道,之前好像没的
/dev/sda5 2433 4615 17533665+ 7 HPFS/NTFS 这里是我的D盘 16.7G
/dev/sda6 4615 6149 12323074 7 HPFS/NTFS 这里是我的E盘 11.8G
/dev/sda7 6150 6212 506016 82 Linux swap / Solaris 518MB的交换空间
/dev/sda8 6213 7296 8707198+ 83 Linux ext4的ubuntu主空间
装ubuntu的空间原来是8.8G的F盘

:em06 问题如上,还请大家帮忙解决 我还是个小白 :em02
上次由 语林0 在 2009-06-03 10:12,总共编辑 1 次。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 启动菜单看不到win7

#2

帖子 smallapple » 2009-06-02 21:42

tille Windows 7
root (hd0,0)
savedefault
makeactive
chainloader +1
这几行粗体字是我根据论坛上的方法加的,可没效果

代码: 全选

 title    Windows 7
root (hd0,0)
savedefault
makeactive
chainloader +1
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: 启动菜单看不到win7

#3

帖子 wangdu2002 » 2009-06-02 21:48

楼主,参考楼上,你的title写错了! :em04
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
语林0
帖子: 3
注册时间: 2009-06-02 19:18

Re: 启动菜单看不到win7

#4

帖子 语林0 » 2009-06-03 10:11

:em20 真是单词错了,晕!!

不够细心阿!! :em06 就把别人的给粘贴了下,就没看了,
luckysir0
帖子: 50
注册时间: 2008-05-25 19:19

Re: 启动菜单看不到win7[已经解决了]

#5

帖子 luckysir0 » 2009-06-03 10:37

呵呵,我在xp下装也碰到这个问题,吓我一跳,差点就重装
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 启动菜单看不到win7[已经解决了]

#6

帖子 billbear » 2009-06-03 10:59

硬盘安装建议把 iso 放在非 c 盘,否则可能不会自动生成 windows 启动项。
回复