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?

  • shrugs@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    4 days ago

    In short, you can just copy your whole system, you can use rsync, cp or dd. Two things need to be taken care of:

    • uefi boot needs to be working (copy uefi partition from old drive or reinstall with grub from live iso)

    • partitions in /etc/fstab need to be configured correctly

    Everything else ist just the files and configs. Prefer using rsync -A over cp. In Linux everything is a file, except /dev and /procfs

    Don’t forget to fix hostname and network config if not using network manager.

    Your idea should work no problem btw. though, since uefi and fstab is taken care of by the previous clean install. You should probably not overwrite fstab in that case IMHO.