IPB

Google Frontpage Forums Unattended CD/DVD Guide

> Windows 7 forum rules

If you have questions about customizing Windows 7 that are vLite-specific, please post them in the vLite forum, not here.

3 Pages V   1 2 3 >  
Reply to this topicStart new topic
> Boot Windows 7 from VHD - an amazing concept, Here's how to do it
spacesurfer
post Feb 3 2009, 03:11 PM
Post #1


Pharmassist
Group Icon

Group: Super Moderator
Posts: 1644
Joined: 31-July 04
From: United States
Member No.: 25917
OS: Vista Ultimate x64
Country Flag


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.

This post has been edited by spacesurfer: Apr 3 2009, 04:49 PM
Go to the top of the page
 
+Quote Post
McoreD
post Feb 4 2009, 08:45 AM
Post #2


Member
**

Group: Members
Posts: 156
Joined: 3-September 04
From: Perth, Australia
Member No.: 29887
OS: Vista Business x64
Country Flag


spacesurfer, That's great! I am going to try this as well. Do you find it significantly slower or do you experience normal speeds when using Windows 7 this way? Is it good enough to watch movies etc?
Go to the top of the page
 
+Quote Post
spacesurfer
post Feb 4 2009, 08:57 AM
Post #3


Pharmassist
Group Icon

Group: Super Moderator
Posts: 1644
Joined: 31-July 04
From: United States
Member No.: 25917
OS: Vista Ultimate x64
Country Flag


I haven't tried it yet. I'm going to do that today. I had two similar questions:

1) Does booting and running from VHD take a performance hit?
2) Do you have all your other partitions and HDD's available for read-write operation?

I'll find out today! Installing right now as I speak.

This post has been edited by spacesurfer: Feb 4 2009, 09:14 AM
Go to the top of the page
 
+Quote Post
suryad
post Feb 4 2009, 10:23 AM
Post #4


MSFN Expert
******

Group: Members
Posts: 1216
Joined: 17-February 05
From: Folsom, California
Member No.: 44250
OS: none
Country Flag


So for the uninitiated, this is something like using a VM...like Virtualbox and running the OS in it except you dont need to use a VM like Virtualbox?
Go to the top of the page
 
+Quote Post
spacesurfer
post Feb 4 2009, 12:05 PM
Post #5


Pharmassist
Group Icon

Group: Super Moderator
Posts: 1644
Joined: 31-July 04
From: United States
Member No.: 25917
OS: Vista Ultimate x64
Country Flag


QUOTE (suryad @ Feb 4 2009, 11:23 AM) *
So for the uninitiated, this is something like using a VM...like Virtualbox and running the OS in it except you dont need to use a VM like Virtualbox?

YES! Exactly.

So, I'm using Windows 7 beta build 7000 right now and typing this from it currently. I followed the instructions exactly.

Prior to install, my setup was C: = Vista SP1 on 12 GB partition and D: = Storage 25 GB partition.

During install, I created a VHD on D: 6.66 GB. I used a vLited Windows 7 ultimate. The installation process is automatic. It automatically creates a boot entry to boot from VHD.

After install, I HAD ACCESS TO MY STORAGE PARTITION (D:) - GREAT!!! My Vista partition is not assigned a drive letter but I can see it in Drive Management. I don't particularly need it though.

Performance-wise - I see no performance hit as yet. I'm using firefox 3.0.6 to type this and I'm installing Comodo Firewall right now.
Go to the top of the page
 
+Quote Post
gamehead200
post Feb 4 2009, 10:33 PM
Post #6


SEARCH!!! SEARCH!!!
Group Icon

Group: Super Moderator
Posts: 6855
Joined: 2-September 02
From: Montreal, Canada
Member No.: 1828
OS: Windows 7 x64
Country Flag


Hmmm... Interesting and a great way of installing Windows 7.

[ Pinned. ] smile.gif
Go to the top of the page
 
+Quote Post
jaclaz
post Feb 5 2009, 04:10 AM
Post #7


MSFN SuperB
Group Icon

Group: Software Developers
Posts: 5576
Joined: 23-July 04
From: Italy
Member No.: 25215
OS: none
Country Flag


VERY GOOD find! smile.gif

It's what I have (failing miserably newwink.gif) attempted to ask help with since a couple of years:
http://www.boot-land.net/forums/?showtopic=1507&st=1
(for "normal" 2K/XP/2003)

Maybe this can be somehow "retro-fitted".....unsure.gif

thumbup.gif

jaclaz
Go to the top of the page
 
+Quote Post
eyeball
post Feb 5 2009, 06:58 AM
Post #8


Have you tried turning it off and on again?
******

Group: Members
Posts: 1141
Joined: 28-October 05
From: uk
Member No.: 78007
OS: Windows 7 x64
Country Flag


Yes i would imagine a performance hit is to be expected with this as it works by using a driver that understands the NTFS filesystem and VHD format, it will locate the VHD file on the physical NTFS volume then open that up, and boot windows reading its the NTFS structure from the VHD file.
Go to the top of the page
 
+Quote Post
jaclaz
post Feb 5 2009, 08:22 AM
Post #9


MSFN SuperB
Group Icon

Group: Software Developers
Posts: 5576
Joined: 23-July 04
From: Italy
Member No.: 25215
OS: none
Country Flag


Related video from MS, link originally posted by allanf on boot-land:
http://www.boot-land.net/forums/index.php?...c=6982&st=2

http://download.microsoft.com/download/D/9...A8FA31/dism.wmv

jaclaz
Go to the top of the page
 
+Quote Post
amigafan
post Feb 5 2009, 08:59 AM
Post #10


Junior
*

Group: Members
Posts: 52
Joined: 24-April 04
From: Stoke on Trent
Member No.: 18425



I'd hardly call this an amazing concept, since Linux, BeOS and QNX were doing this a decade ago.
Go to the top of the page
 
+Quote Post
cluberti
post Feb 5 2009, 09:33 AM
Post #11


Gustatus similis pullus
Group Icon

Group: Supervisor
Posts: 8926
Joined: 9-September 01
From: device attached to the internet
Member No.: 311
OS: Windows 7 x64
Country Flag


QUOTE (amigafan @ Feb 5 2009, 09:59 AM) *
I'd hardly call this an amazing concept, since Linux, BeOS and QNX were doing this a decade ago.

Don't be crazy, they were not. QNX is the only OS to have something similar, and it's not the same. We're not talking about a kernel image, or running a kernel image off of a non-native filesystem - this is an entire "volume" inside a VHD, that is bootable from another OS natively without a Virtual machine. It's not quite the same - and also, we're talking about Windows here, not a fringe OS - this brings virtual disk booting to the masses (well, once Win7 releases).
Go to the top of the page
 
+Quote Post
spacesurfer
post Feb 5 2009, 09:44 AM
Post #12


Pharmassist
Group Icon

Group: Super Moderator
Posts: 1644
Joined: 31-July 04
From: United States
Member No.: 25917
OS: Vista Ultimate x64
Country Flag


QUOTE (eyeball @ Feb 5 2009, 07:58 AM) *
Yes i would imagine a performance hit is to be expected with this as it works by using a driver that understands the NTFS filesystem and VHD format, it will locate the VHD file on the physical NTFS volume then open that up, and boot windows reading its the NTFS structure from the VHD file.

No performance hit noted by me yet.

So far, certain things are faster than Vista SP1, such as opening Network and Sharing Center. Boot time is faster or same as Vista.

Only issues are the bugs that are typical of a beta. Otherwise, I can live off of Windows 7!
Go to the top of the page
 
+Quote Post
amigafan
post Feb 5 2009, 10:19 AM
Post #13


Junior
*

Group: Members
Posts: 52
Joined: 24-April 04
From: Stoke on Trent
Member No.: 18425



QUOTE (cluberti @ Feb 5 2009, 09:33 AM) *
Don't be crazy, they were not. QNX is the only OS to have something similar, and it's not the same. We're not talking about a kernel image, or running a kernel image off of a non-native filesystem - this is an entire "volume" inside a VHD, that is bootable from another OS natively without a Virtual machine. It's not quite the same - and also, we're talking about Windows here, not a fringe OS - this brings virtual disk booting to the masses (well, once Win7 releases).


QNX, Mandrake Linux and BeOS all had an ""entire "volume" inside a VHD, that is bootable from another OS natively without a Virtual machine". I know what I'm talking about.
Go to the top of the page
 
+Quote Post
cluberti
post Feb 5 2009, 11:52 AM
Post #14


Gustatus similis pullus
Group Icon

Group: Supervisor
Posts: 8926
Joined: 9-September 01
From: device attached to the internet
Member No.: 311
OS: Windows 7 x64
Country Flag


I'm not talking about a Live CD here, or firing up Qemu for a VM to run Linux from inside Windows (VHD boot is *not* a virtual machine) - what are you speaking of, and where's the documentation? I cannot find any, nor do I remember ever finding this in BeOS, specifically, either. I'd like to see some documentation if I'm wrong.
Go to the top of the page
 
+Quote Post
Noise
post Feb 5 2009, 02:31 PM
Post #15


Windows Guru
***

Group: Members
Posts: 420
Joined: 27-February 04
From: San Pedro, CA
Member No.: 15011
Country Flag


Spacesurfer, this is awesome.

Are the vdisk files dynamic in size, or can you set them to be one huge size initially to avoid fragmentation?
Go to the top of the page
 
+Quote Post
Nihility
post Feb 5 2009, 03:52 PM
Post #16


Newbie


Group: Banned
Posts: 48
Joined: 31-January 09
Member No.: 230085
Country Flag


Can you run the virtual disks from within virtual PC or is the only purpose of this to not require a new separate partition for win7?
Go to the top of the page
 
+Quote Post
spacesurfer
post Feb 5 2009, 04:04 PM
Post #17


Pharmassist
Group Icon

Group: Super Moderator
Posts: 1644
Joined: 31-July 04
From: United States
Member No.: 25917
OS: Vista Ultimate x64
Country Flag


QUOTE (Nois3 @ Feb 5 2009, 03:31 PM) *
Spacesurfer, this is awesome.Are the vdisk files dynamic in size, or can you set them to be one huge size initially to avoid fragmentation?
I haven't explored the options when creating the vdisk using diskpart. I set mine to 6.8 gb and it turned out to be a fixed disk. I do believe it creates a fixed disk. If fragmentation occurs, I imagine you can boot to Vista and use Wincontig to make it contiguous.

QUOTE (Nihility @ Feb 5 2009, 04:52 PM) *
Can you run the virtual disks from within virtual PC or is the only purpose of this to not require a new separate partition for win7?
You can run it from Virtual PC but you'll have a problem with the HAL. Remember that this is not a virtual install. It's a real physical install, where the installation is contained within a virtual HDD. And yes, the advantage is that you don't have to repartition your HDD to install Win 7. Therein lies the greatest advantage.

If you want to get rid of it, just edit bcd and remove the entry for Windows 7 and delete the vhd. That's it as far as I know.
Go to the top of the page
 
+Quote Post
Nihility
post Feb 5 2009, 04:09 PM
Post #18


Newbie


Group: Banned
Posts: 48
Joined: 31-January 09
Member No.: 230085
Country Flag


Any idea if the VHD can be turned into a real partition? So I could use it as a backup for my installations? Possibly with the ability to add drivers to it offline like was done in the video.

I'd love to have an offline installation that I can easily update and use to restore my system when it gets corrupted.

Also, is it possible to add programs using the offline tool or would I have to mount it?

Can you do a quick test to see if mounting the VHD using disk managment allows you to resize it?
Go to the top of the page
 
+Quote Post
spacesurfer
post Feb 5 2009, 05:00 PM
Post #19


Pharmassist
Group Icon

Group: Super Moderator
Posts: 1644
Joined: 31-July 04
From: United States
Member No.: 25917
OS: Vista Ultimate x64
Country Flag


I do believe you have to mount it (or "attach" it as MS calls it). Mounting is not supported in Vista AFAIK so I can't test it. You have to test it from Windows 7 which supports mounting VHD. Or use some other program that allows mounting VHD.

I know WinImage opens VHD's and it can also mount ISO's using filedisk utility but I'm not sure if it can mount VHD as a drive, which is what you need for offline servicing.
Go to the top of the page
 
+Quote Post
jaclaz
post Feb 6 2009, 02:08 AM
Post #20


MSFN SuperB
Group Icon

Group: Software Developers
Posts: 5576
Joined: 23-July 04
From: Italy
Member No.: 25215
OS: none
Country Flag


QUOTE (spacesurfer @ Feb 6 2009, 12:00 AM) *
I do believe you have to mount it (or "attach" it as MS calls it). Mounting is not supported in Vista AFAIK so I can't test it. You have to test it from Windows 7 which supports mounting VHD. Or use some other program that allows mounting VHD.

I know WinImage opens VHD's and it can also mount ISO's using filedisk utility but I'm not sure if it can mount VHD as a drive, which is what you need for offline servicing.


VHDmount from Microsoft Virtual Server 2005 SP1 can mount VHD's
http://www.boot-land.net/forums/index.php?showtopic=2220
post #9

"static", NOT "growable" VHD's can be mounted with IMDISK (giving it the offset to the bootsector) or possibly with VDK (giving it the offset to the MBR or that of the bootsector).

I am not familiar with VHD format, searching for the byte patterns with a file/disk hex viewer/editor on an actual image usually you can find them in a matter of minutes:
http://www.boot-land.net/forums/index.php?...c=2220&st=3

jaclaz
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

3 Pages V   1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 




Lo-Fi Version Time is now: 9th February 2010 - 12:48 PM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2010 msfn.org
Privacy Policy