My Setup
My dedicated server has two identical 3TB hard drives and a single public IPv4 address. The hoster offers a free remote console but charges for attaching an optical or USB device. The server was running Windows Server 2008 R2 with the Hyper-V role installed.Based on this setup I wanted to migrate to Windows Server 2012 without having to pay for attaching an installation medium. Therefore, I decided to upgrade “in-place” – meaning that I installed the new OS from the old one still running on it. The hardest part was getting the boot loader to work correctly … but first things first …
Note: If you have not made the switch ti UEFI yet, some of the commands are slightly different. I added some notes to point you in the right correction but I have not tested the contents of this article on a BIOS-based system.
The following commands create four partitions: 300MB for separating WinRE, 100MB for a FAT32-formatted EFI boot partition, 128MB for a Microsoft Reserved (MSR) partition and a OS partition taking up the remaining space. In my case, I later shrinked the OS partition to accomodate for additional partitions.
clean convert gpt rem == 1. Microsoft Reserved (MSR) partition ======= rem == this partition is created during conversion to GPT rem == 2. System partition ========================= create partition efi size=100 format quick fs=fat32 label="System" assign letter="S" rem == 3. Windows RE tools partition =============== create partition primary size=300 format quick fs=ntfs label="Windows RE tools" assign letter="T" set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac" gpt attributes=0x8000000000000001 rem == 4. Windows partition ======================== create partition primary format quick fs=ntfs label="Windows" assign letter="W"diskpart can also provide a quick overview which partitions are assigned a drive letter by running list volume.
Note: For BIOS/MBR based systems, you will have to leave out the conversion to GPT (second command) and the second partition in the list (system partition).