Creating a bootable Win8 VHD from the #BldWin USB Drive

Intro

Everyone who attended //BUILD this year received two things:

  1. A new Samsung Developer tablet which I won’t detail here, there’s sure to be loads of information out there beyond what I could provide here
  2. A 32GB USB stick with all the Win8 //BUILD bits on it

So, naturally, my quest was to get my laptop and tablet talking to each other, both using the Windows 8 developer preview.  To do that, I needed to get Win8 running on the laptop.  The ‘best’ option I saw, given that the USB stick contains ONLY 64-bit stuff, was to go ‘to the metal’ and create a bootable VHD.

How to do it

The steps here are pretty straightforward, so I’ll just lay them out for you here.  NOTE:  This requires Window 7 Enterprise or Ultimate to be installed on the destination machine:

1.  Create a new empty VHD

  1. Right-click your computer and choose ‘Manage’
  2. Switch to the ‘Disk Management’ area
  3. Choose Action->Create VHD
  4. I chose a basic 32GB partition [fixed size] and choose a location.  For this example, I created one on my hard drive in “C:\Virtual Machines\Win8.vhd” and click ‘OK’
  5. Right-click on the newly attached VHD and choose ‘Initialize Disk’, I chose the MBR option, then click OK
  6. Detach the resulting VHD

2. Plug in //BUILD USB Drive

You can do this step whenever you like while the computer is rebooting, I chose to just do it before I started the reboot process.

3.  Reboot your Computer

This step is crucial, and your machine MUST be setup to boot from any plugged in USB device.

4.  Enter Win8 setup [but not all the way]

When the computer boots, you’ll be presented with the Win8 setup process, choose your keyboard layout and such and enter the setup process BUT DO NOT CLICK ‘INSTALL’.

5.  Enter the ‘Repair’ area

Below the ‘Install Now’ button, there should be a repair link that lets you repair a PC.  Somewhere in this menu is an option to launch a command window [under Advanced –> Command Prompt ??].  Do this and then enter the DISKPART utility.

6.  SELECT and ATTACH the empty VHD

Once in DISKPART, you need to select and attach your VHD [yes, this feels backwards].  This will enable setup to see the drive and continue.  This requires two commands:

  1. SELECT VDISK FILE=”C:\Virtual Machines\Win8.vhd”
  2. ATTACH VDISK
  3. EXIT

7.  Resume installation process

Once done attaching the VHD, you can proceed with the install.  To do this, I just went back up to the root drive ‘X:’ in my case, and typed ‘setup.exe’.  This re-launches the setup UI and allows you to click ‘Install Now’.  During the install process, choose ‘Custom’.

8.  Finish VHD Setup

Inside the custom setup, when choosing the destination for the install, make sure you choose the newly attached VHD [usually the 30ish GB area listed as ‘Unallocated’].  Select that partition and click ‘New’ to create a new partition on the VHD, selecting the default size.  Then click ‘Format’ to format the associated partition.  Finally select the newly formatted partition and click ‘Next’.

NOTE:  The UI will tell you that it can’t install to that partition, but ignore the error and just click ‘Next’.

9.  WAIT… until the install process finishes, and when it starts to reboot, pull the USB stick

I don’t know if this is strictly necessary, but I did it to ensure I didn’t boot back to the USB again in error.  Win8 will have taken over your boot process and will complete the install and present you with the ‘developer preview’ software agreements and whatnot.

10.  There is no #10

'That’s it'!  Everything is working as expected, enjoy your new Win8 laptop!

 

It should be noted, that just like Win7, when the machine is starting up [after BIOS], you can hit F8 to get the boot menu [this is slow to come up], and choose ‘another OS’ and then choose to boot onto your Windows 7 machine as you used to.  You can probably also use bcdedit to set your Win7 install to be the default and use F8 from there to get into Win8 as desired.  I won’t detail those bits here, since they’ve been covered numerous times on other blogs.

 

That’s it, and as always, anything you do to your machine using these steps IS YOUR RESPONSIBILITY.  I accept no liability for any damage resulting from following these instructions

SmileSmile