Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Best 1:1 Disc copy method from pc1 to pc2?

  1. #1
    Join Date
    Jan 2008
    Beans
    117

    Best 1:1 Disc copy method from pc1 to pc2?

    Best options for 1:1 copying a boot HDD from pc1, to the boot hdd from pc2?
    Identical drive sizes, needing identical settings.

    I have options of ssh, or USB.
    Problems arise when trying to copy a drive in use, so,
    It's been suggested to use dd from a live USB, on the source PC drive, to an image on the USB drive, and overwrite the destination drive with the image on the drive.
    Would this be the quickest option?

  2. #2
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    I use Macirum Reclect to clone from one HD to another.

    Clonezilla is goog also if they are exactly the same size.

  3. #3
    Join Date
    Sep 2015
    Location
    Maine
    Beans
    Hidden!
    Distro
    Lubuntu 18.04 Bionic Beaver

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    I use Acronis True Image. Clonezilla works if the new drive is as large - or larger - than the source drive. There are workarounds so that you can move your data to smaller drives, as well.

    If the new drive is smaller than the old one, see here for more info about how to do that with Clonezilla.

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    It is probably easiest to create an image in an external drive, move that drive to the other computer, and restore from the image in that drive into the internal drive. That way you will also get an image that can be used for backup purposes.

    Cloning with dd is straight-forward, but risky, because there is no final checkpoint. dd does what you tell it to do without any question, even if you tell it to wipe the family pictures. So if you want the cloning method, it is better to use another tool, for example Disks alias gnome-disks.

    But I prefer Clonezilla. It is smart enough to copy only the used blocks in the file systems, and skip the free blocks. This means that it will work faster, and the image will be smaller compared to crude cloning.

    There are more details at this link: Create bootable backup system image, where one answer describes using Disks, and one answer (mine) describes using Clonezilla.
    Last edited by sudodus; July 5th, 2020 at 08:59 AM.

  5. #5
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,064
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    Using image files would be the first thing that came to my mind, but if you don't have the spare capacity, you can always just stream the contents across the network.
    I am assuming that the boot drive is /dev/sdx at both ends - make sure you know the right device IDs at both ends or you might trash the wrong drives!
    See the section DATA TRANSFER in "man netcat".
    On the recieving PC, listen for a connection and write to the disk:
    Edit: sudodus points out that my original commands won't work because of sudo redirection. Below are corrected commands
    Code:
    sudo -i
    nc -l 1234 > /dev/sdx
    exit
    Then on the sending end, read the disk and send to the receiver (I assume address 1.2.3.4):
    Code:
    sudo -i
    nc -N 1.2.3.4 1234 < /dev/sdx
    exit
    Last edited by The Cog; July 5th, 2020 at 10:52 AM.

  6. #6
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    Thanks The Cog,

    Great netcat method, when there is no spare capacity to store an image file

    - I tested and it works, when using nc of Ubuntu.

    - I tested also with nc of debian-live-10.4.0-amd64-standard.iso on the listening / receiving side, and it did not work. So the implementation of nc makes a difference.

    - When we use this method, we must realize that it is risky in the same way as cloning with dd: There is no final checkpoint, so please check and double-check that the target device is the correct one, and the target computer is the correct one, before you start the process. Otherwise you might overwrite important data.

  7. #7
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    10,051

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    I've done the above many times in the past. You can also pipe netcat through zip if your network is slow.

    After a copy like that expect to have issues with UUIDs and MAC addresses, so there is a little bit of cleaup to do to get the new machine to boot.

  8. #8
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,255
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    I used ddrescue (from the gddrescue package) to clone two 512 GB laptop drives to identically sized SSDs. Worked like a charm. In my case, though, I connected the target with a SATA to USB device and booted from a USB boot drive I created with the tools in Ubuntu. I would never try to clone a mounted drive.
    Last edited by SeijiSensei; July 5th, 2020 at 03:06 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  9. #9
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,117
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    There are many ways to clone. dd, ddrescue, fsarchiver, clonezilla, and because everything is a file we can use methods like nc or ssh or even bash network connections. Bash has a built-in nc on later versions. Cloning implies a bit-for-bit copy. This is highly inefficient unless the HDD is mostly full. Copying bits that aren't actually being used is wasteful.

    if you don't need the grub stuff in specific places (legacy boot), then using rsync would be much more efficient. rsync only gets real files and ignores empty space unlike most cloning methods. But rsync works at the file level so the file system and lower levels have to be created some other way. But with the rsync, some manual updates to the fstab will be needed. rsync would be the fastest method, by far, but only if you can create partitions, file systems and modify the fstab quickly. Those things are just a few minutes of effort total when you know how to do each correctly.

    Doubt all this hand-waving is helpful. Pick the specific way you want to go.

    Of course, if you have a dual-dock with a cloning feature and don't mind letting it run overnight, that is the easiest solution. Dual-docks are about $30 and cloning is about 5% of the useful reasons to have one.

  10. #10
    Join Date
    Sep 2011
    Location
    Pennsylvania, U.S.A.
    Beans
    2,929
    Distro
    Ubuntu Development Release

    Re: Best 1:1 Disc copy method from pc1 to pc2?

    I needed to copy a small partition and used Disks. 'Create a disk image' to a flash drive then 'Restore a disk image'. Worked fine. I don't know if the image created includes empty space or not.

    Edit: it looks like Disks creates a 1:1 image so pretty wasteful if a partition is large and mostly empty. I guess you could resize(shrink) the partition, create the image, restore the partition at destination and resize again. Disks is probably not the correct tool in this case. I have had pretty decent luck resizing partitions and having them boot with no problems.
    Last edited by kurt18947; July 5th, 2020 at 04:06 PM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •