0

I despair by the attempt to clone an ssd. Have two nvme ssds and 2 adapter to mount them via usb, thought a simple dd like dd if=/dev/sdb of=/dev/sdc bs=8M count=64000 would clone it, but it doesn't.

dd says successful written, but there is no part table at the destination ssd.

With all my ohter stuff in the past this worked fine for backup/restore and I am wondering why this now fails at Ubuntu 22.04.

How do you clone an ubuntu ssd into a smaller external ssd?

Thanks

roland
  • 1
  • 2
    No matter which cloning method you choose, always remember that a smaller disk can be cloned into a larger one but not the other way around, and in fact the idea of "cloning" is to use disks of equal capacities if possible. – kyodake Dec 19 '23 at 19:07
  • 1
    Your count=64000 might be a bit short to get a full 512GB disk, missing a backup partition table. – ubfan1 Dec 19 '23 at 19:44
  • This can be complicated: When cloning a GUID partition table, GPT, if the tail end of the last partition will be within the smaller drive and there will be some extra drive space for the backup partition table at the very tail end of the target drive, you can finish the operation by repairing (adjusting) the partition table and make a backiup partition table. You can use gdisk for the repairing (adjusting) task, or easier with the shellscript gpt-fix. – sudodus Dec 19 '23 at 20:58
  • try with "rsync -aAXHh --exclude={"/dev/","/proc/","/sys/","/run/","/mnt/","/media/","/lost+found"} / /mnt/" – petep Dec 20 '23 at 01:03

1 Answers1

1

@roland, thank you for bringing us your question! Sadly, this is a somewhat complicated question. It looks like CloneZilla can do the clone task that you're looking for. See the Advanced Parameters section.

This topic was covered ad nauseam here. You actually have a bunch of options for making this happen, just none of them are exactly, perfectly what you're looking for. Let me know if this helps!

Geary
  • 31