Ramblings from another nerd on the grid
When was the last time you manually partitioned a hard drive? If you are using a modern operating system installation routine the answer is like to be a long time ago. Nearly all of the setup processing for modern operating systems give you one click convenience. Taking a raw hard drive and partitioning it properly has become easy. Windows 7 and Windows Server 2008 R2 are no exception and streamline the process quite nicely.
But what happens when you’ve been running a “Native Boot from VHD” environment for a period of time and decide to upgrade the drive? It’s not like you need to reinstall the OS from scratch. What are the core requirements to run Windows 7 and Windows Server R2?
Disk Partitions and Volumes
If you look at the default installation characteristics for Windows 7, you’ll notice the setup routine creates two partitions or volumes. One is the system partition and the other is the boot partition. This isn’t required if you have no plans to use BitLocker. You can create a single partition that is both the system and boot partition but there’s really no need to and it’s a hassle doing this manually anyway.
In the screenshot above I assigned the drive letter S: to the system volume. The drive we are looking at here is a 160GB Intel SSD. Windows 7 is installed into C:\windows and is not using native boot from VHD. I can change this pretty easily using the Physical to Virtual capturing utilities.
If we look at the contents of S:, we’ll see the Boot Configuration Database (BCD). How does that get there and how would we create it from scratch? It’s really simple. If the BCD doesn’t exist and you use BCDBOOT to create a BCD entry, a template from C:\Windows\System32\config is used as the source. BCDBOOT will only work if there’s an active system partition. That’s the key prerequisite.
Putting It All Together
The first thing you’ll want to do is make a copy of the data and VHD files you are moving to the new drive. I typically use an external eSATA or USB drive for copies like this. If you are converting a physical install of Windows into a “native boot from VHD” environment, see my blog post on that subject. Install the new drive. Boot from the Windows 7 DVD and run the following commands. We are creating a 100MB active system partition, and another boot partition sized at the remainder of the drive. The commands are abbreviated because DISKPART only needs enough characters to resolve ambiguity in it’s command set.
The partitions are now ready for your data. We haven’t yet created the BCD store and entry, but we are getting ready to do that now. If you haven’t already, you’ll need to attach the drive containing the VHD you want to boot. In my case, I’ll setup two different operating systems.
Congratulations. You have manually partitioned a physical disk, moved the data and native boot from VHD files to the disk partition, added BCD entries, etc.