Right, turns out I was very close.
After creating my extra space at the end and formatting/naming it, the only job remaining is to just set the ID. REAgentC will automatically detect it when enabling! That's what I missed.
Here are full steps with explanations and example output. Skip down to part 8 if you already have freed up some space (At least 700MB-ish).
- Open an elevated cmd.exe prompt and type...
diskpart
list disk
Outputs:
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 1863 GB 2048 KB * *
Disk 1 Online 3726 GB 0 B *
In my case, my main drive is Disk 1, so I used:
select disk 1
list partition
Outputs:
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Reserved 16 MB 1024 KB
Partition 2 System 260 MB 3723 GB
Partition 3 Reserved 1000 MB 3724 GB
Partition 4 Primary 3723 GB 17 MB
You will inevitably have different partitions in a different order and different sizes, doesn't matter. You need to identify the largest sized one. this will probably be your main drive (e.g. C:\) that you store things on, so check you have at least a few GB free on your main drive and free some if you don't, or the next step may not work. In this example we will pick number 4, don't blindly copy this.
select partition 4
shrink desired=700
This will reduce the size of the partition by 700MB, which seems to be a recommended size as of this writing. You can check with list partition
that there should be 700MB unallocated.
create partition primary
Outputs:
DiskPart succeeded in creating the specified partition
format quick fs=ntfs label="winRE"
Outputs:
DiskPart successfully formatted the volume
We've filled the empty space (it will use all available space automatically) and formatted it how it needs to be, and given it a nice name. Note when you create a new partition it will automatically select the new partition, so we skipped doing select partition ...
again.
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
This is a magic ID that tells it that this is a recovery partition. if you now do list partition
then you will see the "Type" of our new partition is set to "Recovery"!
gpt attributes=0x8000000000000001
This is two attributes combined, 0x8000000000000000
"specifies that the partition won't receive a drive letter by default when the disk is moved to another computer, or when the disk is seen for the first time by a computer." Meanwhile 0x0000000000000001
"specifies that the partition is required by the computer to function properly." (source on attributes)
We're done with DiskPart! Type exit
.
reagentc /disable
reagentc /enable
This will turn off and on again the recovery. If you didn't already have it enabled then the first command will tell you, but it's worth checking. REAgentC will automatically detect our new Recovery partition when we /enable
it and will install the recovery partition in there, instead of on your C:\ drive. Let's double check its in the right place:
reagentc /info
Outputs (something like):
Windows Recovery Environment (Windows RE) and system reset configuration
Information:
Windows RE status: Enabled
Windows RE location: \\?\GLOBALROOT\device\harddisk1\partition5\Recovery\WindowsRE
Boot Configuration Data (BCD) identifier: b52d9340-ac37-11ee-b25e-38d57a9b2c2e
Recovery image location:
Recovery image index: 0
Custom image location:
Custom image index: 0
REAGENTC.EXE: Operation Successful.
We're looking to make sure that in the long bit of text near the top, we see harddisk1
(or whatever disk number you picked earlier, usually 0 for most people), and then partition5
(the number of our new partition)