135

I need to convert the disk containing my operating system to a dynamic disk (from a basic disk). Unfortunately there is no room on the disk to convert the drive from basic to dynamic.

Microsoft documents the problem, and notes the solution is to delete the last partition on the disk:

Not Enough Space Available to Upgrade to a Dynamic Disk

RESOLUTION

Start Disk Manager, right-click the last partition, and then click Delete Partition.

Note: I don't need a reason to ask my question. But if anyone would refuse to answer the question unless i gave a justification, there one is.

enter image description here

It's important to note that:

  • this recovery partition didn't come from an OEM
  • the recovery partition was created when Windows 7 Retail was cleanly installed on the PC

Bonus Question: Why did Windows 7 create a "Recovery Partition"?
Bonus Question: How do you create, or re-create, a "Recovery Partition" on a hard drive that does not have one?

Fortunately i don't have to back anything up from this Recovery Partition, since Windows says it is empty:

enter image description here

Except the directions on Microsoft support don't work - there is no option to delete the recovery partition:

enter image description here

Microsoft says you can use the Create Recovery Drive to delete a recovery partition

From Create a USB recovery drive, which is used to create a USB recovery drive, there is supposed to be an option at the end of the wizard to delete the recovery partition on the hard drive:

When the process is done, do one of the following:

  • If you want to keep the recovery partition on your PC, tap or click Finish.

If you want to remove the recovery partition from your PC and free up disk space, tap or click Delete the recovery partition. Then tap or click Delete. This will free up the disk space used to store your recovery image. When the removal is done, tap or click Finish.

Note

Some PCs don't offer the option to remove a recovery partition. If you experience this, there isn't a recovery partition on your PC that's using additional disc space.

When i complete the wizard, there isn't offered the option to remove a recovery partition:

enter image description here

Which apparently means that my machine doesn't have a Recovery Partition, yet i refer you to:

enter image description here

Which causes the questions:

  • do i have a Recovery Partition?
  • Why does Windows say that i do?
  • Why does Windows say that i don't?
  • Why did Windows create the Recovery Parition in the first place?
  • Why is the Recovery Partition empty?
  • Why does Windows not let a user delete a Recovery Partition?

The problem i'm actually trying to solve is how do i convert the disk to dynamic (without reinstalling Windows of course).

DiskPart

I tried using DiskPart from an elevated command prompt:

>diskpart
DISKPART> select disk 0
DISKPART> select partition 3
DISKPART> delete partition

Virtual Disk Service error:
Cannot delete a protected partition without the force protected parameter set.
6
  • The partition contains WinRE. This is the default behavior of the Windows installer. You can also use a different partition tool. The process of converting Basic to Dynamic, stuff can go wrong, so backup your data.
    – Ramhound
    Jan 9, 2016 at 1:02
  • 1
    Do you realize that that that disk is only 450 MB? You would have 111.60 GB instead of 111.25 GB for your C: drive. Hardly worth any effort.
    – Aganju
    Jan 9, 2016 at 1:29
  • 1
    And the reason people ask for your reason is not to make you justify yourself, but because understanding your reasons often helps to find another approach to a solution for your problem. So don't take it as affront, but as an indication that people are willing to fully understand your issue.
    – Aganju
    Jan 9, 2016 at 1:32
  • @Aganju Unfortunately i need the extra 500 kB.
    – Ian Boyd
    Jan 9, 2016 at 3:10
  • I thought you waned 450 MB not 500 KB?
    – Ramhound
    Jan 9, 2016 at 4:50

4 Answers 4

8

Disable Recovery Agent Environment

First, you should check if the recovery agent is using this drive as the recovery environment. You can check this by running reagentc /info from an Administrator Command Prompt:

C:\Windows\System32>reagentc /info
Windows Recovery Environment (Windows RE) and system reset configuration
Information:

    Windows RE status:         Enabled
    Windows RE location:       \\?\GLOBALROOT\device\harddisk0\partition4\Recovery\WindowsRE
    Boot Configuration Data (BCD) identifier: 815b3db0-d49c-11ed-be7f-00155d019403
    Recovery image location:
    Recovery image index:      0
    Custom image location:
    Custom image index:        0

REAGENTC.EXE: Operation Successful.

The above output indicates that Recovery Agent is configured to use that partition. In the above output, note that harddisk0 (indicating disk 0) and partition4 (indicating partition 4). This should correlate to information you will use in the later diskpart commands. To disable Recovery Agent on this partition, run reagentc /disable in an Administrator Command Prompt:

C:\Windows\System32>reagentc /disable
REAGENTC.EXE: Operation Successful.

Now verify that the partition is no longer in use by Recovery Agent by again running reagentc /info in an Administrator Command Prompt:

C:\Windows\System32>reagentc /info
Windows Recovery Environment (Windows RE) and system reset configuration
Information:

    Windows RE status:         Disabled
    Windows RE location:
    Boot Configuration Data (BCD) identifier: 00000000-0000-0000-0000-000000000000
    Recovery image location:
    Recovery image index:      0
    Custom image location:
    Custom image index:        0

REAGENTC.EXE: Operation Successful.

The above output indicates that the Recovery Agent is disabled. Notice specifically that there is no indication of a partition being used. Now the Recovery partition no longer serves a purpose, so it can be removed using diskpart. Launch diskpart in an Administrator Command Prompt:

Force Delete Partition With DiskPart

C:\Windows\System32>diskpart

Microsoft DiskPart version 10.0.22621.1

Copyright (C) Microsoft Corporation.
On computer: DCX-VPN-ANYDESK

List the disks in diskpart. Look for the disk number referred to by the earlier reagentc /info command. In our example, this was disk 0. Use the list disk command:

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online           64 GB  1024 KB        *

Use select disk «disk number» to choose the appropriate disk. In our example, «disk number» is 0.

DISKPART> select disk 0

Disk 0 is now the selected disk.

Now seek out the partition we want to remove. This should be the partition shown in the first reagentc /info command. In our example, it was partition 4. Use the list partition command to list the partitions:

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    System             100 MB  1024 KB
  Partition 2    Reserved            16 MB   101 MB
  Partition 3    Primary             63 GB   117 MB
  Partition 4    Recovery           664 MB    63 GB

From the above output, it should be clear which partition is the recovery partition. The partition number should match the output from reagentc /info command earlier and it should show in the listing as a Recovery partition. In this example, we were expecting partition 4 and our listing showed that partition 4 is indeed a Recovery partition. Select this partition using select partition «partition number». In our example, «partition number» is 4:

DISKPART> select partition 4

Partition 4 is now the selected partition.

Now you can delete that partition. Note that the following command uses the override parameter. Be careful and double check what you are doing. The override parameter means we are performing an operation which DiskPart thinks is dangerous. Recall that the partition we are removing was originally used for the Recovery Agent environment which we disabled above. Recheck that the partition we selected is indeed the partition you wanted to remove. Ensure that if you have any data on your PC, you either have accepted that you might experience data loss or that you have backups and have verified that you can get data out of your backups. If you are certain, proceed with delete partition override:

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

You can now list the partitions to show the results using list partition:

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    System             100 MB  1024 KB
  Partition 2    Reserved            16 MB   101 MB
  Partition 3    Primary             63 GB   117 MB

We can see above that only the Recover partition was removed and the partition with data that we care about, partition 3, still exists. Proceed by exiting diskpart using the exit command:

DISKPART> exit

Leaving DiskPart...

C:\Windows\System32>

Reenable Recovery Agent Environment

I recommend that you turn recovery back on at this point. This will set up the Recovery Agent to use an image on your C: partition. If you need to expand your partition further again, this is more convenient than having a separate partition. However, while more convenient, using the C: partition does have its risks. Run reagentc /enable at an Administrator Command Prompt:

C:\Windows\System32>reagentc /enable
REAGENTC.EXE: Operation Successful.

Now check reagentc /info to see where it put the recovery environment:

C:\Windows\System32>reagentc /info
Windows Recovery Environment (Windows RE) and system reset configuration
Information:

    Windows RE status:         Enabled
    Windows RE location:       \\?\GLOBALROOT\device\harddisk0\partition3\Recovery\WindowsRE
    Boot Configuration Data (BCD) identifier: 815b3db2-d49c-11ed-be7f-00155d019403
    Recovery image location:
    Recovery image index:      0
    Custom image location:
    Custom image index:        0

REAGENTC.EXE: Operation Successful.

You can see from the above output that a path within partition 3 which, in this example, is the C: partition was used.

Expand Your Primary Partition

You may now use the graphical disk management interface to expand your C: partition freely.

230

There is plenty of space on the disk. You are getting this error for a different reason. If your machine is anything but a desktop then you would get the error you have.

https://technet.microsoft.com/library/354e5163-f388-4354-984c-ea4e4206694c

You aren't able to delete the recovery partition because it EFI protected. You should be able to force by using the override command.

https://technet.microsoft.com/en-us/library/cc766465(v=ws.10).aspx

I would try using diskpart (from an elevated command prompt) to delete the partition.

DISKPART> list disk
DISKPART> select disk 4

Disk 4 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            223 GB  1024 KB
  Partition 3    Recovery           450 MB   223 GB
  
DISKPART> select partition 3

Partition 3 is now the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            223 GB  1024 KB
* Partition 3    Recovery           450 MB   223 GB
  
DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary            223 GB  1024 KB

After that you should be able to convert to dynamic disk.

Usually I re-purpose drives so I don't worry about data loss, but back up your data and use a desktop.

10
  • 1
    I used diskpart with the override command to force deletion of the Recovery Partition. I was then able to convert the disk to dynamic, and mirror it to another SSD as i desired. On the down-side, Windows blue-screened on the next boot because that partition was gone. Moral of the story: don't delete the recovery partition. Just wipe your disk and start over with a fresh install.
    – Ian Boyd
    Jan 11, 2016 at 20:49
  • 4
    Used diskpart to remove the recovery partition, but didn't experience boot issues like @IanBoyd Oct 8, 2016 at 13:28
  • 8
    Worked great on a drive that used to be a boot drive, but now is an extra drive.
    – BeaverProj
    Feb 2, 2017 at 1:58
  • 2
    Worked like a charm, thanks for sharing man! And especial thanks to @JeffAtwood for including the actual answer here on SU for us! Jun 25, 2017 at 5:03
  • 1
    @AnmolDeep diskpart can also do that too. techtarget.com/searchwindowsserver/tip/…
    – Kenttleton
    Feb 28, 2023 at 20:54
28

Option 1: Deleting a recovery partition using diskpart:

  1. Start menu, search for diskpart, right click, select open file location, right click on diskpart.exe and select Run as administrator.
  2. type list disk and press Enter, then select disk X (X is your disk containing your recovery drive ) and press Enter, then list partition, then select partition X (X is your recovery partition) and then delete partition override.
  3. If you get Delete is not allowed on the current boot, system, pagefile, crashdump or hibernation volume. Go to option 2

Option 2: Using a third party partition manager

Try something like EaseUS free partition manager. If the option to delete partition isn't in the context menu, go to option 3.

Option 3: using Disk Manager to shrink the recovery partition and merge the extra space with the main partition

This doesn't directly answer the question but provide a workaround to recover the space used by the recovery partition. Mine was taking 20GB (only 9GB used) and I could shrink it to 415MB.

  1. Go to Create and format hard drive partition(aka Disk Manager) and assigned a drive letter to the Recovery partition.
  2. In My Computer, open the recovery drive (if it's empty, go in Folder Options, and enable the option to show the hidden files and uncheck "Hide protected operating system..."). Delete the Dell folder (about 8.7GB).
  3. Go back Disk Manager, shrink the recovery partition to the minimum possible and increased the main OS partition over the released disk space and applied all changes.

(from mazyarjr)

If you can't shrink to most of the recovery size (I could only shrink to about 2GB even if there more than 19GB free), you will have to do it the hard way.

Option 4: using Ubuntu to shrink the recovery partition and merge the extra space with the main partition This option is much longer than the previous one. You need:

Steps:

  1. In Ubuntu, open Gparted and then shrink the recovery drive and merge the extra space with the main partition. This step took about 3h.
  2. Reboot you computer, start windows: you will most likely have the error 0xc00000f or the error 0xc0000225.
  3. Restart you computer from the windows repair disk (or recovery drive): open Boot Options and then choose CD/DVD or USB, wait for it to load and then choose your keyboard language.
  4. You can try the option repair computer (I think it's in Troubleshooting and then Advanced options) but it didn't solve the problem for me. Instead open the command prompt and type this.

Don't forget to press Enter between each line:

bootrec /fixboot
bootrec /fixmbr
bootrec /rebuildbcd

If no windows installation is found do this (see warning below):

bcdedit /export C:\BCD_Backup
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
bootrec /RebuildBcd

WARNING: The first time I reboot my computer (at step3), my recovery disk was assigned to the letter C and my windows disk to the letter F (you can know that if you enter diskpart in the command prompt from the repair disk). I didn't proceed with the last code I gave and instead I tried the fix #4 from here). I ended up with the An operating system wasn't found try disconnecting any drives that don't contain an operating system screen. I wasn't even able to get to the Grub to start Ubuntu so I started Ubuntu from the bootable USB. I use Ubuntu Boot Repair following all the indications it gave me. I got many error related to FlexNet and Wubi (I sort of ignored then, at this point, I was pretty sure I would have to use the windows system image). But when I restarted I was able to get to the Grub and to choose windows 10. I still got the 0xc0000225 error but this time, my windows disk had the letter C. I then entered the last code above and finally I could start Windows 10. Everything was normal in my windows user account.

If you had a dual boot, to restore Ubuntu Grub, follow this

Option 5: Deleting a recovery partition by reinstalling Windows: Make a backup of your files, use a bootable ubuntu usb drive to format and merge all the partition and then reinstall Windows. Windows creates a system files partition but that's only 500MB (nothing compared to the 20GB it used before).

Downside (that can be related or not to the option 4):

  • I can't anymore create a system repair disk as "the files needed are not found" (I created one without problem just before shrinking the recovery drive). I need to have a Window. ISO from which the necessary files are loaded.
  • I have lost all my restore points.
  • I don't know if there is a link but I tried to restore a restore point 2 months after deleting the Recovery Partition. I couldn't some files were missing. I had others bugs so I ended up reinstalling Windows 10 from scratch (cf option 5). I could get rid of the recovery partition. During the install,

Because, I upgraded from Window 7 to Windows 10 just a couple of days before doing option 4, after doing option 4, the boot displayed 2 versions of Windows: Windows 10 and 7. To remove Windows 7 from the boot menu, do this.

1
-1

The easy way is to use a 3rd party disc tool I did it with the free version of MiniTool Partition Wizard (if you use it once you do select what you want done it looks like it is done in the interface, but you need to click apply - near top left of window - I suppose this is a fail safe or chance for a double check incase you do it to the wrong disc) There may be better tools, all I know is this one worked for me.

You must log in to answer this question.

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