急……求救,装Ubuntu后无法进入win7。。。

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
zby0826
帖子: 6
注册时间: 2011-01-19 17:14

急……求救,装Ubuntu后无法进入win7。。。

#1

帖子 zby0826 » 2011-01-19 17:22

本人新买的电脑,预装WIN7,装Ubuntu的时候在准备开始安装的高级选项里,选了安装引导程序在WIN7所在的dev/sda2……
结果出现问题,在GRUB界面下选择win7,按了之后光标闪了几秒再次回到GRUB界面,无法进入WIN7系统。
向高手求救。。。
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 急……求救,装Ubuntu后无法进入win7。。。

#2

帖子 onshoestring » 2011-01-19 17:32

/etc/grub.d/40_custom加入如下内容:
menuentry "Grub for Dos" {
search --set -f /grub.exe
linux /grub.exe
}

代码: 全选

sudo update-grub

下载grub4dos, http://nufans.net/grub4dos/current_release/grub4dos-0.4.4-2009-10-16.zip,把grub4dos文件grub.exe复制一份到c:\

c:\建立一menu.lst文件,内容如下。
default 0
timeout 0
title Windows
chainloader /bootmgr
boot
zby0826
帖子: 6
注册时间: 2011-01-19 17:14

Re: 急……求救,装Ubuntu后无法进入win7。。。

#3

帖子 zby0826 » 2011-01-19 17:54

能不能再通俗一点 啊 ,小 弟刚玩UBUNTU 什么都不会.......
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 急……求救,装Ubuntu后无法进入win7。。。

#4

帖子 onshoestring » 2011-01-19 18:00

要更通俗就把我难住了。
你有win7安装光盘或pe么?
zby0826
帖子: 6
注册时间: 2011-01-19 17:14

Re: 急……求救,装Ubuntu后无法进入win7。。。

#5

帖子 zby0826 » 2011-01-19 18:11

预装是64位的系统,有的系统盘却是32位的,试了没用……
呃,怎么在/etc/grub.d/40_custom里加入内容啊?grub.cfg说不让修改……下面那一行代码又是什么意思啊?
还请大虾帮忙啊……
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 急……求救,装Ubuntu后无法进入win7。。。

#6

帖子 onshoestring » 2011-01-19 18:15

代码: 全选

sudo gedit /etc/grub.d/40_custom
加到文件最后空白处
zby0826
帖子: 6
注册时间: 2011-01-19 17:14

Re: 急……求救,装Ubuntu后无法进入win7。。。

#7

帖子 zby0826 » 2011-01-19 18:20

试了,还是不行啊……
grub里按WINDOWS 7还是一个情况,多了一行“grub for dos”,进去之后闪几下按“windows” 出现:
Booting windows
chainloder /bootmgr
error 15 :file not find
。。。。。。
怎么办呢?
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 急……求救,装Ubuntu后无法进入win7。。。

#8

帖子 onshoestring » 2011-01-19 18:21

在浏览器里 ctrl-c 是复制,在终端里 ctrl-shift-v 是粘帖
终端运行:

代码: 全选

 cd ~/桌面 && wget 'http://nchc.dl.sourceforge.net/project/bootinfoscript/bootinfoscript/0.55/boot_info_script055.sh' && sudo bash boot_info_script055.sh
把RESULTS.txt文件内容贴上来。
zby0826
帖子: 6
注册时间: 2011-01-19 17:14

Re: 急……求救,装Ubuntu后无法进入win7。。。

#9

帖子 zby0826 » 2011-01-19 18:24

Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Windows is installed in the MBR of /dev/sda

sda1: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /boot/bcd

sda2: _________________________________________________________________________

File system: ntfs
Boot sector type: Grub 2
Boot sector info: Grub 2 is installed in the boot sector of sda2 and
looks at sector 880355088 of the same hard drive for
core.img, but core.img can not be found at this
location. No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs: /bootmgr /Boot/BCD

sda3: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files/dirs: /menu.lst /Windows/System32/winload.exe

sda4: _________________________________________________________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 2048.
Operating System:
Boot files/dirs:

sda6: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: According to the info in the boot sector, sda6 starts
at sector 2048.
Operating System:
Boot files/dirs:

sda7: _________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.04 LTS
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda8: _________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 2,048 21,532,671 21,530,624 27 Hidden HPFS/NTFS
/dev/sda2 * 21,532,672 21,737,471 204,800 7 HPFS/NTFS
/dev/sda3 21,737,472 506,697,775 484,960,304 7 HPFS/NTFS
/dev/sda4 506,701,822 976,773,119 470,071,298 f W95 Ext d (LBA)
/dev/sda5 506,701,824 821,286,911 314,585,088 7 HPFS/NTFS
/dev/sda6 821,288,960 871,636,991 50,348,032 7 HPFS/NTFS
/dev/sda7 871,639,040 971,653,119 100,014,080 83 Linux
/dev/sda8 971,655,168 976,773,119 5,117,952 82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 B632FB8032FB43C1 ntfs Recovery
/dev/sda2 4A94D8CF94D8BE9F ntfs System Reserved
/dev/sda3 9468DA6E68DA4E9C ntfs 系统
/dev/sda4: PTTYPE="dos"
/dev/sda5 1C1C23021C22D714 ntfs 文件
/dev/sda6 2A68679A68676393 ntfs 临时
/dev/sda7 0a4eee67-577d-4f6c-a17a-27d2a019fc3d ext4
/dev/sda8 e5b88446-b000-48ee-9ede-08362a1d5292 swap
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda7 / ext4 (rw,errors=remount-ro)


================================ sda3/menu.lst: ================================

default 0
timeout 0
title Windows
chainloader /bootmgr
boot

=================== sda3: Location of files loaded by Grub: ===================


??GB: menu.lst

=========================== sda7/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 0a4eee67-577d-4f6c-a17a-27d2a019fc3d
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 0a4eee67-577d-4f6c-a17a-27d2a019fc3d
set locale_dir=($root)/boot/grub/locale
set lang=zh
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 0a4eee67-577d-4f6c-a17a-27d2a019fc3d
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=0a4eee67-577d-4f6c-a17a-27d2a019fc3d ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 0a4eee67-577d-4f6c-a17a-27d2a019fc3d
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=0a4eee67-577d-4f6c-a17a-27d2a019fc3d ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 0a4eee67-577d-4f6c-a17a-27d2a019fc3d
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,7)'
search --no-floppy --fs-uuid --set 0a4eee67-577d-4f6c-a17a-27d2a019fc3d
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b632fb8032fb43c1
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 4a94d8cf94d8be9f
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Grub for Dos" {
search --set -f /grub.exe
linux /grub.exe
}
### END /etc/grub.d/40_custom ###

=============================== sda7/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda7 during installation
UUID=0a4eee67-577d-4f6c-a17a-27d2a019fc3d / ext4 errors=remount-ro 0 1
# swap was on /dev/sda8 during installation
UUID=e5b88446-b000-48ee-9ede-08362a1d5292 none swap sw 0 0

=================== sda7: Location of files loaded by Grub: ===================


450.7GB: boot/grub/core.img
485.0GB: boot/grub/grub.cfg
450.8GB: boot/initrd.img-2.6.32-21-generic
446.4GB: boot/vmlinuz-2.6.32-21-generic
450.8GB: initrd.img
446.4GB: vmlinuz
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 急……求救,装Ubuntu后无法进入win7。。。

#10

帖子 onshoestring » 2011-01-19 18:29

把c:\menu.lst改一下:
default 0
timeout 0
title Windows
chainloader (hd0,1)/bootmgr
boot
zby0826
帖子: 6
注册时间: 2011-01-19 17:14

Re: 急……求救,装Ubuntu后无法进入win7。。。

#11

帖子 zby0826 » 2011-01-19 18:37

哎呀,终于能进windows 了,不胜感激啊,还有些问题我就自己边学边解决吧……
回复