Skip to main content

Recovery partition

Deleting the recovery partition

  1. Run the command reagentc /disable to disable the recovery partition. Once disabled, launch diskpart from an elevated command line.
  2. List the disks attached to the system using list disk. Select the relevant disk using the disk number, e.g. select disk 0
  3. List the partitions on the disk using list part. Select the relevant partition using the partition number, e.g. select part 1
  4. Delete the partition using the command delete part override.

Creating a recovery partition

  1. Launch diskpart from an elevated command line.
  2. List the disks attached to the system using list disk. Take note of the GPT status of the relevant disk and then select it using the disk number, e.g. select disk 0.
  3. For a GPT disk:
    If you want the recovery partition to fill up the remaining space on the disk, use the command create part primary Otherwise, the size and offset of the partition can be specified using the size (in megabytes) and offset from the beginning of the disk (in kilobytes) parameters respectively. If you need to specify size or offset, it may be easier to create the partition using Disk Management.
    Find the parititon of the newly created partition using list part and select the partition using the partition number, e.g. select part 1. Set the partition ID using set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac and then hide the partition and mark is as a recovery partition usinggpt attributes=0x8000000000000001.

    For an MBR disk:
    If you want the recovery partition to fill up the remaining space on the disk, use the command create part primary Otherwise, the size and offset of the partition can be specified using the size (in megabytes) and offset from the beginning of the disk (in kilobytes) parameters respectively. If you need to specify size or offset, it may be easier to create the partition using Disk Management.Find the parititon of the newly created partition using list part and select the partition using the partition number, e.g. select part 1.
    Set the partition ID  usingset id=27.
  4. Run the command reagentc /enableto enable the recovery partition.