Jump to content
Sign in to follow this  
NIM

Boot Windows 7 from VHD - an amazing concept, Here's how to do it

Recommended Posts

1. Install Windows 7 to VHD from DVD

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

With Windows 7, you now have the option to boot the OS from a VHD, a virtual disk file, instead of a partition. This way, you don't have to reconfigure your hard drive partitions.

Limitations: Hibernate is not supported.

Here are the simplified instructions:

1) Start Windows 7 installation from DVD.

2) Press Shift+F10 to start the command prompt.

3) Start diskpart.

4) Use the "create vdisk file=D:\Win7.vhd maximum=xxxxx" to create a virtual hard disk. Choose your drive and filename accordingly. xxxxx is in MB.

5) Type "select vdisk file=D:\Win7.vhd".

6) Type "attach vdisk". You will get a confirmation that it was attached.

7) Type "exit" to exit diskpart. And then close the command prompt.

8) Click on "Install Now" and install as you would normally by clicking on "Custom Install". Choose your attached vdisk as the location.

The installation takes care of adding the boot option to bcd. You don't have to do anything.

See Virtual Hard Disk Booting on a tutorial for VHD booting.

also check this out: Install Windows 7 to a VHD and add boot option to Vista's menu.

Basically, instead of installing windows 7 to your physical HDD by getting rid of Vista or even dual booting off another partition, you can install to a virtual HDD (in VHD format), and boot off the VHD so you actually get the hardware functionality to play with!!

Build 7068 does not allow calculation of the WEI score.

2. Install Existing VHD to Boot Menu of Windows 7

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

If you already have a VHD that you want to boot from, you can simply add it to the boot menu rather than going through the above steps. If you have a Virtual PC image, for example, you can syprep it, then add it to Windows 7 menu. Vista's boot manager will not work - you have to update it to Windows 7 boot manager if you want this to work.

First, here how to add the vhd to the boot menu:

Open elevated command prompt, then type the following commands in sequence:

CODE

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

C:\>bcdedit /set <guid> device vhd=[driveletter:]\<directory>\<vhd filename>

C:\>bcdedit /set <guid> osdevice vhd=[driverletter:]\<directory>\<vhd filename>

C:\>bcdedit /set <guid> detecthal on

Note: The first command will Return the GUID of the Loader Object that you will use to replace <guid> below

Note: vhd=[driveletter:]\<directory>\<vhd filename> is the new syntax supported for BCDEdit.exe to locate VHD File and Bootmgr will locate the partition containing the VHD File to boot from.

Type bcdedit /v to check the bcd store.

3. How to Boot VHD without Windows 7 Installed

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

If you have Vista and want to boot a Window 7 VHD, then you need to copy the boot manager of Windows 7 to Vista's partition. You need to copy C:\bootmgr and C:\windows\system32\bcdedit.exe to an external source from Windows 7. You could extract these files from the Windows 7 VHD using WinImage or another program.

Then, open an elevated command prompt in Vista and unhide bootmgr (attrib -h -r -s bootmgr) and replace it with Windows 7's. Do same for bcdedit. You might consider making backup copies of these files before replacing them.

Then, add the VHD item to the boot menu using #2 above.

4. How to Remove

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

To remove, run the following command in a elevated command prompt:

CODE

bcdedit /delete {guid} /cleanup

Delete the vhd file.

Greets to spacesurfer!

Share this post


Link to post
Share on other sites

so basic i can hav a little play with windows 7 and not screw up ne of my existing OS, sweet!

cheers james

I can just say Brilliant ... Its actually let the "v-Generation" as i call it because the last few years , virtualization is more and more often .. and a person without "advance" knowlegde of the new OS systems cant understand whats the good idea to set up a Virtual PC in a Windows Vista and Install Windows XP .. And the same time they dont think its weird .. Because a normal installation is also "virtual" .. but with this info i actually can show people what i mean and why i do it :D

Share this post


Link to post
Share on other sites

BTW question for the Author .. Can i take info from here directly and put it on my blog .. I will translate it to my native language then .. i Know a few people who could use the info .. ))

Yes, if you put a source link to this forum.

Regards

Share this post


Link to post
Share on other sites

what id like to know is, if it would be possible to capture a VHD of the current system so it will sorta be like a PE.

Share this post


Link to post
Share on other sites

what id like to know is, if it would be possible to capture a VHD of the current system so it will sorta be like a PE.

You can capture a VHD of Win7 with imagex, but it's just a full backup. You'd have to treat it like any other VHD image and push it back down to the identical machine unless you sysprep it first. It won't be a PE though, it's just a backup. If you want a PE, you have to use the AIK to make one.

Share this post


Link to post
Share on other sites

hey guys,

I need some information about building a custom win 7.

Thing that i want to do is,

1- Fully cleaned win 7 ultimate 64bit -- i mean all the unnecessary things deleted.

2- Full updated sp1+

3- My raid drivers integrated.

4- Can be installed from VHD everytime.

5- Fully silent install even not asking 1 queston.

Is it possible to do? and how can i do it? please show me the way and sources.

Thanks..

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...