Sunday, March 15, 2009
Rob
In my last post I wrote about how to install Windows Server 2008 R2 into a VHD for dual-booting purposes. Well, recently I broke my laptop and had to rebuild my boot loader. Anyways, adding an existing VHD to the Windows 7 boot loader is a doddle.
First, copy your current boot loader:
bcdedit /copy {current} /d "Boot Description"
This will generate a new boot entry and print out the GUID. You’ll need this! Next, you’ll set the VHD path for the OS to use.
bcdedit /set {GUID from last step} osdevice vhd=[DriveLetter:]\PathToVHD\VHD_File
bcdedit /set {GUID from last step} device vhd=[DriveLetter:]\PathToVHD\VHD_File
That’s it! Reboot your PC and your VHDs should be bootable. Remember though, you can only boot Windows 7 or Windows Server 2008 R2 VHDs like this.
Tuesday, January 27, 2009
Rob
I’ve been using Windows 7 as my primary OS on my laptop (a nice shiny new Dell Studio 17) for a little while now. I’ve found it almost as stable as Vista, definitely faster and some of the new features are very useful – the wireless connection stuff is much better for example. However, the lack of any hypervisor-based virtualization product with it means I have to use Windows Server 2008 for many work-based things.
Now, with both Windows 7 and Windows Server 2008 R2, you can boot from a VHD file. Why is this great? Well, my laptop only has one disk partition and I can’t be bothered to resize it (and no, using DISKPART doesn’t work – I have 0B available to shrink). It also means that I can stick in my USB stick with the Windows Server 2008 R2 install files on, open a command prompt (using SHIFT+F10 when the first dialog box pops up) and type:
diskpart
create vdisk file=D:\VHDs\Win2k8R2.vhd type=expandable maximum=32768
select vdisk file=D:\VHDs\Win2k8R2.vhd
attach vdisk
exit
I can then continue the install – it does complain about not being able to boot from this volume, but don’t believe it. Just press next and the whole thing works like a dream.