How to convert a Windows Dynamic Disk (MBR) to Standard
by LBuhler from LinuxQuestions.org on (#54CZ8)
To keep in line with the privacy regulations imposed by the EU I needed to encrypt my business servers containing customer data. Having installed a new Linux server recently with proper encryption and Raid 1 array I couldn't leave my sole Windows Server 2012-R2 lagging behind.
One's got to love Linux's dynamic and modular possibilities when it comes to encryption and disk manipulation. This will become clear in the following sections.
The first obstacles showed up quickly. Windows Server 2012 R2 has bitlocker capabilities, but not for a software Raid 1 setup. Which is what's in place and the Raid 1 is a necessity for my server.
This meant that I had to migrate this setup to hardware Raid 1. Getting a Raid controller is easy, however, transferring everything to the newly found array is harder.
If you retain the same drives, they have to get erased and a little bit of hard drive space is lost to facilitate the Raid controller. Due to this fact you cannot use the windows backup system to restore the system. It could be possible with a larger drive, but count on the Windows backup system blocking the recovery because the drives don't match their original counterparts.
So onto Linux it is, either with a Live medium or a installation on an USB drive. Have a big enough spare drive available to transfer the original drive onto or use two other disks to create the new hardware Raid array.
I used the original drive as the source and copied the data to the new array with SSDs having the same size as the original. The next part is an explanation in case you use another drive to move the data to (and function as a proxy).
You can just run (everything as root):
The source drive contains (usually) 4 partitions (in a msdos/mbr setting). These are all of the type "SFS" which indicates the presence of and them being a part of a proprietary Microsoft dynamic drive. You can't resize these or alter these partitions because parted can't handle their proprietary structure.
What you can do is copy them the new array. Start gparted to get going:
On the source disk (/dev/sda for instance) the first and last small partitions are to be forgotten on the source drive. Copy the recovery/boot partition to the new drive.
Right click on the source partition (sda2 i.e.) and select "copy". Select the destination drive (sdb), right click on the unpartitioned/unallocated space and select "paste". If the other partition is bigger, shrink this partition first by selecting "resize/move" to have enough available space for the other partition(s).
Head back to the source drive and copy the other partition(s). Paste it into the free space of the destination drive. Hit the apply button to start this process of copying. This may take a while.
Once everything has been transferred, resize the partitions to make everything line-up again. Don't forget to hit apply. In my case the boot/recovery partition had to become 350 MiB again. If you have a boot partition present, right click on that one, "manage flags" and activate "boot".
You can exit gparted now. If this drive contains your Windows system, the following is essential to restore it to a bootable state:
If you're not using a live Linux distribution you may consider updating your grub using:
This, or your original Windows install medium, should be used for the final part of this transfer. Boot into the recovery mode from the grub bootloader (hit F12 and subsequently F8 and make sure you end up at a command prompt). If you use the install medium, boot it and select recover instead of running the install. Drop to the command prompt.
You should be at "X:\sources" move to recovery:
That's it, you've successfully converted your dynamic Windows (software Raid 1 array) disk to a (hardware Raid array) standard layout disk.
If you are going to do this with a GPT/(U)EFI drive examine the differences carefully first. This guide is not sufficient to make such a transfer successful.


One's got to love Linux's dynamic and modular possibilities when it comes to encryption and disk manipulation. This will become clear in the following sections.
The first obstacles showed up quickly. Windows Server 2012 R2 has bitlocker capabilities, but not for a software Raid 1 setup. Which is what's in place and the Raid 1 is a necessity for my server.
This meant that I had to migrate this setup to hardware Raid 1. Getting a Raid controller is easy, however, transferring everything to the newly found array is harder.
If you retain the same drives, they have to get erased and a little bit of hard drive space is lost to facilitate the Raid controller. Due to this fact you cannot use the windows backup system to restore the system. It could be possible with a larger drive, but count on the Windows backup system blocking the recovery because the drives don't match their original counterparts.
So onto Linux it is, either with a Live medium or a installation on an USB drive. Have a big enough spare drive available to transfer the original drive onto or use two other disks to create the new hardware Raid array.
I used the original drive as the source and copied the data to the new array with SSDs having the same size as the original. The next part is an explanation in case you use another drive to move the data to (and function as a proxy).
You can just run (everything as root):
dd if=/dev/<source disk> of=/dev/<temp dest disk>This will give you a complete duplicate of the original drive somewhere else. After this, reboot, assemble the array and reboot Linux.
The source drive contains (usually) 4 partitions (in a msdos/mbr setting). These are all of the type "SFS" which indicates the presence of and them being a part of a proprietary Microsoft dynamic drive. You can't resize these or alter these partitions because parted can't handle their proprietary structure.
What you can do is copy them the new array. Start gparted to get going:
gpartedCreate a new partition table type "dos" on the new array disk. Let's keep that at /dev/sdb for this example. Adjust these devices according to your setup.
On the source disk (/dev/sda for instance) the first and last small partitions are to be forgotten on the source drive. Copy the recovery/boot partition to the new drive.
Right click on the source partition (sda2 i.e.) and select "copy". Select the destination drive (sdb), right click on the unpartitioned/unallocated space and select "paste". If the other partition is bigger, shrink this partition first by selecting "resize/move" to have enough available space for the other partition(s).
Head back to the source drive and copy the other partition(s). Paste it into the free space of the destination drive. Hit the apply button to start this process of copying. This may take a while.
Once everything has been transferred, resize the partitions to make everything line-up again. Don't forget to hit apply. In my case the boot/recovery partition had to become 350 MiB again. If you have a boot partition present, right click on that one, "manage flags" and activate "boot".
You can exit gparted now. If this drive contains your Windows system, the following is essential to restore it to a bootable state:
dd if=/dev/sda of=/dev/sdb bs=446 count=1This copies the bootsector (but not the partition table) to the destination drive.
If you're not using a live Linux distribution you may consider updating your grub using:
"update-grub" or "grub-mkconfig -o /boot/grub/grub.cfg"This should give you the option to boot the Windows recovery drive.
This, or your original Windows install medium, should be used for the final part of this transfer. Boot into the recovery mode from the grub bootloader (hit F12 and subsequently F8 and make sure you end up at a command prompt). If you use the install medium, boot it and select recover instead of running the install. Drop to the command prompt.
You should be at "X:\sources" move to recovery:
cd recoveryRun:
StartRep.exeThis should be enough to restore the drive's booting capabilities.
That's it, you've successfully converted your dynamic Windows (software Raid 1 array) disk to a (hardware Raid array) standard layout disk.
If you are going to do this with a GPT/(U)EFI drive examine the differences carefully first. This guide is not sufficient to make such a transfer successful.