0

Note:

the disk is Formatted

as GPT and I have only one disk.

I have a Samsung laptop `300v5a` that came with windows 7, and I upgraded to windows 10 after that I deleted the Samsung recovery partition with diskpart in CMD with the following commands


          diskpart 

          list disk

          select disk 0

          list partition 

          select partition n 

          delete override 

it deleted successfully

but after that when I go extend the other partition space with this unallocated space it tells me this:

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          698 GB    22 GB        *

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    System             100 MB  1024 KB
  Partition 2    Reserved            16 MB   101 MB
  Partition 3    Primary            275 GB   117 MB
  Partition 4    Primary            399 GB   275 GB
  Partition 5    Recovery           509 MB   675 GB

DISKPART> select volume 4

Volume 4 is the selected volume.

DISKPART> extend

You may not extend OEM, ESP, or recovery partitions, or, offline volumes.
The volume you have selected may not be extended.
Please select another volume and try again.

and I can't do it with disk management either:

In disk management

  • You have to move or delete the recovery partition so the unallocated space is next to the partition you want to extend, if deleted it’s trivial to recreate the recovery partition. I forget what the stripped lines indicate… – Ramhound Aug 27 '22 at 23:32
  • If you are not interested in expanding the system disk (C) then I am confused by your question. You don't have contiguous space. You need to delete the Recovery Partition, expand the disk, then recreate the recovery partition if you want it. – Ramhound Aug 28 '22 at 10:25

1 Answers1

1

You need contiguous space for extending partition within windows. I would:

  1. Open an elevated command prompt and run the command reagentc /info

Note down the path for the recovery image ('Windows RE location'). You should see something similar to:

Windows Recovery Environment (Windows RE) and system reset configuration


Windows RE status:         Enabled
Windows RE location:       \\?\GLOBALROOT\device\harddisk0\partitionX\Recovery\WindowsRE
Boot Configuration Data (BCD) identifier: xxxxxx-yyyy-zzzz-1234-567890
Recovery image location:
Recovery image index:      0
Custom image location:
Custom image index:        0
REAGENTC.EXE: Operation Successful.
  1. Whenever I move partitions around, I generally use an Ubuntu USB installer and boot in the live mode (which is default mode if you don't touch anything) and from there, use GParted to move the recovery partition to the end of the drive. You simply right-click the partition and select move, then use the box to drag it to the end. Confirm the change, apply the change (green tick) and then reboot.

  2. Windows will have a disk check scheduled on boot: let it run!

  3. Again from an elevated command prompt, run the command reagentc /info to determine if WinRE has been disabled. If it has remained enabled, you are good to go. If it has been disabled, point reagentc to the WinRE location you noted in step 1 by using the command reagentc /setreimage /path <path to directory from step 1> ensuring the partition number in the path is correct. hint: check Disk Management where it handily mentions the partition number. In your screenshot, it shows partition 5 is the recovery. Yours would be, assuming partition numbers are correct, reagentc /setreimage /path \\?\GLOBALROOT\device\harddisk0\partition5\Recovery\WindowsRE. Once the WinRE path is set, you can then issue reagentc /enable. You should see the result returned: REAGENTC.EXE: Operation Successful.

  4. Now recovery has been moved to the end and it is in working state, finally extend the contiguous free space with (New Volume) D: from within windows like you originally were going to.

Bob L.
  • 26
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 28 '22 at 09:36