光盘装ubuntu后win7启动项丢失

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
woc2006
帖子: 14
注册时间: 2009-08-05 20:50

光盘装ubuntu后win7启动项丢失

#1

帖子 woc2006 » 2010-10-29 9:26

win 7在g盘,ubuntu 在c盘。用了grubupdate无效。开机直接进ubuntu 。怎么修复?
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 光盘装ubuntu后win7启动项丢失

#2

帖子 onshoestring » 2010-10-29 9:44

http://sourceforge.net/projects/bootinfoscript/
把文件先复制到桌面,终端运行:

代码: 全选

sudo bash ~/桌面/boot_info_script055.sh
把RESULTS.txt文件内容贴上来。
不是wubi装的我就试试。
woc2006
帖子: 14
注册时间: 2009-08-05 20:50

Re: 光盘装ubuntu后win7启动项丢失

#3

帖子 woc2006 » 2010-10-29 12:54

代码: 全选

                Boot Info Script 0.55    dated February 15th, 2010                    

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

 => Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in 
    partition #1 for (,msdos1)/boot/grub.

sda1: _________________________________________________________________________

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

sda2: _________________________________________________________________________

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

sda5: _________________________________________________________________________

    File system:       vfat
    Boot sector type:  MSWIN4.1: Fat 32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files/dirs:   

sda6: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  According to the info in the boot sector, sda6 starts 
                       at sector 1. But according to the info from fdisk, 
                       sda6 starts at sector 273554883.
    Operating System:  
    Boot files/dirs:   

sda7: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  According to the info in the boot sector, sda7 starts 
                       at sector 1. But according to the info from fdisk, 
                       sda7 starts at sector 504039438.
    Operating System:  
    Boot files/dirs:   

sda8: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  According to the info in the boot sector, sda8 starts 
                       at sector 1. But according to the info from fdisk, 
                       sda8 starts at sector 734523993.
    Operating System:  Windows 7
    Boot files/dirs:   /Windows/System32/winload.exe

=========================== 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    *             63    43,070,264    43,070,202  83 Linux
/dev/sda2          43,070,326   976,768,064   933,697,739   f W95 Ext d (LBA)
/dev/sda5          43,070,328   273,554,819   230,484,492   b W95 FAT32
/dev/sda6         273,554,883   504,039,374   230,484,492   7 HPFS/NTFS
/dev/sda7         504,039,438   734,523,929   230,484,492   7 HPFS/NTFS
/dev/sda8         734,523,993   976,768,064   242,244,072   7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        2b27e756-f7c2-4e1d-b7e1-164de2716e29   ext4                                     
/dev/sda2: PTTYPE="dos" 
/dev/sda5        2F6A-1BE7                              vfat       SOFTWARE                      
/dev/sda6        D06CAB626CAB41D8                       ntfs       DATA                          
/dev/sda7        B2608006607FCF99                       ntfs       PERSONAL                      
/dev/sda8        B4E0DD03E0DCCD2C                       ntfs       WIN7                          
/dev/sda: PTTYPE="dos" 

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

Device           Mount_Point              Type       Options

/dev/sda1        /                        ext4       (rw,errors=remount-ro,commit=0)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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
  set have_grubenv=true
  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
}

function load_video {
  insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 2b27e756-f7c2-4e1d-b7e1-164de2716e29
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 2b27e756-f7c2-4e1d-b7e1-164de2716e29
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.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set 2b27e756-f7c2-4e1d-b7e1-164de2716e29
	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=2b27e756-f7c2-4e1d-b7e1-164de2716e29 ro   quiet splash
	initrd	/boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set 2b27e756-f7c2-4e1d-b7e1-164de2716e29
	echo	'Loading Linux 2.6.35-22-generic ...'
	linux	/boot/vmlinuz-2.6.35-22-generic root=UUID=2b27e756-f7c2-4e1d-b7e1-164de2716e29 ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set 2b27e756-f7c2-4e1d-b7e1-164de2716e29
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set 2b27e756-f7c2-4e1d-b7e1-164de2716e29
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### 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.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

=============================== sda1/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
/dev/sda1       /               ext4    errors=remount-ro 0       1

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


  20.0GB: boot/grub/core.img
  11.0GB: boot/grub/grub.cfg
   1.2GB: boot/initrd.img-2.6.35-22-generic
    .9GB: boot/vmlinuz-2.6.35-22-generic
   1.2GB: initrd.img
    .9GB: vmlinuz
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 光盘装ubuntu后win7启动项丢失

#4

帖子 onshoestring » 2010-10-29 13:21

好像没有好办法,重装吧,win7要装到主分区。
一个办法就是把win7装到c,删除最后一个分区,再重建一个分区(不要占用所有自由空间,留最后一块自由空间安装ubuntu)。
另一个办法就是删除最后一个分区,再重建二个分区,把最后一个分区转换成主分区,安装win7。这样不用重装ubuntu。
推荐第一个办法。
woc2006
帖子: 14
注册时间: 2009-08-05 20:50

Re: 光盘装ubuntu后win7启动项丢失

#5

帖子 woc2006 » 2010-10-29 13:40

C盘只有15GB,装不下win7,就算装下了,以后也有诸多麻烦。而且win7里还有些重要的东西复制不出来,必须要进系统处理一下才能重装。
这个扫描结果不是找到win7到引导文件了吗?难道不能手工编辑什么文件来启动win7?
头像
黄美姬
帖子: 8428
注册时间: 2009-10-08 11:15
来自: 大城市铁岭

Re: 光盘装ubuntu后win7启动项丢失

#6

帖子 黄美姬 » 2010-10-29 13:49

我XP与WIN7双系统装在不同分区,进XP,XP就是C盘,进WIN7,win7就是C盘
我们是命运的妓女,它把我们都嫖了

N卡驱动:http://www.nvidia.cn/Download/index.aspx?lang=cn
极品飞车:http://www.geforce.cn/optimize/optimal- ... ts-450-ops
孤岛危机优化设置:http://www.geforce.cn/optimize/optimal- ... tx-450-ops
:cp /etc/skel/.bashrc ~/
PS1="\[\e]2;\u@\H \w\a\e[32;1m\]\T$\[\e[0m\] "
http://cdimage.ubuntu.com/
http://releases.ubuntu.com/
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 光盘装ubuntu后win7启动项丢失

#7

帖子 onshoestring » 2010-10-29 14:13

woc2006 写了:C盘只有15GB,装不下win7,就算装下了,以后也有诸多麻烦。而且win7里还有些重要的东西复制不出来,必须要进系统处理一下才能重装。
这个扫描结果不是找到win7到引导文件了吗?难道不能手工编辑什么文件来启动win7?
windows要一个有active flag的主分区。现在你只有一个主分区。
想启动win7就要把c盘格式化,把win7光盘的/boot,bootmgr文件复制到c:,修复mbr,pbr,还要bcdedit添加引导项。
woc2006
帖子: 14
注册时间: 2009-08-05 20:50

Re: 光盘装ubuntu后win7启动项丢失

#8

帖子 woc2006 » 2010-10-29 15:03

那就先牺牲ubuntu ,c盘装个windows 系统,能自动找到以前的系统吗?
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 光盘装ubuntu后win7启动项丢失

#9

帖子 onshoestring » 2010-10-29 15:13

可以不安装系统,按7楼就能找回win7。
也可以装个xp,用autofixbcd找回win7。
woc2006
帖子: 14
注册时间: 2009-08-05 20:50

Re: 光盘装ubuntu后win7启动项丢失

#10

帖子 woc2006 » 2010-10-29 20:19

现在C盘已经装上win7了,接下来要怎样添加G盘那个win7?
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 光盘装ubuntu后win7启动项丢失

#11

帖子 onshoestring » 2010-10-29 22:08

1:bcdedit.exe在c:\windows\system32\
2:输入 bcdedit /store c:\boot\bcd /create /d "windows 7" -application osloader
(复制 返回的{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx})
3:输入 bcdedit /store c:\boot\bcd -set {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} device partition=g:
4:输入 bcdedit /store c:\boot\bcd -set {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} path \windows\system32\winload.exe
5:输入 bcdedit /store c:\boot\bcd -set {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} osdevice partition=g:
6:输入 bcdedit /store c:\boot\bcd -set {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} systemroot \windows
7:输入 bcdedit /store c:\boot\bcd -displayorder {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} /addlast
不知是否正确,有问题你google。
woc2006
帖子: 14
注册时间: 2009-08-05 20:50

Re: 光盘装ubuntu后win7启动项丢失

#12

帖子 woc2006 » 2010-10-30 9:34

现在已经都弄好了,双系统无误,不过有个小问题。上次装ubuntu重启之后就有声音了。这次没声音。安装时我跳过了下载更新,不知道会不会有影响?
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 光盘装ubuntu后win7启动项丢失

#13

帖子 onshoestring » 2010-10-30 9:38

没声音就是声卡驱动没装好,想办法装好声卡驱动。
头像
icokey
帖子: 366
注册时间: 2008-10-17 10:44
联系:

Re: 光盘装ubuntu后win7启动项丢失

#14

帖子 icokey » 2010-10-30 12:26

标记下先。
回复