ref:http://woshub.com/software-boot-mirror-gpt-windows/
windows now supports software raid with “storage spaces”, but you cannot do this to your OS drive, only secondary, tertiary, etc drives.
this method allows you to use diskpart to replicate the format and partitions of your OS drive, and create a raid1 mirror with another drive, live in windows, without data loss, just one blank spare disk of the same size.
this assumes your OS is installed in disk 0 and disk 1 is empty. list your partitions to note the size
DISKPART> list part Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Recovery 450 MB 1024 KB Partition 2 System 100 MB 451 MB Partition 3 Reserved 16 MB 551 MB Partition 4 Primary 222 GB 567 MB Partition 5 Recovery 513 MB 223 GB
erase disk 1
sel disk 1 clean con gpt
delete the 15mb reserved partition
sel part 1 del part override
create partitions on disk 1 to match disk 0:
Select disk 1 Create partition primary size=450 format quick fs=ntfs label=”WinRE” set id=”de94bba4-06d1-4d40-a16a-bfd50179d6ac” create partition efi size=100 create partition msr size=16 Create partition primary size=513 format quick fs=ntfs label=”WinRE” set id=”de94bba4-06d1-4d40-a16a-bfd50179d6ac”
convert to dynamic
sel disk 1 con dyn
mirror disk 0 with disk 1:
sel vol c add disk=1
create GPT mirror for EFI partition
Select disk 1 Select part 2 assign letter=S format fs=FAT32 quick select disk 0 select partition 2 assign letter=P exit
more Bootloader edits:
bcdedit /enum
bcdedit /copy {bootmgr} /d "Windows Boot Manager Cloned"
bcdedit /set {5df8934c-7619-11ec-9533-db70a9132c0a} device partition=s:
P:
bcdedit /export P:\EFI\Microsoft\Boot\BCD2
robocopy p:\ s:\ /e /r:0
Rename s:\EFI\Microsoft\Boot\BCD2 BCD
Del P:\EFI\Microsoft\Boot\BCD2
Last modified: le 2022/01/17 22:46

Discussion