I’ve spent considerable time configuring my Linux system (1) and I would like to have the exact same system on another PC (2).
What would be the best way to do that?
Hardware on (2) is different, but tested compatible with the kernel.
(2) has a smaller drive size, so simply dd’ing the entire drive from a live USB won’t work.

Here’s what I’m planning:

  • install same distro on (2), using the same username as on (1)
  • create a list of installed packages on (1)
  • install same packages on (2) using the package manager
  • copy /home and /etc from (1) to an external EXT4 drive
  • boot (2) from a live USB and mount the external drive
  • delete /home and /etc on (2), then copy them over from (1)

Will this cause permission issues? Is there a quicker way?

  • y0din@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 days ago

    No, dd won’t work reliably when copying from a larger drive to a smaller one. To do this, you would need to resize and align the partitions first, handling each partition individually, or use a different cloning method.

    A better approach is to use something like Clonezilla. In advanced mode, it allows you to clone from a bigger disk to a smaller one, provided that the used space on the source drive does not exceed the capacity of the target drive. Without this, it won’t be possible with any tool, not just dd.

    Here’s a tutorial for Clonezilla advanced mode:

    https://clonezilla.org/clonezilla-live/doc/11_lite_server/advanced/09-advanced-param.php

    (edit added link, and saw the second post just before me with the same answer, not trying to steal from it @[email protected], sorry!, you posted while I wrote mine, so please feel free to ignore this, feels so dumb to just delete posts)