Problems with booting from a VHD


  1. Posts : 10
    Windows Vista
       #1

    Problems with booting from a VHD


    Hi guys, well I was having some issues before with copying a bootable vhd and it not working. I just retried with RC and I am still having an issue. I just did it so here’s exactly what I did maybe you can let me know what’s wrong.

    Steps:
    1) Boot Windows 64 RC CD
    2) Go format drive completely (All new)
    3) Reboot
    4) Start Recovery Options, CMD prompt
    5) Run diskpart, create vdisk, select vdisk, attach vdisk, exit
    6) Install Windows 7 RC

    ALL is 100% fine at this point, I have my primary OS running on a VHD, other than that the HD is empty, no issues at all
    now I install like SQL, Visual Studio etc that I want
    now I want a copy boot of it, this copy one I will use for the office, the above one is for personal work.

    So I get cmd prompt while in my newly created home.vhd

    copy d:\home.vhd to d:\office.vhd

    Now I simply "try" to make it boot off my new office.vhd too

    so I do
    bcdedit /copy {current} /d "Office"
    bcdedit /set {CLSID_Number} osdevice vhd=[d:]\office.vhd

    then I reboot
    and Home still works 100% fine, but the new copy Office.VHD does not, it starts to boot but mid way through it stops and reboots the whole machine.

    Tried this on 2 different machines, HP and a Toshiba.

    Please note all my OS's are VHD's there are none that are not on VHD's (regular HD)

    Thanks for any info, Ed,
    Last edited by Brink; 02 May 2009 at 08:50.
      My Computer


  2. Posts : 50
    Windows XP and 7
       #2

    gencode said:
    ALL is 100% fine at this point, I have my primary OS running on a VHD, other than that the HD is empty, no issues at all
    On your hard disk you should also have:
    file: bootmgr
    folder: boot (with file bcd)
    file: pagefile.sys
    If you don't see them, then enable "show hidden system files"

    Both VHDs use the same pagefile.sys. And this pagefile.sys is not IN the VHD.
    Sometime I have got problems of booting copied VHD files with an existing pagefile.sys which was used by another VHD before. So I delete pagefile.sys and booting was OK.
    gencode said:
    so I do
    bcdedit /copy {current} /d "Office"
    bcdedit /set {CLSID_Number} osdevice vhd=[d:]\office.vhd
    Do you forget this?
    bcdedit /set {CLSID_Number} device vhd=[d:]\office.vhd
    gencode said:
    Tried this on 2 different machines, HP and a Toshiba.
    Do you have moved the VHD files from one PC to another ? Whilst installing the operating system configures drivers for the first PC. Should not work to copy a VHD file to another PC - or all new drivers must re-install.

    Also in HKEY_LOCAL_MACHINE\System\MountedDevices
    you have a "fingerprint" of your first hard drive - should not work on other hard drives.
      My Computer


  3. Posts : 10
    Windows Vista
    Thread Starter
       #3

    unawave, thanks for the help, well heres some screenshots
    i had already started another test, basically gencodetest is my home and gencodecopy is the office, same thing again, booting to the copy windows loading screen starts and mid way through the machine reboots...the orig one works just fine.

    Problems with booting from a VHD-sc1.png

    Problems with booting from a VHD-sc2.png

    Problems with booting from a VHD-sc3.png
      My Computer


  4. Posts : 50
    Windows XP and 7
       #4

    Have you deleted pagefile.sys ? (boot from Linux CD and delete or boot Windows 7 installation DVD, press shift+F10, change to your drive D: and C: and delete pagefile.sys)

    On the command prompt screenshot I see this wrong entry:
    identifier {a3114298-36d2-11de-8537-94f5553b7e37}
    device .... partition=C:

    Should named:
    device .... vhd=[D:]\gencodecopy.vhd
    (same as "osdevice")
      My Computer


  5. Posts : 10
    Windows Vista
    Thread Starter
       #5

    Solved


    Well I tried both of those, but still it did not work.
    So I thought maybe something was actually wrong with the file

    I remembered when I made the copy I was actually in the VHD that I was copying from.

    So I booted from the CD, went to the command prompt, deleted the copy and made a new copy.

    Next boot it finally worked, I guess that has been my main issue, thanks for finding the others.

    Thanks for all your help, I have learned a lot from this fourm...its all really really appreciated!

    Ed,
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:07.
Find Us