|
|
楼主 |
发表于 2012-6-15 20:19:22
|
显示全部楼层
RE: How to use a VHD to dual-boot Windows 8 on a Windows 7 PC - 3
If you’ve installed Windows 8 before, the first few steps here will be straightforward. (In fact, it’s pretty close to the Windows 7 setup experience, too.)
Pick a language (U.S. English is the default), click the Install button, and enter the Windows 8 product key. (Microsoft has helpfully provided two public keys you can use for this task. You can find them here.)
You have now reached the point where you need to tell Windows that you want to do a custom installation on your new virtual hard disk. But there’s a slight problem at this point: The Windows 8 installer doesn’t know about your virtual hard disk yet. So, just for this one step, you need to dip down into the Windows Command Prompt.
Press Shift+F10 to open a Command Prompt window, where you will type some simple commands. Here’s what it looks like:

Before you can finish this step, you need to know the drive letter that Windows 8 Setup thinks your VHD file is stored on. In the Command Prompt window, type dir C: to confirm that Windows 8 Setup sees your VHD file. If you see the VHD folder, great. If not, try dir D:, dir E:, and so on, until you locate the correct drive letter. (In my test system shown here, the 100MB system partition was recognized as drive C:, and my VHD file was located on drive D:, with a full path of D:\VHD\win8-cp.vhd.)
After confirming those details, type diskpart and press Enter to open the command-line disk partitioning utility.
At the DISKPART prompt, type the following commands:
select vdisk file=c:\vhd\win8-cp.vhd (substitute the full path to your VHD file after the equal sign)
attach vdisk
exit
You can now click the Custom option in the Windows 8 setup dialog box. That takes you to a screen like this one:

Pick the new “drive” you created in the previous step and ignore the bogus error message that says Windows can’t be installed there. It can indeed. Click Next to continue.
You can now complete setup, which will proceed exactly as if you were using a physical hard disk. When you’re done, you’ll have a startup menu where you can choose from Windows 7 or Windows 8, with your most recent installation (Windows 8) as the default. You can use the Msconfig utility to change the default OS back to Windows 7. If you do, the startup menu will change to the plain white text on black background version. If Windows 8 is the default, you get the Metro style graphical boot menu.
You still have only a single physical disk and a single partition, but if you boot to Windows 8 and look in Windows Explorer you’ll see two drives there:

As far as Windows is concerned, that 60GB C: drive is the real thing, even though we both know it’s just a file pretending to be a hard disk.
And that’s it. When you’re done with your testing, you can blow away the Windows 8 installation by booting into Windows 7 and doing two things:
- First, delete the VHD file you created earlier.
- Then, open Msconfig, click the Boot tab, and delete the entry for Windows 8.
By Ed Bott | April 19, 2012
http://www.zdnet.com/blog/bott/how-to-use-a-vhd-to-dual-boot-windows-8-on-a-windows-7-pc/4847?tag=content;siu-container
|
|