I've got a partition P1 (which contains my Linux OS) on a drive A.
I've just gotten a completely new drive B (that is larger than partition P1 AND the entire drive A).
I'd like to copy across the partition from drive A to drive B, and possible resize it later on.
Can this be done with dd
? I could easily create a new parition table on drive B, and just cp
the files across - but this seems like it might be slightly slower due to the filesystem overhead.
Output of `parted --list`:
It would be the partition 4 that I want to copy to another drive.
Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdb: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 1049kB 1031kB BIOS boot partition bios_grub
2 1049kB 1074MB 1073MB fat32 EFI System boot, esp
3 1075MB 183GB 181GB ext4 Linux filesystem
4 183GB 250GB 67.5GB ext4 Basic data partition
Please ignore any reference to the boot drive / functionality (which I'll worry about later on) - keeps this question concise.