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