Jump to content

Trouble converting normal Win7 VHD to Winvblock RAMDisk


doveman

Recommended Posts

I'm trying to convert a normal Win7 x86 VHD into a Winvblock RAMDisk one to boot from grub4dos. I booted into the VHD and installed WinvBlock, which didn't show any errors. I found there was no bootmgr or Boot\ folder on the VHD so I copied those across from my HDD, except the BCD file which was locked, so I created a new one with BootICE. That wouldn't boot though, so I tried doing a Reset BCD Config with EasyBCD and then creating a new entry.

However, it still doesn't boot, giving status 0xc000000e on windows\system32\winload.exe . I thought that file might be missing, as bootmgr and the \Boot files were but I checked and it's there. In EasyBCD's verbose/debug view, my BCD looks like this:

Windows Boot Manager
--------------------
identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device boot
description Windows Boot Manager
locale en-US
inherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
default {52d5f64a-002b-11e3-b18d-bc5ff40da1b3}
resumeobject {1f8184a2-14de-11df-9734-f08c6d8c50b0}
displayorder {52d5f64a-002b-11e3-b18d-bc5ff40da1b3}
toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d}
timeout 10

Windows Boot Loader
-------------------
identifier {52d5f64a-002b-11e3-b18d-bc5ff40da1b3}
device vhd=[D:]\VHD\Win7x86_Port.vhd,locate=custom:12000002
path \Windows\system32\winload.exe
description Microsoft Windows 7
locale en-US
osdevice vhd=[D:]\VHD\Win7x86_Port.vhd,locate=custom:22000002
systemroot \Windows

Link to comment
Share on other sites


Define "normal" Win7 X86 .vhd, first thing. :whistle:

The entries in that BCD you posted are seemingly those for booting a Windows 7 (one of the editions that allow it) from a .vhd using the "internal" method (the one that is not available in the "lower" versions of Windows 7).

That method works more or less like this:

  • the BOOTMGR and \boot\BCD are on a physical device (accessed by BIOS)
  • the entry in the BCD points to the rest of the system inside a .vhd (which is NOT accessed by BIOS but only by the INTERNAL provisions of Windows 7 - where available).

The method using grub4dos and Winvblock uses a DIFFERENT approach.

  • the BOOTMGR and \boot\BCD may be on EITHER the physical disk device or inside the .vhd
  • grub4dos maps the .vhd to a (virtual, real mode ONLY) physical device
  • when the switch between real mode and protected mode happens (during booting) the Winvblock "inherits" the gruib4dos mapping and makes it available (still as "virtual" physical device) to the Windows 7

Without the EXACT set of commands you used in grub4dos there is NO way to know if there is anything wrong in them, but the point that you seem missing anyway is that for all Windows 7 knows, no .vhd is involved, and the entry in the \boot\BCD is a "conventional" one in all similar to the ones you have when you have a "normal" Windows 7 install on a "normal" physical hard disk drive, i.e. when running BCDEDIT /enum you should have something very similar to this:

Windows Boot Manager--------------------identifier {bootmgr}device bootdescription Windows Boot Managerlocale en-USinherit {globalsettings}default {default}resumeobject {1f20452f-f2af-11db-9299-adf714858873}displayorder {default}toolsdisplayorder {memdiag}timeout 30Windows Boot Loader-------------------identifier {default}device bootpath \Windows\system32\winload.exedescription Microsoft Windows Vistalocale en-USinherit {bootloadersettings}osdevice bootsystemroot \Windowsresumeobject {1f20452f-f2af-11db-9299-adf714858873}nx OptIn

You can use BCDEDIT (or bootICE) alright from a PE to "repair" the BCD inside the .vhd in the usual way (as long as the PE has provisions to mount the .vhd, and to assign to the volume in it - I presume it is a "normal" install ;) - the drive letter C: ).

jaclaz

Link to comment
Share on other sites

Define "normal" Win7 X86 .vhd, first thing. :whistle:

The entries in that BCD you posted are seemingly those for booting a Windows 7 (one of the editions that allow it) from a .vhd using the "internal" method (the one that is not available in the "lower" versions of Windows 7).

That method works more or less like this:

  • the BOOTMGR and \boot\BCD are on a physical device (accessed by BIOS)
  • the entry in the BCD points to the rest of the system inside a .vhd (which is NOT accessed by BIOS but only by the INTERNAL provisions of Windows 7 - where available).

The method using grub4dos and Winvblock uses a DIFFERENT approach.

  • the BOOTMGR and \boot\BCD may be on EITHER the physical disk device or inside the .vhd
  • grub4dos maps the .vhd to a (virtual, real mode ONLY) physical device
  • when the switch between real mode and protected mode happens (during booting) the Winvblock "inherits" the gruib4dos mapping and makes it available (still as "virtual" physical device) to the Windows 7

Without the EXACT set of commands you used in grub4dos there is NO way to know if there is anything wrong in them, but the point that you seem missing anyway is that for all Windows 7 knows, no .vhd is involved, and the entry in the \boot\BCD is a "conventional" one in all similar to the ones you have when you have a "normal" Windows 7 install on a "normal" physical hard disk drive, i.e. when running BCDEDIT /enum you should have something very similar to this:

You can use BCDEDIT (or bootICE) alright from a PE to "repair" the BCD inside the .vhd in the usual way (as long as the PE has provisions to mount the .vhd, and to assign to the volume in it - I presume it is a "normal" install ;) - the drive letter C: ).

jaclaz

By "normal" I just meant the way it boots, i.e. from the Win7 Boot menu using the Win7 VHD driver. It's actually a Win 7 Portable build, that was made from a Win 7 Full VHD (i.e. Windows was installed into the VHD), so I guess maybe making the Portable build stripped out bootmgr and \Boot but maybe they were never there. I could check the Win 7 Full VHD to see but I've just turned off the PC containing it, so I'll do that later.

My G4D entry is:

title Win7 x32 VHD (Backup, Winvblock)

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

map --mem /VHD/Win7x86_Port.vhd (hd0)

map --hook

root (hd0,0)

chainloader /bootmgr

I thought it was a bit strange that the BCD entry contained the path to the VHD but I thought I had to select G: (the partition that Windows had given the attached VHD) when creating the new entry, as I thought there are probably some identifiers on the drive which the boot manager uses to create the entry.

I tried just selecting C: instead and creating the entry which gave

Windows Boot Manager

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

identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}

device boot

description Windows Boot Manager

locale en-US

inherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}

default {c1f4b8eb-003a-11e3-b600-bc5ff40da1b3}

resumeobject {1f8184a2-14de-11df-9734-f08c6d8c50b0}

displayorder {c1f4b8eb-003a-11e3-b600-bc5ff40da1b3}

toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d}

timeout 10

Windows Boot Loader

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

identifier {c1f4b8eb-003a-11e3-b600-bc5ff40da1b3}

device partition=C:

path \Windows\system32\winload.exe

description Microsoft Windows 7

locale en-US

osdevice partition=C:

systemroot \Windows

but that failed to boot with the same error.

I can boot the VHD from the Win 7 Boot Menu and then it will be mounted as C: and create the entry again. The only reason I was using my normal Windows install rather than the VHD is because EasyBCD isn't installed in it and it requires .NET or something and I was trying to avoid installing much into it. I can use BootICE but I didn't have much luck with that either but I'll try again.

I don't think I've got another working PE to use (I've got one but it doesn't boot on all my machines, due to missing drivers I guess even though I created it with a load installed, so I'm not sure if it boots on this one or not) but that would mount itself as C: anyway, so I wouldn't be able to mount the VHD as C: in that.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...