0

I'm looking for a good and easy way to clone a partition. Surprisingly, I haven't managed to find any suitable solutions, despite this being a seemingly easy and common task. Some general requirements, to make this question distinct from a dozen of other, similar use cases:

  • I want to clone a partition, not a whole disk.
  • It must be copied directly from disk to disk. Writing an image file and then restoring it is wasteful.
  • There is enough free space on the target drive. No shrinking or enlarging is involved.
  • "Cloning" a partition is more than just the content. A new partition must be created on the target drive, with the same name/label and flags. All the required information is already included in the task "Copy this partition to this drive", I do not want to manually specify disk offsets etc.
  • It must be file system agnostic, and also work with encrypted partitions.

Here are some solutions that I tried:

  • dd would usually be the go-to tool for cloning tasks, but I don't think it can create new partitions.
  • Clonezilla can copy partitions and it will even handle the partitioning, but it requires me to select (and thus overwrite) and existing partition which is kind of annyoing.
  • GParted has a Copy/Paste mechanism, but the buttons are greyed out most of the time for some reasons.
4
  • 1
    You say you don't want to modify the partition layout, but then you remark that dd is not capable of creating partitions. I thought maybe you want to copy the original layout, but you say that Clonezilla wants to overwrite target layout. What is it you want to do then? Copy the partition table? Preserve existing one? Create a new one?
    – gronostaj
    Commented Feb 22, 2021 at 12:37
  • @gronostaj you're right, I will reword it to make it more clear.
    – piegames
    Commented Feb 22, 2021 at 12:51
  • @KamilMaciorowski I don't blame those tools for not fitting my use case. I'd be fine with a solution that requires high-level steps (create partition and copy data), but my experience with fdisk is that involves many small manual steps.
    – piegames
    Commented Feb 22, 2021 at 13:00
  • 1
    I understand. After seeing the edit I removed my comment. Commented Feb 22, 2021 at 13:01

0

You must log in to answer this question.

Browse other questions tagged .