(Solved. See below)

After having cloned a SSD to a larger one, I want to move the Recovery partition at the end of the clone, and then expand the Windows partition to benefit from the additional capacity.

For this, I am using KDE Partition Manager, version 20.12.2, that comes with the Q4OS Gemini Plasma distro, booted as a live distro from a flash drive. (Q4OS can be tested in live mode, installing it being optional.).

KDE Partition Manager perfectly displays the partitions, but detects the /dev/nvme0n1 disk as a 500GB storage, i.e. the size of the source SSD, ignoring the additional capacity available.

I read that this is caused by the secondary/backup GPT table being still located at its original location, in the middle of the disk, after the cloning, and that this could be fixed by running gdisk, which would detect the secondary partition at the wrong place and suggest to correct this by moving it at the end of the drive.

So, I ran gdisk /dev/nvme0n1, but gdisk (version 1.0.6) did not output any message relatively to the secondary GPT.

Instead, gdisk's ouput is:

The protective MBR's 0xEE partition is oversized! Auto-repairing.
        Partition table scan:
          MBR: protective
          BSD: not present
          APM: not present
          GPT: present

Found valid GPT with protective MBR; using GPT.

The message comes back if calling gdisk again, suggesting that the problem has not been fixed.

How can I move the secondary GPT table to the end of the disk using gdisk (or other Linux tool) ?

N.B. After cloning, I had to run bcdboot c:\windows in Windows console, to make Windows bootable again.

  • Found a solution that works like a charm. After calling gdisk, hit ? for a list of commands and then hit w . See the answer to my own post for the detailed procedure.
    – OuzoPower
    Commented Apr 22, 2023 at 11:04
  • The recovery partition could be moved at the end of the disk with KDE Partition Manager and the partition increased. However, Windows still does not see the new space available and still shows the C:\ volume as 500GB.
    – OuzoPower
    Commented Apr 22, 2023 at 11:14
  • Solved! For the new capacity to be detected by Windows, you will then have to expand the volume using diskpart called from the console. (This can be run from a live installer of Windows in case you don't have administrator rights.) The procedure is given here by Areeb Soo Yasir. If your system is corrupt, when perform a startup repair using Windows tools. Windows will check the filesystem, even if it was wrongly detected by RAW instead of NTFS. Works like a charm!
    – OuzoPower
    Commented Apr 22, 2023 at 12:04

1 Answer 1


I found the solution to move the secondary GPT table to the end of the drive after cloning to a larger drive. Here, the example for a NVMe SSD.

  1. run gdisk /dev/nvmen0
    (or gdisk /dev/sda for a SATA drive)
  2. Hit the ? key to display the list of commands.
  1. Hit the w key (write table to disk and exit)

gdisk will display the following message: Warning! Secondary header is placed too early on the disk! Do you want to correct this problem? (Y/N)

Hit the Y key, then the Enter key to confirm. Confirm again that you accept to write the new GPT tables and here we are!

  • Windows users: for the rest of the procedure, follow my comments in the original post.
    – OuzoPower
    Commented Apr 22, 2023 at 12:06

You must log in to answer this question.

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