locked
HOWTO: Boot Into Windows 8 VHD from the BCD Store of Windows Server 2008 R2

    General discussion

  • Howdy!

    Could somebody please help me understand if it is possible to dual boot Windows Developer Preview and Windows Server 2008 R2 provided that Windows Developer Preview is installed in a VHD drive?

    In other words, is it possible to boot into the VHD drive with Windows 8 using the loader of Windows Server 2008 R2?

    The story is as follows:

    I already have a VHD with deployed Windows Developer Preview? Is it possible to add an entry to the BCD of my Windows Server 2008 R2 with Service Pack 1 that would point to that exiting VHD? I would love to boot to already created installation rather than install the OS from scratch.

    The reason I am asking is due to the following points:

    1. To be on the safe side, I'd love to avoid overwriting existing BCD with the new loader from the Windows 8.

        When the next public build is out, I will only need to re-create the VHD without having to suffer from the obsolete boot loader.

    2. If I managed to boot from the VHD, I believe, that would allow me to easily boot into Windows 8 both from physical loader and the Hyper-V.

    Here is what I've done:

    1. Created a new Hyper-V VM and installed Windows 8 on it.

    2. Within the VM I ran the following command:

     

    C:\Windows\System32\sysprep>sysprep /generalize /shutdown
     

     

    That would've helped to get rid of configuration changes I've made to the OS after installation. 

    3. Returned back to the Windows Server 2008 R2 environment and followed the steps, provided in this article that Scott Hanselman has written back in 2009.

    Now here's the problem. When I restart my server, I get the following two records in the boot menu:

     

    Windows Server 2008 R2
    
    Windows 8

    However, when I choose Windows 8, I bet I get into the Recovery Console, because I see recovery window with a drop-down box allowing me to choose from accounts that I have in the SAM database of Windows Server 2008 R2.

    What makes me puzzled is this command provided in Scott's article:

     

    C:\>bcdedit /copy {current} /d "My New VHD Option"

     

    This command, as I understand it, creates a new entry called "My New VHD Option" in the BCD and copies all the contents from the entry that has been used to start current session of Windows.

    What is strange? The strange thing is that in the Scott's output of bcdedit /v all the entries have completely different GUIDs where my differ in the first sub-part of the GUID only.

    Here's what I have:

     

     

    C:\Users\EH>bcdedit /v
    
    
    
    Windows Boot Manager
    
    --------------------
    
    identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}
    
    device                  partition=\Device\HarddiskVolume1
    
    description             Windows Boot Manager
    
    locale                  en-US
    
    inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
    
    default                 {57cde6a3-a96f-11de-84b7-eb7a92b27c05}
    
    resumeobject            {57cde6a2-a96f-11de-84b7-eb7a92b27c05}
    
    displayorder            {57cde6a3-a96f-11de-84b7-eb7a92b27c05}
    
                            {57cde6a9-a96f-11de-84b7-eb7a92b27c05}
    
    toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}
    
    timeout                 30
    
    
    
    Windows Boot Loader
    
    -------------------
    
    identifier              {57cde6a3-a96f-11de-84b7-eb7a92b27c05}
    
    device                  partition=C:
    
    path                    \Windows\system32\winload.exe
    
    description             Windows Server 2008 R2
    
    locale                  en-US
    
    inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
    
    recoverysequence        {57cde6a4-a96f-11de-84b7-eb7a92b27c05}
    
    recoveryenabled         Yes
    
    osdevice                partition=C:
    
    systemroot              \Windows
    
    resumeobject            {57cde6a2-a96f-11de-84b7-eb7a92b27c05}
    
    nx                      OptOut
    
    hypervisorlaunchtype    Auto
    
    
    
    Windows Boot Loader
    
    -------------------
    
    identifier              {57cde6a9-a96f-11de-84b7-eb7a92b27c05}
    
    device                  vhd=[D:]\VM\Win8\Win8.vhd,locate=custom:12000002
    
    path                    \Windows\system32\winload.exe
    
    description             Windows 8
    
    locale                  en-US
    
    inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
    
    recoverysequence        {57cde6a4-a96f-11de-84b7-eb7a92b27c05}
    
    recoveryenabled         Yes
    
    osdevice                vhd=[D:]\VM\Win8\Win8.vhd,locate=custom:22000002
    
    systemroot              \Windows
    
    resumeobject            {57cde6a2-a96f-11de-84b7-eb7a92b27c05}
    
    nx                      OptOut
    
    hypervisorlaunchtype    Auto
    
    detecthal               Yes
    


    What am I doing wrong?

     

    Possibly Windows 8 does not support the Windows Server 2008 loader?

      Could somebody please help me here? 

    Thank you!


    Well this is the world we live in And these are the hands we're given...
    Monday, September 19, 2011 8:04 AM

All replies

  • You can't boot a windows 8 VHD from the old bootloader. You'll have to use the Windows 8 bootloader if you want to boot from VHD.

    Monday, September 19, 2011 4:43 PM
  • How can we update the boot manager ourself? I want to update the loader and convert the WIM to a VHD with WIM2VHD.
    "A programmer is just a tool which converts caffeine into code"

    Monday, September 19, 2011 4:52 PM
  • 1.       Boot into Win7/R2.

    2.       If the Win8 VHD is already set to boot on your system, you might want to use MSConfig to delete its boot entry now.

    3.       Go into DiskMgmt.msc.

    4.       Choose Action / Attach VHD.

    5.       Browse to your Win8 VHD, click OK until the VHD is attached as a drive on your system.

    6.       If no drive letter is assigned to the VHD, assign one manually. (Right click on the Volume and use Add/Change Drive Letters.)

    7.       Open an elevated Command Prompt.

    8.       Run BCDBOOT X:\Windows (where X:\ is the drive letter of your Win8 VHD).

     

    That’s it.  BCDBoot will copy the boot stack from X:\Windows (bootmgr, et al.) and install them on your system.  It’ll also set up a new OS Loader entry for the Windows installation you pointed it to and make it the default option, and it knows how to configure VHD boot.  (If you don’t want the VHD to be the default option, add the /d switch to your BCDBoot command-line.)

     

    Monday, September 19, 2011 5:20 PM
  • You can't boot a windows 8 VHD from the old bootloader. You'll have to use the Windows 8 bootloader if you want to boot from VHD.

    Thanks, Ari! I saw may posts here and there recommending ppl to edit their BCDs much like we used to do it with Windows 7 and that completely messed the things up.

    Now it's clear and the I was correct to say that

    Possibly Windows 8 does not support the Windows Server 2008 loader?
    Thank you!


    Well this is the world we live in And these are the hands we're given...
    Monday, September 19, 2011 7:03 PM
  • 1.       Boot into Win7/R2.

    2.       If the Win8 VHD is already set to boot on your system, you might want to use MSConfig to delete its boot entry now.

    3.       Go into DiskMgmt.msc.

    4.       Choose Action / Attach VHD.

    5.       Browse to your Win8 VHD, click OK until the VHD is attached as a drive on your system.

    6.       If no drive letter is assigned to the VHD, assign one manually. (Right click on the Volume and use Add/Change Drive Letters.)

    7.       Open an elevated Command Prompt.

    8.       Run BCDBOOT X:\Windows (where X:\ is the drive letter of your Win8 VHD).

     

    That’s it.  BCDBoot will copy the boot stack from X:\Windows (bootmgr, et al.) and install them on your system.  It’ll also set up a new OS Loader entry for the Windows installation you pointed it to and make it the default option, and it knows how to configure VHD boot.  (If you don’t want the VHD to be the default option, add the /d switch to your BCDBoot command-line.)

     

    Hi Ari,

    Could you please confirm I understood you correctly?

    As I understood running this command

    BCDBOOT X:\Windows

    in the Windows 7/Windows Server 2008 R2 active session will copy the Boot Configuration Database from the VHD file of Windows Developer Preview to the current system drive replacing original obsolete Windows 7 BCD data, correct?

    So this command will completely destroy the old loader, right?

    If so, how to return back to old Win7 loader when the VHD is no longer necessary (say, when a public beta is out) and we would love to boot into the Windows 7 using its native boot loader?

    Thank you.


    Well this is the world we live in And these are the hands we're given...
    Monday, September 19, 2011 7:09 PM
  • You are correct - this does wipe out the original bootloader. You should be able to restore the Win7 bootloader by running BCDBOOT c:\windows, where c:\windows is the Win7 windows installation location.

    Monday, September 19, 2011 7:22 PM
  • Hi Ari,

    it works fine. It adds the VHD entry and I can boot from it. The only thing which doesn't work is the /d switch. Bcdboot doesn't know this switch. I'm using Windows Sp1 x64 German.

    André


    "A programmer is just a tool which converts caffeine into code"

    Monday, September 19, 2011 7:25 PM
  • You are correct - this does wipe out the original bootloader. You should be able to restore the Win7 bootloader by running BCDBOOT c:\windows, where c:\windows is the Win7 windows installation location.

    Okay, yet one thing to clarify I you please...

    So did I understand it right that when there is a need to get rid of current Windows Developer Preview setup and continue working in Windows 7 or Windows Server 2008 R2, my actions will be the following:

    1. Boot into Windows 7 using new Windows Developer Preview's boot manager.

    2. At the command prompt execute the following:

    BCDBOOT C:\Windows

    where .\Windows is the folder of the currently used Windows 7 environment

    3. Restart the PC

    4. Once restarted, the OS will automatically use the Win7 loader and 'forget' about Windows Developer Preview setup.

    5. Logged into the Windows 7, I can just delete the VHD file.

    Is that it, or I missed something?

    That all may look kinda strange but I am pretty new to all that loader stuff and am afraid I could miss something that looks obvious to you.

    Thank you for your help.

     


    Well this is the world we live in And these are the hands we're given...
    Monday, September 19, 2011 7:32 PM
  • I believe that's correct. You should just make sure that your Windows 7 bootloader doesn't have an orphaned entry for the Developer Preview.
    Wednesday, September 21, 2011 9:48 PM
  • Hi Ari,

    1 question. When I use your way I have the old black white bootmgr, but when I use this way: http://www.hanselman.com/blog/GuideToInstallingAndBootingWindows8DeveloperPreviewOffAVHDVirtualHardDisk.aspx I have the new graphical bootmgr. What is the difference?

    André


    "A programmer is just a tool which converts caffeine into code"

    Wednesday, September 21, 2011 9:56 PM
  • I'm not sure. You should get the graphical bootloader when you follow my steps as well.
    Wednesday, September 21, 2011 10:31 PM
  • I tested it on my Windows 7 Desktop PC with Ultimate Sp1 x64 German and I got the old bootscreen. Next I used the guide from Scott Hanselman on my laptop where I use Windows 7 Ultimate Sp1 x86 German and there I got the new graphical bootloader.

    Any ideas why?
    "A programmer is just a tool which converts caffeine into code"

    Wednesday, September 21, 2011 11:24 PM
  • I tested it on my Windows 7 Desktop PC with Ultimate Sp1 x64 German and I got the old bootscreen. Next I used the guide from Scott Hanselman on my laptop where I use Windows 7 Ultimate Sp1 x86 German and there I got the new graphical bootloader.

    Any ideas why?
    "A programmer is just a tool which converts caffeine into code"

    So you did copy the boot manager from the Windows Developer Preview Setup ISO and got the old boot manager? So the bootmgr file is an old Win7 file?

    Uhmm...Interesting!


    Well this is the world we live in And these are the hands we're given...
    Thursday, September 22, 2011 4:42 AM
  • So you did copy the boot manager from the Windows Developer Preview Setup ISO and got the old boot manager? So the bootmgr file is an old Win7 file?

    I used the command provided by Ari.
    "A programmer is just a tool which converts caffeine into code"

    Thursday, September 22, 2011 5:54 PM