copy/clone GPT partition scheme from one hard disk to another

As we know, sfdisk doesn’t support gpt partition tables, instead sfdisk we can use gdisk tool.

yum install gdisk

[root@localhost ~]# sgdisk --backup=sdc.back /dev/sdc
The operation has completed successfully.

[root@localhost ~]# sgdisk --load-backup=sdc.back /dev/sde
The operation has completed successfully.

[root@localhost ~]# sgdisk -G /dev/sde

create partitions using parted command line interface

parted /dev/sda
(parted) mklabel msdos
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted) unit GB
(parted) mkpart primary ext4 0gb 35gb
(parted) mkpart primary linux-swap 35gb 37gb
(parted) mkpart primary ext4 37gb 250gb
(parted) set 1 boot on
(parted) print
Model: ATA WDC WD2500AAKS-0 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 0.00GB 35.0GB 35.0GB primary boot
2 35.0GB 37.0GB 2.00GB primary
3 37.0GB 250GB 213GB primary

(parted) quit
Information: You may need to update /etc/fstab.