Share via


Windows 7: Boot from VHD First Impression: Part 3 (Booting VHD from Vista SP1 or later)

Hello All,

In last 2 parts we have seen how easily we can create/attach VHD files in Windows 7 and how easy it is to boot from VHD. In this part we will see booting the VHD file from PC running Windows Vista operating system. We have native support for VHD in Windows 7 and the bootloader in Windows 7 understands the VHD files that is the reason we can actually boot from VHD file.

In order to boot a vhd file in Windows Vista, we will have to follow 3 steps.

  1. Copy the Windows 7 bootloader from a machine running Windows 7
  2. Create the back up of a existing bootloader on a PC running Windows Vista
  3. Replace the Windows 7 bootloader files on a PC running Windows Vista Operating System
  4. Copy/Create VHD files in Vista machine and Adding the VHD entry in Boot Menu for VHD Boot and then Boot from VHD

Copy the Windows 7 bootloader from a machine running Windows 7

In order to boot from VHD we need to have the bootloader that understands the VHD file. Apparently, Windows Vista bootloader does not understand VHD files and hence cannot boot into the VHD file.

To solve this issue, we will first obtain the bootloader from PC running Windows 7. Now, boot into a machine Windows 7. You can download Windows 7 Beta build 7000 and use that bootloader.

Basically, we require 2 files BootMgr and BCDEdit.exe. If you have Windows 7 installed on a single partition then your ‘bootmgr’ file is located on ‘C:\’ (i.e. your system, active, primary partition) and your ‘bcdedit.exe’ file is located in ‘C:\Windows\System32’ folder.

After booting into Windows 7, connect the USB thumb drive or flash drive. For this step open the Elevated Command Prompt with Administrator Privileges and type the following commands.

C:\windows\system32>xcopy /h /y bcdedit.exe f:\     (Note: F: is the external USB Thumb Drive or Flash Drive)

/H - Copies hidden and system files also.

/Y  - Suppresses prompting to confirm you want to overwrite an existing destination file.

C:\>cd\

C:\>xcopy /h /y bootmgr f:\

Once done unplug the USB thumb drive, we will need it when we will replace the files to Vista machine.

image

 

Create the back up of a existing bootloader on a PC running Windows Vista (MAKE SURE YOU PERFORM THIS ON YOUR VISTA MACHINE)

In this step, we will take the back up of existing bootloader. Basically, the backup of the 2 files BootMgr and BCDEdit.exe if in case. The ‘bootmgr’ file is located in ‘C:\’ and your ‘bcdedit.exe’ file is located in ‘C:\Windows\System32’ folder. Boot into WINDOWS VISTA.

For this step open the Elevated Command Prompt with Administrator Privileges and type the following commands.

C:\windows\system32>cd\

C:\>xcopy /y /h bootmgr bootmgr.sav

Press f after prompted

C:\>cd Windows\System32

C:\windows\system32> xcopy /y /h bcdedit.exe bcdedit.sav

Press f after prompted

image

Replace the Windows 7 bootloader files on a PC running Windows Vista Operating System (MAKE SURE YOU PERFORM THIS ON YOUR VISTA MACHINE)

In this step, we will replace Windows 7 bootloader with existing Windows Vista bootloader. Thus, we will overwrite BootMgr and BCDEdit.exe, which arelocated in ‘C:\’ and  ‘C:\Windows\System32’ folder.

For this step use Windows Vista Bootable DVD or Windows 7 Bootable DVD and Boot into Windows Recovery Environment or WinPE.

After selecting the operating system open the Elevated Command Prompt and type the following commands.

C:\>attrib bootmgr –s –h –r                     (Note:   C: is the Windows Vista OS Partition)

Attribute command with –s –h –r changes the System, Hidden and Read Only attributes of a given file.

C:\>e:                                                           (Note:  E: is the Thumb Drive or Flash Drive)

E:\>xcopy /y /h bootmgr c:\bootmgr

E:\>xcopy /y /h bcdedit.exe c:\windows\system32

Now you are ready to Boot from VHD on your Windows Vista machine.

image

Copy/Create VHD files Vista machine and Adding the VHD entry in Boot Menu for VHD Boot and then Boot from VHD

Rest all is same as my previous posts. Refer Windows 7- Boot from VHD First Impression- Part 1 and Windows 7- Boot from VHD First Impression- Part 2 for creating the VHD and adding them into the Boot Menu.

After the booting up you will see two entries Windows Vista and VHD file. Select the VHD and hit, and you are now booting from VHD.

Aviraj Ajgekar

Comments

  • Anonymous
    January 01, 2003
    Nope. Currently you cannot use Windows 7 or Windows Server 2008 R2 for boot from USB.

  • Anonymous
    January 01, 2003
    Boot from VHD supports only for Windows 7 and Windows Server 2008 R2. There is no downlevel OS support.

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    Native boot from a VHD is available in Windows 7 Enterprise, Windows 7 Ultimate, and all versions of Windows Server 2008 R2

  • Anonymous
    January 01, 2003
    Which command did you try?

  • Anonymous
    July 25, 2009
    Is it possible to install the windows 7 bootloader on a USB stick and then copy the VHD into USB to boot directly the VHD from a boot via USB? To be full portable...

  • Anonymous
    October 08, 2009
    Is it possible to use this method to create a .wim file of Vista (after modifying the bootloader) that could be booted from a VHD? Is it also possible to get a download of the bootmgr and bcdedit.exe files if I don't have windows 7 enterprise or ultimate?

  • Anonymous
    November 04, 2009
    Boot from USB - instructions at http://www.garrymartin.com/blog/2009/10/native-vhd-boot-windows-7-or-windows-server-2008-r2-from-an-external-usb-drive/

  • Anonymous
    November 05, 2009
    Hi, is it possible to boot Vista from VHD ? I've tried but keep getting the startup repair window. I've simply created a VHD, installed vista, added to the boot manager. Am I missing something? Thanks

  • Anonymous
    July 13, 2010
    i'm having an issue with coping the 7 bootmgr file every time i input the commands you specify it says "File not found - bootmgr 0 File(s) copied" i have tried it in both power shell & cmd. elavated & not elavated with no response but that. using rtm windows 7 enterprize

  • Anonymous
    July 14, 2010
    The comment has been removed

  • Anonymous
    July 17, 2010
    the command i tried was C:>xcopy /h /y bootmgr f:

  • Anonymous
    July 17, 2010
    i think i figured out my problem. i think when i installed 7 it put bootmgr on the rec. console partition thats hidden

  • Anonymous
    November 21, 2010
    Neither bcdedit and bootmgr exist on my vista machine. And bootmgr is not on the c: of my Windows 7 Enterprise install. Any ideas?

  • Anonymous
    February 23, 2011
    This was supposed to be a grand feature but MicroSoft decided to allow only Windows 7 Ultimate to have native support for VHDs thus you can only to VHD from a computer running Windows 7 Ultimate and the VHDs can only run Windows 7 Ultimate.... so much for the "test bed" theory.... it's time the MS userd of the world united and told MS what to do with their unfair practices. Go to Hackintosh!

  • Anonymous
    July 13, 2011
    "Native boot from a VHD is available in Windows 7 Enterprise, Windows 7 Ultimate, and all versions of Windows Server 2008 R2" How can i boot Windows 7 Ultimate from vhd if i only have an AnyTimeUpgrade Key for Ultmiate. I only have the Windows 7 Professional Installer. But if i install and boot it from vhd i get an license error because native vhd boot is not supported in Professional.