Jump to content











Photo
- - - - -

Clone partition to VHD. BSOD booting on same hardware


  • Please log in to reply
2 replies to this topic

#1 doveman

doveman

    Frequent Member

  • Advanced user
  • 449 posts
  • Location:Surrey
  •  
    United Kingdom

Posted 27 April 2012 - 06:04 AM

I've got a Win7 x64 Ultimate partition that boots fine but I haven't got enough room to install SP1. So I've created a 25GB VHD, copied the partition to it using Easeus Partition Master, made sure the partition is Active and has the correct MBR, etc.

I'm trying to boot the VHD from grub4dos with the following, but it just BSOD

title Win7 VHD

find --set-root /VHD/W7.vhd

map /VHD/W7.vhd (hd0)

map --hook

root (hd0,0)

chainloader /bootmgr

I tried creating a fresh BCD with EasyBCD and BootICE but using either of the two entries I created (in BOOTICE one with Boot Disk set to BOOT, the other with Boot Disk set to K: (the drive letter of the VHD when attached in Windows) and the Partition set to 0, K (which is the only partition on the VHD) both BSOD STOP 007B after the boot animation starts. So then I tried the instructions here http://www.sevenforu...tion-vhd-2.html

bcdedit /store K:\boot\bcd (which shows me that the VHD has the GUID {4301ee85-902d-11e1-b878-001fd0d6fe4b} )



bcdedit /store K:\boot\bcd /set {bootmgr} device partition=C:



bcdedit /store K:\boot\bcd /set {4301ee85-902d-11e1-b878-001fd0d6fe4b} device partition=C:

bcdedit /store K:\boot\bcd /set {4301ee85-902d-11e1-b878-001fd0d6fe4b} osdevice partition=C:

After which bcdedit /store K:\boot\bcd gives me


Windows Boot Manager

--------------------

identifier		  {bootmgr}

device			   partition=\Device\HarddiskVolume6

description			Windows Boot Manager

locale			   en-US

inherit			  {globalsettings}

default			   {default}

resumeobject		   {1f8184a2-14de-11df-9734-f08c6d8c5

displayorder		   {default}

			   {4301ee85-902d-11e1-b878-001fd0d6f

toolsdisplayorder	   {memdiag}

timeout				 10



Windows Boot Loader

-------------------

identifier			  {default}

device				  partition=K:

path					\Windows\system32\winload.exe

description			 Microsoft Windows 7

locale				  en-US

osdevice				partition=K:

systemroot			  \Windows



Windows Boot Loader

-------------------

identifier			  {4301ee85-902d-11e1-b878-001fd0d6f

device				  partition=\Device\HarddiskVolume6

path					\Windows\system32\winload.exe

description			 Microsoft Windows 7

locale				  en-US

osdevice				partition=\Device\HarddiskVolume6

systemroot			  \Windows


Where the first Boot Loader entry must be the pre-existing one and the second the one just created. However, this works even less well as the first entry at least shows the boot animation before BSOD STOP 007B, whereas the second entry just gives an error about being unable to find Windows\system32\winload.exe.

Cam anyone help me out here please, as I'm just lost when it comes to the BCD? Once I've got the VHD working and installed SP1 and any other updates and trimmed it back down a bit, I'll need to reverse the process and copy the VHD back to the real HDD (hd0,1) so I need to get my head round this!

#2 wimb

wimb

    Platinum Member

  • Developer
  • 3756 posts
  • Interests:Boot and Install from USB
  •  
    Netherlands

Posted 27 April 2012 - 04:41 PM

In Win7 OS you can use BOOT_USB.exe to make VHD entry for Win7 Menu (= BootManager Menu) on TargetDrive (also HDD)
The program will mount the VHD and then make use of bcdboot.exe to create the BCD entry.

What is driver of your VHD ?
When it the default Microsoft driver, then you cannot use grub4dos to boot it.
Grub4dos can be used when WinVBlock or FiraDisk driver are installed in the Win7 OS inside the VHD.

:cheers:

#3 doveman

doveman

    Frequent Member

  • Advanced user
  • 449 posts
  • Location:Surrey
  •  
    United Kingdom

Posted 27 April 2012 - 05:24 PM

Thanks, I generally prefer to use grub4dos to boot my VHDs so that I don't have to go through two menus, but as this is a temporary one it might be easier to create the Win7 Menu entry as you suggest, so I'll try that.

I haven't installed WinVBlock or FiraDisk driver in this Win7, so I presume it's using the default MS Driver. I obviously misunderstood something in your tutorial because I thought Win7 could boot from VHD via grub4dos without a special driver and it was just XP that needed WinVBlock. :doh7: I think it was this that confused me:

"These Virtual Harddisk files are of type IMG or VHD and require WinVBlock or FiraDisk driver to boot them as FILEDISK or as RAMDISK. The Ultimate Windows 7 VHD files make use of Microsoft VHD HBA driver which allows to boot them as FILEDISK"

EDIT: BOOT_USB isn't any good for creating the Win7 Menu entry, as it wants to copy my 25GB VHD to the Target C: partition so I just used EasyBCD to create the entry and it's booting fine now thanks :clap:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users