I tried to install fresh centos and copy only 10G of 12GB ssd. When image is trasfered to PC and run sgdisk -e input/centos.img and go this:
sgdisk -e input/centos.img
Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! Error 25 reading partition table for CRC check!
Warning! One or more CRCs don't match. You should repair the disk!
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Warning! Secondary partition table overlaps the last partition by
213960737 blocks!
You will need to delete this partition or resize it in another utility.
Problem: partition 2 is too big for the disk.
Aborting write operation!
Aborting write of new partition table.
I’m using Ubuntu 16.04. Could it be that sgdisk is old to fix such errors? Thanks.