如何在ubuntu环境下为WIN7建立引导

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
zyd232
帖子: 18
注册时间: 2010-12-30 12:14

如何在ubuntu环境下为WIN7建立引导

#1

帖子 zyd232 » 2011-01-30 16:30

情况是这样的:
Ubuntu的boot菜单没问题,且可以选择WIN7栏目进入WIN7的boot菜单
进入WIN7的boot菜单后,无法进入WIN7。
后来发现WIN7系统根目录下的NST文件夹里面没东西……= =b(难道被删了???)
现在WIN7肯定进不去了。只能通过Ubuntu为WIN7建立引导了。也就是说要在NST文件夹里添加应该有的东西……


于是,我不知到怎么办了……
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 如何在ubuntu环境下为WIN7建立引导

#2

帖子 smallapple » 2011-01-30 16:43

win7 本来就没有NST 目录 :em06 :em06
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 如何在ubuntu环境下为WIN7建立引导

#3

帖子 onshoestring » 2011-01-30 17:28

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

ctrl+alt+t启动终端,在终端运行:

代码: 全选

 cd ~/桌面 && wget 'http://nchc.dl.sourceforge.net/project/bootinfoscript/bootinfoscript/0.55/boot_info_script055.sh' && sudo bash boot_info_script055.sh
把RESULTS.txt文件内容贴上来。
让smallapple给你看看。
头像
zyd232
帖子: 18
注册时间: 2010-12-30 12:14

Re: 如何在ubuntu环境下为WIN7建立引导

#4

帖子 zyd232 » 2011-01-30 17:34

smallapple 写了:win7 本来就没有NST 目录 :em06 :em06

呵呵~不好意思啊~忘了说明…… :em06

我之前用EasyBCD……这个软件会自动生成NST这个文件夹,而里面正是所需的引导文件……但这个文件夹被我删了……于是引导不能的说
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 如何在ubuntu环境下为WIN7建立引导

#5

帖子 smallapple » 2011-01-30 17:43

EasyBCD生成的NST文件夹,应该只是个grub4dos的引导,和win7引导没有关系的,能进入win7引导介面,估计是BCD文件有问题,进入win7引导后有什么出错提示?
头像
zyd232
帖子: 18
注册时间: 2010-12-30 12:14

Re: 如何在ubuntu环境下为WIN7建立引导

#6

帖子 zyd232 » 2011-01-30 17:48

onshoestring 写了:在浏览器里 ctrl-c 是复制,在终端里 ctrl-shift-v 是粘帖

ctrl+alt+t启动终端,在终端运行:

代码: 全选

 cd ~/桌面 && wget 'http://nchc.dl.sourceforge.net/project/bootinfoscript/bootinfoscript/0.55/boot_info_script055.sh' && sudo bash boot_info_script055.sh
把RESULTS.txt文件内容贴上来。
让smallapple给你看看。

代码: 全选

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 #13 for (,msdos13)/grub.

sda1: _________________________________________________________________________

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

sda2: _________________________________________________________________________

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

sda5: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  According to the info in the boot sector, sda5 starts 
                       at sector 63.
    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 63.
    Operating System:  
    Boot files/dirs:   

sda7: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  Ubuntu 10.10
    Boot files/dirs:   /etc/fstab

sda8: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sda9: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sda10: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sda11: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sda12: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   

sda13: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:  
    Operating System:  
    Boot files/dirs:   /grub/grub.cfg /grub/core.img

sda14: _________________________________________________________________________

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

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

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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    61,464,689    61,464,627   7 HPFS/NTFS
/dev/sda2          61,464,751   625,137,344   563,672,594   f W95 Ext d (LBA)
/dev/sda5          61,464,753   229,408,199   167,943,447   7 HPFS/NTFS
/dev/sda6         397,351,773   625,137,344   227,785,572   7 HPFS/NTFS
/dev/sda7         229,408,768   278,237,183    48,828,416  83 Linux
/dev/sda8         282,730,496   286,633,983     3,903,488  83 Linux
/dev/sda9         286,636,032   290,539,519     3,903,488  83 Linux
/dev/sda10        290,541,568   310,071,295    19,529,728  83 Linux
/dev/sda11        310,073,344   329,603,071    19,529,728  83 Linux
/dev/sda12        329,605,120   397,350,911    67,745,792  83 Linux
/dev/sda13        282,220,544   282,728,447       507,904  83 Linux
/dev/sda14        278,239,232   282,214,399     3,975,168  82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda10       3a9745ce-24e8-421d-8151-e87950ec0b46   ext4                                     
/dev/sda11       10d7e34e-5af8-47ee-bb19-7276e0fb9fff   ext4                                     
/dev/sda12       271fbbca-bc4e-4826-ae69-55334d1e1f08   ext4                                     
/dev/sda13       ae20a439-0a72-471b-8d25-02d73985a42a   ext4                                     
/dev/sda14       45aecfca-5a72-4b05-a606-1a39f05ce427   swap                                     
/dev/sda1        A8D4A678D4A64880                       ntfs       Windows7                      
/dev/sda2: PTTYPE="dos" 
/dev/sda5        DC68ACA668AC813E                       ntfs       Programmes                    
/dev/sda6        3A20BC6B20BC302D                       ntfs       Entertainment                 
/dev/sda7        b199c832-121a-4111-8e11-93634f0138eb   ext4                                     
/dev/sda8        d689797c-6e5a-4e06-9319-713577b5c790   ext4                                     
/dev/sda9        e6c1bb5a-5f8d-4a98-9fbd-11e3f0e87339   ext4                                     
/dev/sda: PTTYPE="dos" 

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

Device           Mount_Point              Type       Options

/dev/sda7        /                        ext4       (rw,errors=remount-ro,commit=0)
/dev/sda13       /boot                    ext4       (rw,commit=0)
/dev/sda11       /opt                     ext4       (rw,commit=0)
/dev/sda12       /home                    ext4       (rw,commit=0)
/dev/sda8        /tmp                     ext4       (rw,commit=0)
/dev/sda9        /var                     ext4       (rw,commit=0)
/dev/sda10       /usr                     ext4       (rw,commit=0)
/dev/sda1        /media/Windows7          fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)


=============================== 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
/dev/sda7       /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda13 during installation
UUID=ae20a439-0a72-471b-8d25-02d73985a42a /boot           ext4    defaults        0       2
# /home was on /dev/sda12 during installation
UUID=271fbbca-bc4e-4826-ae69-55334d1e1f08 /home           ext4    defaults        0       2
# /opt was on /dev/sda11 during installation
UUID=10d7e34e-5af8-47ee-bb19-7276e0fb9fff /opt            ext4    defaults        0       2
# /tmp was on /dev/sda8 during installation
UUID=d689797c-6e5a-4e06-9319-713577b5c790 /tmp            ext4    defaults        0       2
# /usr was on /dev/sda10 during installation
UUID=3a9745ce-24e8-421d-8151-e87950ec0b46 /usr            ext4    defaults        0       2
# /var was on /dev/sda9 during installation
UUID=e6c1bb5a-5f8d-4a98-9fbd-11e3f0e87339 /var            ext4    defaults        0       2
# swap was on /dev/sda14 during installation
UUID=45aecfca-5a72-4b05-a606-1a39f05ce427 none            swap    sw              0       0

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


 117.5GB: initrd.img
 117.5GB: initrd.img.old
 117.5GB: vmlinuz
 117.5GB: vmlinuz.old

============================= sda13/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,msdos10)'
search --no-floppy --fs-uuid --set 3a9745ce-24e8-421d-8151-e87950ec0b46
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos13)'
search --no-floppy --fs-uuid --set ae20a439-0a72-471b-8d25-02d73985a42a
set locale_dir=($root)/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-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos13)'
	search --no-floppy --fs-uuid --set ae20a439-0a72-471b-8d25-02d73985a42a
	linux	/vmlinuz-2.6.35-24-generic root=UUID=b199c832-121a-4111-8e11-93634f0138eb ro   quiet splash
	initrd	/initrd.img-2.6.35-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos13)'
	search --no-floppy --fs-uuid --set ae20a439-0a72-471b-8d25-02d73985a42a
	echo	'Loading Linux 2.6.35-24-generic ...'
	linux	/vmlinuz-2.6.35-24-generic root=UUID=b199c832-121a-4111-8e11-93634f0138eb ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-2.6.35-24-generic
}
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,msdos13)'
	search --no-floppy --fs-uuid --set ae20a439-0a72-471b-8d25-02d73985a42a
	linux	/vmlinuz-2.6.35-22-generic root=UUID=b199c832-121a-4111-8e11-93634f0138eb ro   quiet splash
	initrd	/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,msdos13)'
	search --no-floppy --fs-uuid --set ae20a439-0a72-471b-8d25-02d73985a42a
	echo	'Loading Linux 2.6.35-22-generic ...'
	linux	/vmlinuz-2.6.35-22-generic root=UUID=b199c832-121a-4111-8e11-93634f0138eb ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/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,msdos13)'
	search --no-floppy --fs-uuid --set ae20a439-0a72-471b-8d25-02d73985a42a
	linux16	/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos13)'
	search --no-floppy --fs-uuid --set ae20a439-0a72-471b-8d25-02d73985a42a
	linux16	/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

menuentry "Windows 7" {
insmod ntfs
set root=(hd0,1)
drivemap -s (hd0) ${root}
chainloader +1
}

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

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


 144.5GB: grub/core.img
 144.5GB: grub/grub.cfg
 144.5GB: initrd.img-2.6.35-22-generic
 144.5GB: initrd.img-2.6.35-24-generic
 144.5GB: vmlinuz-2.6.35-22-generic
 144.5GB: vmlinuz-2.6.35-24-generic
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader  on sda1

00000000  eb 52 90 4e 54 46 53 20  20 20 20 00 02 08 00 00  |.R.NTFS    .....|
00000010  00 00 00 00 00 f8 00 00  3f 00 ff 00 3f 00 00 00  |........?...?...|
00000020  00 00 00 00 80 00 80 00  32 e0 a9 03 00 00 00 00  |........2.......|
00000030  00 00 0c 00 00 00 00 00  10 00 00 00 00 00 00 00  |................|
00000040  f6 00 00 00 01 00 00 00  80 48 a6 d4 78 a6 d4 a8  |.........H..x...|
00000050  00 00 00 00 fa fc b6 ff  31 c0 bd 00 7c 8e d0 8d  |........1...|...|
00000060  66 e0 fb 89 56 fe 50 b4  41 bb aa 55 cd 13 1f 72  |f...V.P.A..U...r|
00000070  10 81 fb 55 aa 75 0a f6  c1 01 74 05 c6 86 aa 01  |...U.u....t.....|
00000080  42 16 07 66 81 be fc 07  47 52 55 42 74 13 bb 00  |B..f....GRUBt...|
00000090  7e 66 8b 86 1c 00 66 40  e8 e1 00 e8 de 00 e8 db  |~f....f@........|
000000a0  00 66 31 c0 8b 46 0b 89  46 fc e8 8c 00 88 cb 8a  |.f1..F..F.......|
000000b0  46 0d e8 84 00 88 cd 00  dd 80 ed 09 88 6e fb 8a  |F............n..|
000000c0  46 44 e8 65 00 80 f9 03  76 05 b0 01 e9 fb 00 88  |FD.e....v.......|
000000d0  4e f9 8a 46 40 e8 52 00  80 f9 01 75 ed 88 4e fa  |N..F@.R....u..N.|
000000e0  66 8b 46 30 88 e9 66 d3  e0 66 03 86 1c 00 66 89  |f.F0..f..f....f.|
000000f0  46 f4 ba 01 00 8a 4e fa  d3 e2 89 d1 bb 00 20 53  |F.....N....... S|
00000100  e8 79 00 e2 fb 5b 81 3f  46 49 75 6c 89 d1 e8 34  |.y...[.?FIul...4|
00000110  00 89 df b0 80 e8 3f 02  72 5e bb 00 38 66 31 c0  |......?.r^..8f1.|
00000120  b0 05 e8 89 03 89 df e9  d6 00 08 c0 78 04 88 e9  |............x...|
00000130  eb 09 f6 d8 2c 09 88 c1  c3 30 c9 fe c1 66 d1 e8  |....,....0...f..|
00000140  73 f9 fe c9 c3 53 57 89  df 8b 47 06 48 89 c3 f7  |s....SW...G.H...|
00000150  66 fc c1 e1 09 39 c1 75  1f 89 d9 89 fb 03 5f 04  |f....9.u......_.|
00000160  8b 07 83 ef 02 03 7e fc  83 c3 02 3b 05 75 09 8b  |......~....;.u..|
00000170  17 89 15 e2 f0 5f 5b c3  b0 02 eb 4e 66 60 66 31  |....._[....Nf`f1|
00000180  d2 66 52 66 50 06 53 6a  01 6a 10 66 31 c9 66 ff  |.fRfP.Sj.j.f1.f.|
00000190  76 18 59 66 f7 f1 42 59  52 31 d2 66 f7 f1 86 d6  |v.Yf..BYR1.f....|
000001a0  59 86 c5 c0 e4 06 08 e1  b8 01 02 89 e6 8a 56 fe  |Y.............V.|
000001b0  cd 13 61 66 61 72 37 66  40 03 5e 0b 73 09 52 8c  |..afar7f@.^.s.R.|
000001c0  c2 80 c6 10 8e c2 5a c3  30 00 00 86 c8 01 eb 1e  |......Z.0.......|
000001d0  4e 6f 20 67 72 6c 64 72  00 00 00 00 00 00 00 00  |No grldr........|
000001e0  00 00 00 00 00 00 00 00  00 00 00 20 d3 a1 be c8  |........... ....|
000001f0  7d ac b4 0e cd 10 3c 00  75 f7 eb fe 00 00 55 aa  |}.....<.u.....U.|
00000200


当中grub.cfg最后一个windows7引导项是自己添进去的……
上次由 zyd232 在 2011-01-30 18:30,总共编辑 1 次。
头像
zyd232
帖子: 18
注册时间: 2010-12-30 12:14

Re: 如何在ubuntu环境下为WIN7建立引导

#7

帖子 zyd232 » 2011-01-30 18:14

smallapple 写了:EasyBCD生成的NST文件夹,应该只是个grub4dos的引导,和win7引导没有关系的,能进入win7引导介面,估计是BCD文件有问题,进入win7引导后有什么出错提示?


进WIN7启动管理器之后有两个选项:Neogrub bootloader 以及 Ubuntu
进入后都会出现:

状态:0xc000000f
信息:无法加载所选项,应为应用程序丢失或损坏


两个选项出错时分别对应的文件为:
文件:\NST\Neagrub.mbr 以及 文件:\NST\AutoNeagrub0.mbr


呵呵……连进入WIN7的选项都没有哈……
Neogrub bootloader 是硬盘安装UBUNTU的时候用的。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 如何在ubuntu环境下为WIN7建立引导

#8

帖子 smallapple » 2011-01-30 18:36

没有 bootmgr ?? :em06
怎么进 win7 启动菜单的?

那个 grldr 是原来的 bootmgr 改的吗?

win7的grub2启动项不能加 drivemap -s (hd0) ${root} ,不然会不能启动的。
头像
zyd232
帖子: 18
注册时间: 2010-12-30 12:14

Re: 如何在ubuntu环境下为WIN7建立引导

#9

帖子 zyd232 » 2011-01-30 18:55

smallapple 写了:
那个 grldr 是原来的 bootmgr 改的吗?
对。grldr是原来的bootmgr改的。因为一开始连windows启动管理器都进不去,显示 No grldr。后来我就改了一下……我也是瞎折腾哈,也不知道对不对,不过改了之后就能进windows启动管理器了。
头像
zyd232
帖子: 18
注册时间: 2010-12-30 12:14

Re: 如何在ubuntu环境下为WIN7建立引导

#10

帖子 zyd232 » 2011-01-30 18:58

smallapple 写了:
win7的grub2启动项不能加 drivemap -s (hd0) ${root} ,不然会不能启动的。

把这一行删掉吗?
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 如何在ubuntu环境下为WIN7建立引导

#11

帖子 onshoestring » 2011-01-30 19:20

有win7安装光盘,把引导修复一下肯定能行。
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 如何在ubuntu环境下为WIN7建立引导

#12

帖子 smallapple » 2011-01-30 19:22

zyd232 写了:
smallapple 写了:
win7的grub2启动项不能加 drivemap -s (hd0) ${root} ,不然会不能启动的。

把这一行删掉吗?
是的。

不过你这个 BCD 文件好象有问题,win7启动项被删除了,可以用 win7 安装盘启动修复重建 BCD ,或在 PE 下修改 BCD 添加 Win7启动项,Ubuntu下没办法修改 BCD 文件。
头像
zyd232
帖子: 18
注册时间: 2010-12-30 12:14

Re: 如何在ubuntu环境下为WIN7建立引导

#13

帖子 zyd232 » 2011-01-30 19:41

我找到了这个:

http://soft.yesky.com/windows7/454/9230954.shtml

可以把这个弄到U盘里用吗?

PS:我手边还有一台电脑,系统XP……
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: 如何在ubuntu环境下为WIN7建立引导

#14

帖子 onshoestring » 2011-01-30 19:56

http://store.microsoft.com/help/iso-tool
用这个工具做win7启动u盘。

修复pbr
u盘启动完成后,按下shift+f10键,调出cmd命令提示符。在命令提示符中输入:
bootrec /fixboot
回车。

重新写入引导文件
u盘启动完成后,按下shift+f10键,调出cmd命令提示符。在命令提示符中输入:
bcdboot c:\windows /s c:
但需要注意,在windows re环境下所看到的盘符与你在windows7下所看到的盘符未必一样。
c:
dir
d:
dir
等命令确认一下是不是c:
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 如何在ubuntu环境下为WIN7建立引导

#15

帖子 smallapple » 2011-01-30 20:00

iso是安装盘还是Ghost的?是安装盘的 就可以。

把镜像加载,然后目录下的bootmgr和boot目录复制到sda5 (NTFS格式) 根目录下,并在 sda5 根目录下建个sources文件夹,再把 iso 中的 sources下的boot.win复制到 sda5 下sourse目录中,
把 win7系统盘中的 grldr 还原为 bootmgr,再下载 grub4dos,把 grldr 解压出来放在 win7 系统盘根目录下,并新建个 menu.lst ,内容为

default 1
timeout 3

title Win7
root (hd0,0)
chainloader /bootmgr
boot

title Win7 Recovery
root (hd0,4)
chainloader /bootmgr
boot


选择Win7 Recovery进入后,再在命令行下用
bootrec /FixBoot 修复 sda1 的启动扇区。

bootrec /RebuildBcd 重建启动 BCD。
回复