Setting Up Mirrored Boot Hard Drives in Windows 10

This is a thing I have to do from time to time, and up to now I’ve been depending on two different sets of instructions (because one was not correct for Windows 10, and the other isn’t complete). So I’ve finally written my own instructions, and here they are.

Disclaimer

This is a somewhat advanced procedure.  Try it at your own risk.  I will not be responsible if this kills your computer, eats your family pictures for seven generations, or causes the heat death of the universe… or any other bad thing, big or small.  This is the procedure I used yesterday, and as far as I know it’s good, but follow it at your own risk.

Introduction

First, it’s important that the partition structure of the boot drive be “normal,” that is, the way Windows 10 would create it. The instructions below won’t work right if the partitions are in a different order. Unfortunately, many system builders (including my distributor) use a non-standard partition layout.

So for me, at least, the first thing to do is to erase the hard drives with zeros (I use a Linux boot flash drive for this) and then reinstall Windows 10 on the primary drive. This task will not be described here, as it’s a very basic procedure.

Assuming we are starting with the first hard drive having a more or less default Windows installation (on a GUID formatted drive), and the second being entirely blank, here’s how we do it:

Duplicate the Recovery Partition:

Open an administrative command prompt window, then run the diskpart command. We need the information about the Recovery Partition, so execute these commands:

1
2
3
select disk 0
select partition 1
detail partition

You should get something like this:

1
2
3
4
5
6
Partition 1
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : No
Required: Yes
Attrib  : 0X8000000000000001
Offset in Bytes: 1048576

Volume ### Ltr Label Fs Type Size Status Info
———- — ———– —– ———- ——- ——— ——–
* Volume 4 Recovery NTFS Partition 529 MB Healthy Hidden

Take careful note of the Type ID (i.e. Type, above) as well as its size.

Now make sure the second drive is GPT and completely empty, then create a new Recovery Partition there:

1
2
3
4
5
6
7
8
9
select disk 1
clean
convert gpt
select partition 1
delete partition override
create partition primary size=529 (or whatever size is given in the details)
format fs=ntfs quick label=Recovery
select partition 1
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac (or whatever Type ID was given in the details)

We’ll need drive letters assigned to both the original and the duplicate recovery partitions:

1
2
3
4
5
6
7
select disk 0
select partition 1
assign letter=q
select disk 1
select partition 1
assign letter=r
exit

That last command will take you out of diskpart. Now we need to use robocopy to make a duplicate of the original recovery partition:

1
robocopy.exe q:\ r:\ * /e /copyall /dcopy:t /xd "System Volume Information"

Duplicate the EFI System Partition:

Next, we need to duplicate the EFI System Partition. Back into diskpart:

1
2
select disk 0
list partition

You’ll get something like this:

1
2
3
4
5
6
Partition ###  Type              Size     Offset
-------------  ----------------  -------  -------
Partition 1    Recovery           529 MB  1024 KB
Partition 2    System              99 MB   530 MB
Partition 3    Reserved            16 MB   629 MB
Partition 4    Primary            930 GB   645 MB

Note the sizes of the System and Reserved partitions, and recreate them on the second drive:

1
2
3
4
5
select disk 1
create partition efi size=99 (or whatever the partition list indicates)
format fs=fat32 quick
assign letter=t
create partition msr size=16 (or whatever the partition list indicates)

We need the primary disk System partition to have a drive letter:

1
2
3
4
select disk 0
select partition 2
assign letter=s
exit

Now we’re out of diskpart again, off to robocopy:

1
robocopy.exe s:\ t:\ * /e /copyall /dcopy:t /xf BCD.* /xd "System Volume Information"

Mirror the Operating System Partition:

Most instructions say to close the Admin CMD window at this point, but you can honestly just ignore it; you’ll need it again later, so close it or leave it
open, does not matter.

You need to launch diskmgmt.msc now, or just go to Computer Management and select the Disk Manager section. Right-click on the primary disk and choose Convert to Dynamic Disk, then do the same for the secondary disk. Finally, right-click on the C: volume and choose Add Mirror to choose a drive for the mirror. Select Disk 1 and click the Add Mirror button.

This is the boring part. You need to wait for the mirroring to complete before moving on to duplicating the BCD boot instructions (in the next part, below).

Prepare the BCD Boot Entries

The procedures done so far have created a proper mirror of the boot drive, and a boot menu item has been added to allow you to boot from the secondary plex (drive). However, if the primary drive fails, booting from the secondary drive may fail as well. It is possible to use a boot CD and repair the boot on the secondary drive, and this is always an option, but duplicating the BCD boot information on the secondary drive should remove any need for this.

If the Admin command prompt has been closed, you’ll need to reopen it; if the system has booted, you’ll need to reassign the drive letters for the EFI partitions. To do this, run diskpart and enter the following commands:

1
2
3
4
5
6
7
select disk 0
select partition 2
assign letter=s
select disk 1
select partition 2
assign letter=t
exit

Now you’re back at the command prompt. Type the following commands:

1
2
3
s:
cd EFI\Microsoft\Boot
bcdedit /enum

That last command should give you something like this (warning, long):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=S:
path                    \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {6fb37501-3d6b-11ea-914e-85f8d8cf8c72}
displayorder            {current}
{6fb37506-3d6b-11ea-914e-85f8d8cf8c72}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
——————-
identifier {current}
device partition=C:
path \Windows\system32\winload.efi
description Windows 10
locale en-US
inherit {bootloadersettings}
recoverysequence {6fb37503-3d6b-11ea-914e-85f8d8cf8c72}
displaymessageoverride Recovery
recoveryenabled Yes
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \Windows
resumeobject {6fb37501-3d6b-11ea-914e-85f8d8cf8c72}
nx OptIn
bootmenupolicy Standard

Windows Boot Loader
——————-
identifier {6fb37506-3d6b-11ea-914e-85f8d8cf8c72}
device partition=C:
path \Windows\system32\winload.efi
description Windows 10 – secondary plex
locale en-US
inherit {bootloadersettings}
recoverysequence {6fb37503-3d6b-11ea-914e-85f8d8cf8c72}
displaymessageoverride Recovery
recoveryenabled Yes
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \Windows
resumeobject {6fb37501-3d6b-11ea-914e-85f8d8cf8c72}
nx OptIn
bootmenupolicy Standard

The boot loader entry entitled “Windows 10 – secondary plex” was added when the C: drive was mirrored. Now we clone the working Windows Boot Manager:

1
bcdedit /copy {bootmgr} /d "Windows Boot Manager Cloned"

You’ll get a reply like this:

1
The entry was successfully copied to {6fb37507-3d6b-11ea-914e-85f8d8cf8c72}.

The GUID at the end will vary, of course. Use it in the following command:

1
bcdedit /set {GUID} device partition=t:

Now we need to export the BCD store to copy it to the T: drive:

1
bcdedit /export T:\EFI\Microsoft\Boot\BCD

This should complete the operation. Rebooting the system to remove any excess drive letter assignments is recommended.

Windows Update “Awaiting Restart” Fix

So say you have a Windows Update that isn’t finishing.  In the Windows Update Settings screen, beneath the update it says “Status: Awaiting Restart,” but you restart, and when you look it still says that.  Here’s the fix, collected from several different answers I found online:

First, you need an elevated command prompt.  Click start and type CMD in the search, but don’t press Enter; instead, right-click on the Command Prompt item that search should have found and choose Run as Administrator.  Say Yes to the prompt about making changes to your system… that’s exactly what we’re doing here.

Now you have a command window.  Enter the following commands one after another:

SC config wuauserv start= auto
SC config bits start= auto
SC config cryptsvc start= auto
SC config trustedinstaller start= auto

Now, restart your computer.  During the restart you should see the update actually running.

 

Killing GWX (as in, I really don’t want Windows 10)

FOR THE NON-TECHNICAL:

So you’re happy with your Windows 7, 8, or 8.1 computer, and you just don’t want Windows 10 to install on it?  Got your fix right here.  Right-click the following link and choose Save Target As or Save Link As, then save it somewhere you can find it (in the Downloads folder or on your Desktop are good choices):

http://newcenturycomputers.net/user/KillGWX.reg

Now find the file where you downloaded it, and double-click it.  You will be asked up to four different times if you are really sure you want to run it… each question will be different, but in each case you need to go forward.  The last dialog will tell you the process is a success, and provide an OK button.

After you click the final OK, restart your computer in the normal way.  This should be enough to prevent Windows 10 from installing on your computer.  Note if you have msn.com as your home page, you will still see ads telling you that you should upgrade… just ignore them, or change to a different home page if it gets really annoying.

ORIGINAL POST:

I don’t use Windows myself, but I do sell and support computers that must run Windows.  Most of my customers are very fond of Windows 7, and even though its days are numbered they still want to keep using it.

When Microsoft pushed out the GWX update (KB 3035583, if you care), things became… annoying… for those people I just mentioned.  There’s no apparent way to turn that nonsense off.  The only solution I found in the early days was to kill the program, then change the privileges on the folder C:\Windows\System32\GWX and delete it.  So I went around doing just that.

And Microsoft re-issued the update, and they all came back.  Gah.

I searched again, and after extensive revisions of my Google search parameters I finally found a page on Charles Allen’s blog where he explained the secret.  But he gave the steps in the manual mode, and I’m too lazy for that.

So here’s a registry patch to do the job.

http://newcenturycomputers.net/user/KillGWX.reg

Mostly this is here so I can find it later… as usual for Notebook entries.

UPDATE:  In addition to the anti-GWX registry entry, I’ve become aware of the group policy option entitled “Turn off the Upgrade to the latest version of Windows.”  Even with GWX disabled by the aforementioned option, Windows Update may still offer Windows 10 as a “regular” Windows update (especially now that it is “Recommended” instead of merely “Optional”).  This new policy option just sets a registry entry, of course, and I’ve added that registry entry to my KillGWX.reg and uploaded it to the location above.

I found this information here:

Turn off the Upgrade to the latest version of Windows GPO

It’s been there for months, but it’s darned hard to find with an ordinary Google search; when I tried to find it again to post it here, I kept finding ways to block ALL Windows updates (not a good idea) rather than the specific upgrade block I was wanting.  So as usual, I’m posting it here so I can find it again.