53

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)
4
  • See this answer - the Recovery partition houses WinRE [Windows Recovery]. You need a WinRE partition, which only needs to be 650MB, for a variety of reasons, with a WinRE USB simply being inefficient and massively inconvenient; to understand why, see Microsoft Docs.
    – JW0914
    Commented May 24, 2020 at 12:09
  • Please refer to https://superuser.com/questions/1453790/how-to-move-the-recovery-partition-on-windows-10/1596291#1596291 This answer provides excellent directions Thanks, Commented Jun 30, 2021 at 17:45
  • Third-party EaseUS Partition Master easeus.com/partition-master/… can be used to extend the partition Commented Jan 20 at 7:28
  • Moving partitions around for a normal WinRE partition that doesn't contain a restore WIM/SWM/ESD is inefficient and it's far simpler and less time consuming to disable WinRE, delete the WinRE partition, Resize C:, re-create the WinRE partition, and re-enable WinRE. To disable, recreate, and re-enable WinRE, see this answer
    – JW0914
    Commented Jun 7 at 15:49

4 Answers 4

29

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

8
  • 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
    Commented 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
    Commented Sep 2, 2018 at 12:42
  • 2
    @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
    Commented 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
    Commented Jan 10, 2021 at 2:37
  • 1
    diskmgnt.msc was unable to delete my recovery partition, so I had to use diskpart. YMMV.
    – jbg
    Commented Jan 10, 2021 at 7:12
14

You don't need to even reboot for this :-)

Once you disabled the recovery partition, you can just launch diskpart and complete the changes.

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.

5. When your system never had a valid RE image

There's also an edge case if there's no valid copy of the recovery image on disk - there still can be a partition, but it might be invalid. I've also seen cases with 3 rescue partitions.

5.1 Mounting a WIM image and extracting the WinRE boot image

In such cases, you can proceed - but: you might need to re-genererate the RE image. This works along the lines what is described here: https://www.elevenforum.com/t/deleted-windows-recovery-partition-how-to-make-a-new-one.11534/

5.2 Working with readonly (DVD) media

Just note that you might need to change some flags for dism to work with a readonly image. i.e. I needed dism /mount-wim [...] /readonly and dism /unmount-wim [...] /discard when working from a dvd image, and then you also need to re-locate the RE path to your actual partition. just check it with /info to be sure it's in the right spot.

5.3 Don't lose the security patch!

Since MS updated the RE image in early 2024, you should also make sure that if you use a DVD source that you'll use one that is recent enough to contain a 'safe' winre.wim.

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
1

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 .