sfdisk, sgdisk
sfdisk, sgdisk
check with fdisk -l for the type of your disk and move on with sfdisk or sgdisk
sfdisk for MBR disks
dump / backup table:
sfdisk -d /dev/sda > sda.sfdiskcopy from sda to sdb:
sfdisk -d /dev/sda | sfdisk /dev/sdbsgdisk for GPT disks
dump / backup table:
sgdisk --backup=nvme0n1.sgdisk /dev/nvme0n1copy from a to b:
sgdisk --replicate=/dev/nvme1n1 /dev/nvme0n1 # nvme1n1 is the DESTINATIONyou can optionally change the uuids as well of the new disk:
sgdisk -G /dev/nvme1n1