(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.
gdisk
, hit?
for a list of commands and then hitw
. See the answer to my own post for the detailed procedure.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!