49

My partitions on my primary disk look like this:

enter image description here

I would like to expand C: with the Unallocated space but the 946 MB Recovery partition is in the way.

  1. Is there a way to swap the Recovery partition with the Unallocated space (= move it to the end of the disk), to have contiguous WINDOWS and Unallocated space?
  2. what would be the consequences of removing that 946 MB Recovery partition? There are numerous articles mentioning that it exists and how to remove it (with diskpart), but not what it actually stores and whether it is primordial to have it (as opposed to having a Windows 10 media disk one can boot from and go into repair mode)
3

4 Answers 4

27

You can't "swap" them but you can move the recovery partition easily. Any 3rd party partitioning software can do that, like MiniTool Partition Wizard, AOMEI Partition Assistant, EaseUS Partition Master, Macrorit Partition Expert...

So after installing any of them you need to

  • Right click on the recovery partition > resize/move and move it all the way to the right
  • Right click on the Windows partition > resize/move and resize it to fill the newly unallocated space on the right of it

Or you can remove the recovery partition completely. There would be no problem since Windows 10 already has built-in refresh and reset feature to do factory reset. You can also create an image of the recovery partition and store it somewhere before removing the partition

However it is possible to create a partition that spans across various spaces with dynamic disk, which is the analog of Linux's LVM. Just convert the disk to dynamic and extend the partition to any available space

7
  • Thanks. I did not mention that I was (rather) looking for native solutions (not that 3rd party are not OK - I use parted on Linux - but was hoping that a built-in solution would be integrated). I will do that then if there are not other ideas.
    – WoJ
    Sep 2, 2018 at 12:31
  • there's no native solution unless you're willing to use dynamic disks. Windows diskmgmt.msc is very limited in partitioning capability
    – phuclv
    Sep 2, 2018 at 12:42
  • 1
    @woj you can use GParted on a Windows system too. Just download the gparted live image and boot it from a USB stick. Move the recovery partition to the back. Reboot into Windows and extend C:. Please note: before doing ANY repartitioning on a Windows system you should disable the fast-restart feature as that may interfere with 3rd party partitioning tools.
    – Tonny
    Sep 2, 2018 at 15:12
  • 7
    If you wish to delete the recovery partition, you can do this without any third-party software. Open command prompt and then run diskpart, and then (for example): list disk; select disk 0; list partition; (carefully verify which partition is the recovery partition) select partition 4; delete partition override (override is needed as the recovery partition is protected).
    – jbg
    Jan 10, 2021 at 2:37
  • 1
    diskmgnt.msc was unable to delete my recovery partition, so I had to use diskpart. YMMV.
    – jbg
    Jan 10, 2021 at 7:12
11

you don't need to even reboot for this.

after you disable the recovery partition, you can launch diskpart and do the steps from there:

you'll be able to

  1. delete the recovery parttion
  2. extend your C: partition to a desired size
  3. recreate the recovery partition with the correct type
  4. format the recovery partition

1. identify and delete recovery partition

so, first you need to disable it, that's the already known command:

reagentc /disable

with that done, launch diskpart

where you pick your OS drive by ID and the recovery partition by ID. And then you delete it. This is possible using the override keyword asking Windows to not consider that protected partition a protected protected partition for that short moment where you delete it.

list disk  #< identify OS drive here, example below is 'disk 0'
sel disk 0
list part  #< identify recovery partitition here, example below is 'part 3'
sel part 3
delete part override

2. resize your C: partition

where you select your OS partition by ID and increase its size - while leaving space for the recovery partition's recreation. The partition resize automatically triggers the filesystem resize.

list part #< OS partition, C:\ Drive letter is part 2 in example below
sel part 2
extend size=112000

3. create recovery partition

where you re-create the recovery partition for later use. if you (reader, not OP) has a UEFI system this command will DIFFER. See Microsoft KB5028997 for details about that.

3.1 Basic Disks

create partition primary size=1000 id=27

3.2 GPT Disks

On GPT disks, you'll get an error about incorrect syntax for this. There use:

create partition primary size=1000 id=de94bba4-06d1-4d40-a16a-bfd50179d6ac

If this worked, the new partition is auto-selected and can be formatted. If it didn't work, then please stop here and debug.

format quick fs=ntfs label=”Windows RE tools”
exit

Note:

  1. You can then use the partition ID from @AdamKalisz's comment below!
  2. The newly created partition is automatically selected by diskpart.
  3. You want a size of 1GB for the partition to avoid errors from windows Upgrade (that's the 0x80070643 error code). It can hit the error condition when updating the recovery code (done via windows update).

4. enable recovery partition

now you can re-enable the new recovery partition

reagentc /enable

That's it. I had to do this a few days ago, and there's really no need to have a downtime for this. You might still need to reboot for the update, but at least it'll be at a time of your chosing.

If the update error doesn't go away, you might want to investigate windows update client issues.

1
6

Moving the Windows Recovery partition to the end of the disk is (ironically) much easier with Linux. So if you already can boot a live Linux CD (or USB or over PXE), it probably has gparted which you can use to move the partition.

So :

  • In Windows, disable the current recovery partition. As admin in Powershell or cmd, run :
    reagentc /disable
  • In Linux, use gparted to
    • move the recovery partition to the end of the disk
    • resize the system partition
  • Back in Windows, re-enable the recovery partition:
    reagentc /enable
0

HirensBootCd combined with Rufus, Will help you create a boot USB that will give you the tools to do this.

I'd recommend backing up your primary partition before you start.

MacroIT Partition Tool, included on HirensBootCD can easily move the recovery partition to the end of the drive, HOWEVER resizing the primary should be done using windows disk management, as MacroIT Partition Tool leaves the filesystem as RAW (after resize operations).

I recently made this mistake, and whilst it was RAW windows allowed it to boot ONCE into the drive, letting me think that it had worked, then trying it once more made windows 10 fail in it's bluescreen with an NTFS Filesystem failure. (Luckily I took a backup)

If I had used windows disk management to do the resize, I believe it would have maintained the file system integrity.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .