设为首页收藏本站

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1015|回复: 3

How to use a VHD to dual-boot Windows 8 on a Windows 7 PC

[复制链接]
发表于 2012-6-15 13:50:55 | 显示全部楼层 |阅读模式
Summary: I wanted to try Windows 8 on my new Ultrabook, but I didn’t want to mess up a perfectly good Windows 7 installation with a beta OS. And then it struck me: I can boot Windows 8 from a virtual hard disk. So can you, following these simple steps.
                                                Update, June 2, 2012: I have tested the steps in this article with the Windows 8 Release Preview on multiple test systems and can confirm that everything works just as described here.
For the last six weeks, my portable PC of choice has been an ASUS Zenbook UX31E. It’s a wonderful little machine—light, fast, fun to use, and a great example of what’s right with the whole Ultrabook category.
I wanted to try Windows 8 on this machine, but I didn’t want to mess up a perfectly good Windows 7 installation. This is, after all, a machine I use for work, and Windows 8 is still a beta, with some rough edges.
The Zenbook has a 128GB SSD, which is fine for a secondary work PC but not enough to split in half for a conventional dual-boot setup. And there’s no way to upgrade that built-in drive. After a few milliseconds of thought, I rejected the idea of trying to shrink my existing disk partition so I could pull that off.
And then it struck me: Wait a minute. I can boot Windows 8 from a virtual hard disk on this machine! And 30 minutes later, that’s exactly what I was doing.
I still have a single SSD with a single partition. But this is what I see at startup:

The actual steps for creating a virtual hard disk (VHD) and installing Windows 8 on it are very simple. The hardest part, in my experience, is wrapping your mind around exactly how this procedure works. So in this post I’m going to explain everything in detail, in the clearest, simplest language I can. Follow along, and I am confident it will work for you too.
Disclaimer, right up front: This works for me. I’ve tested it on several PCs, and I’m confident enough to write about it. But I haven’t tested it on your hardware. You should make a complete backup of your PC (preferably as a system image) before you try the procedures I describe in this post. In fact, you should have a complete backup of your PC even if you don’t try this. OK?

First things first. To make this work, you need the following ingredients:
  • A desktop or notebook PC running Windows 7 Ultimate or Enterprise (preferably 64-bit). The Boot from VHD feature does not work on other versions of Windows 7. If you’re running Windows 7 Home Premium or Professional, you can’t do this.
  • The Windows 8 Release Preview ISO file (32-bit or 64-bit). All of the ISO files are available for download here.
  • The Windows 7 USB/DVD download tool, which is available for download here. (Don’t let the name fool you—it works just fine with Windows 8.)
  • A 4GB (or larger) USB flash drive or a DVD. I highly recommend using a USB flash drive as your installation media. It’s faster, and it works on any modern PC.
  • At least 20GB of free space on a local hard disk or SSD. If you plan to do more than tinker with Windows 8, I recommend that you have at least 60 GB of free disk space, plus enough extra disk space to accommodate a paging file equal in size to the amount of RAM in your PC.
And one extra caution: If you’ve protected your system drive with BitLocker encryption, stop right now. This will just make you cry.
OK? We good? Then continue…
Download the Windows 8 Release Preview ISO file and use the download tool to make a bootable USB flash drive or DVD:

You are now ready to begin the process of creating a virtual hard disk and installing Windows 8.

发表于 2012-6-15 20:27:08 | 显示全部楼层

Where is the Windows 8 Consumer Preview product key?

本帖最后由 John 于 2012-6-16 12:35 编辑

Are you planning to test the Windows 8 Consumer Preview? Make sure you pick up a product key. Unlike Windows 7, you can’t skip this box and fill in a key later.
If you use the web installer, a key is generated and filled in automatically for you. If you download an ISO disk image and create your own installation media, on the other hand, you’ll need to type in a 25-character key.
Where do you get a Windows 8 Consumer Preview product key?
Microsoft has published two keys that anyone can use.
The ISO download page includes this public key:
DNJXJ-7XBW8-2378T-X22TX-BKG7J
The Windows 8 Consumer Preview FAQ has a different key:
NF32V-Q9P3W-7DR7Y-JGWRW-JFCK8
If you’re eager to get started, go to this page: Download Windows 8 Consumer Preview.
I’ve got lots and lots of information to help you with your evaluation here:
Getting started with the Windows 8 Consumer Preview (ZDNet)

If you install Windows 8 Release Preview using the Windows 8 Release Preview Setup program, you won't need to enter a product key—the setup program automatically provides the product key. If you create installation media, start your PC from the media, and then install Windows 8 Release Preview, you'll need to enter this product key: TK8TP-9JN6P-7X7WW-RFFTV-B7QPF.            
 楼主| 发表于 2012-6-15 20:16:42 | 显示全部楼层

RE: How to use a VHD to dual-boot Windows 8 on a Windows 7 PC - 2

It is possible to use the command line Diskpart tool to do everything I describe in this how-to. If you’re comfortable with that, you are a ninja. You don’t need me.
The procedure I describe here uses the absolute minimum number of command-line steps. For this portion of the job, we’ll use the Disk Management console.
Open Windows Explorer, right-click Computer in the navigation pane on the left side of the window, and click Manage in the shortcut menu. That opens the Computer Management console.
Click Disk Management in the pane on the left side of the window and wait until you see all currently installed disks in the contents pane, as shown here:

As you can see, this machine has a single hard disk (with the tiny 100MB boot partition and a much larger partition used for Windows and all data files).
Click the Action menu and you’ll see two VHD options. Click Create VHD to get started.

I created a VHD folder on the C drive because it’s easy to remember, but you can put the VHD file anywhere you want and give it any name you want. Specify a size (I’ve used 60GB here). In Windows 7, you can choose between a Dynamically expanding virtual hard disk or a Fixed size VHD. Which one you choose doesn’t really matter; just make sure you have enough room on your current physical disk to accommodate the space you specified.
Click OK to create the VHD file and continue. It only takes a few seconds to complete the process, and when it’s done you’ll see a new entry in the Disk Management console.

As far as Windows is concerned, that’s a brand-new 60GB disk you’ve just installed. You don’t need to initialize it or format it or do anything with it at this point. Make a note of the exact path and filename of the VHD you created; you’ll need it shortly. You’ve now done enough to move on to the next phase.
Plug in the bootable USB flash drive or insert the bootable DVD installation media you created earlier and restart your PC. Do whatever it takes to start your computer using that bootable media. When you get to the Windows 8 setup screens, you’re ready to move on to the next phase.

 楼主| 发表于 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

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )  

GMT-8, 2026-2-5 10:03 , Processed in 0.011596 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表