Dual boot Windows 7 and 2008R2

By | October 5, 2011

I thought I’d share my recent experience with setting my laptop up to dual boot between Windows 7 Enterprise and Windows Server 2008 R2.  To be honest it’s something that I have always been put off doing due to past experience, thankfully it is now pretty straight forward to do, however this dual boot configuration has a bit of a twist to it.

Within Windows 7 and Windows Server 2008 there is a pretty cool feature that allows you to boot from a VHD file.  Essentially what you end up with is your main OS on one partition and then a VHD file with your secondary OS on another partition and a boot menu to select your OS.

In my case I was running Windows 7 Enterprise as my main OS utilising the full capacity of my hard disk.  Before I could create the VHD file and install Windows Server 2008 R2 I needed to create a second partition for the VHD file.  To do this I used the shrink option (which is available via Disk Management) on drive C: to create 110GB partition.  Obviously the size of this partition depends on the free space you have available and also what you are going to be doing with the Windows Server installation.  In my case I chose 110GB as my plan was to install the Hyper-V role and then use this as lab environment.  Yes you read that correctly, my plan was to boot from a VHD file and then run multiple Virtual Guests from within this environment.

Once you have created your free space, the next step is to boot your PC/Laptop from the Windows Server 2008 DVD.  At the Welcome screen you will need to press Shift+F10 which will launch the WinPE console that you will need for the next step to run Diskpart.  Follow the below steps to prepare your partition and create the VHD file for Windows Server 2008 R2.

Type Diskpart
Type List Disk
Type Select Disk 0 – this assumes you only have one physical disk installed
Type Create partition primary
Type Format fs=ntfs quick
Type List vol – you should have an asterix against the new partition
Type Assign – this will assign the next available drive letter
Type List vol – make a note of your new drive letter
Type Create vdisk file=E:\Yourfilename.vhd maximum=100000 type=expandable
Type Select vdisk file=E:\Yourfilename.vhd
Type attach vdisk
Type Create partition primary
Type format fs=ntfs quick
Type assign letter=z:

At this point you have now created and prepared your VHD file and assigned the drive letter z: to it.  Exit out of diskpart and continue installing Windows Server 2008 R2 as you would normally.  When you get to the ‘Where do you want to install Windows?’ screen you will see the z: drive that you have just created, this is the drive that you need to select to install the OS to.

Once the OS installation is complete, you will see that you now have a boot menu on startup next time you reboot your pc/laptop.

Leave a Reply

Your email address will not be published. Required fields are marked *