Setting up new computer to be identical to old one
I am looking to replace my current desktop PC, which is getting on for 8 years old now, with a more up-to-date one. Ideally I want the new one to be set up the same as my current one, which has been running on Arch since I first got it. I keep my Arch up-to-date by running a full update roughly every four weeks. What is the best way to set up the new one to mirror the existing one? I'd like to have all the same packages installed, with basically the same setup, except for obvious points like the new PC having a different IP address and name on my network. My initial idea was something like the following: 1) Install a basic Arch system on the new computer 2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?) 3) Somehow get Pacman to install the same list of packages on the new computer. 4) Tidy up any config files that need changing - e.g. for the aforementioned IP address / computer name stuff. 5) Copy over my /home directory 6) Copy over various data directories/partitions I have -e.g. I have a whole bunch of images stored in a separate partition that I'll want to copy over. The stuff in here is all self-contained so should be easy enough to copy over. I found thread https://bbs.archlinux.org/viewtopic.php?id=171726 which had some ideas as well - the above is sort-of based on stuff I found on there along with my own thoughts. Does that look like a reasonable plan? Anything I might be missing? Thanks for your attention. Regards, Spencer
2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?)
pacman -Qe -- 謝晉凡 Hsieh Chin Fan | https://topo.tw/about
2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?)
pacman -Qe
5) Copy over my /home directory 6) Copy over various data directories/partitions I have I found thread https://bbs.archlinux.org/viewtopic.php?id=171726...
Yes, rsync is good to go in this case -- 謝晉凡 Hsieh Chin Fan | https://topo.tw/about
On Sun, 30 Oct 2022 20:00:39 +0800, 謝晉凡 Hsieh Chin Fan wrote:
2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?)
pacman -Qe
5) Copy over my /home directory 6) Copy over various data directories/partitions I have I found thread https://bbs.archlinux.org/viewtopic.php?id=171726...
Yes, rsync is good to go in this case
Hi Hsieh, Thanks for the suggestion. I knew there would be a way to get the list from pacman.. Regards, Spencer
Hi, On Sun, 30 Oct 2022 11:42:24 +0000, Spencer Collyer wrote:
My initial idea was something like the following:
1) Install a basic Arch system on the new computer 2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?) 3) Somehow get Pacman to install the same list of packages on the new computer.
For 2) and 3) see 2.5 and 2.6 here: https://wiki.archlinux.org/title/Pacman/Tips_and_tricks
4) Tidy up any config files that need changing - e.g. for the aforementioned IP address / computer name stuff.
To list modified config files, you can use: pacman -Qii | awk '/^MODIFIED/ {print $2}' Besides the network config, hostname and UUIDs probably also change, so watch out for that e.g. in custom backup scripts etc. You may also want to check/migrate all unowned files (not tracked by the package manager): pacreport --unowned-files
5) Copy over my /home directory
If you have the time and care, instead of copying the entire /home, you could manually copy the contents and decide what you want to keep. You may want to omit ~/.cache and some configuration dotfiles in ~ or ~/.config that you don't need anymore. I would also keep the old drive around for some time in case you notice that you forgot something... Good luck! -- Merlin Büge
On 2022-10-30 at 15:10:59 +0100, Merlin Büge <toni@bluenox07.de> wrote:
5) Copy over my /home directory
If you have the time and care, instead of copying the entire /home, you could manually copy the contents and decide what you want to keep. You may want to omit ~/.cache and some configuration dotfiles in ~ or ~/.config that you don't need anymore.
I always think my hone directory is clean and tidy until I get a new computer and force myself go through it manually. :-)
I would also keep the old drive around for some time in case you notice that you forgot something...
Excellent advice as well. I had a few virtual machines set up for specific purposes on a separate partition,¹ and forgot all about them until I needed one about a month later. ¹ /bin/find doesn't cross mount points unless you request it explicitly
On Sun, 30 Oct 2022 15:10:59 +0100, Merlin Büge wrote:
Hi,
On Sun, 30 Oct 2022 11:42:24 +0000, Spencer Collyer wrote:
My initial idea was something like the following:
1) Install a basic Arch system on the new computer 2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?) 3) Somehow get Pacman to install the same list of packages on the new computer.
For 2) and 3) see 2.5 and 2.6 here: https://wiki.archlinux.org/title/Pacman/Tips_and_tricks
4) Tidy up any config files that need changing - e.g. for the aforementioned IP address / computer name stuff.
To list modified config files, you can use:
pacman -Qii | awk '/^MODIFIED/ {print $2}'
Besides the network config, hostname and UUIDs probably also change, so watch out for that e.g. in custom backup scripts etc.
You may also want to check/migrate all unowned files (not tracked by the package manager):
pacreport --unowned-files
5) Copy over my /home directory
If you have the time and care, instead of copying the entire /home, you could manually copy the contents and decide what you want to keep. You may want to omit ~/.cache and some configuration dotfiles in ~ or ~/.config that you don't need anymore.
I would also keep the old drive around for some time in case you notice that you forgot something...
Good luck!
Thanks for the input Merlin. Some good stuff there that I wasn't aware of before - I really need to look more into what pacman and related systems can do. The old computer will definitely be kept around for some time while I get comfortable with the new one. Regards, Spencer
On 10/30/22 7:42 AM, Spencer Collyer wrote:
I am looking to replace my current desktop PC, which is getting on for 8 years old now, with a more up-to-date one. Ideally I want the new one to be set up the same as my current one, which has been running on Arch since I first got it.
What is the best way to set up the new one to mirror the existing one? I'd like to have all the same packages installed, with basically the same setup, except for obvious points like the new PC having a different IP address and name on my network.
My initial idea was something like the following:
1) Install a basic Arch system on the new computer 2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?) 3) Somehow get Pacman to install the same list of packages on the new computer. 4) Tidy up any config files that need changing - e.g. for the aforementioned IP address / computer name stuff. 5) Copy over my /home directory 6) Copy over various data directories/partitions I have -e.g. I have a whole bunch of images stored in a separate partition that I'll want to copy over. The stuff in here is all self-contained so should be easy enough to copy over.
Why do you even need to a fresh Arch install on the new computer? If it were me, I would just: a) copy the entire contents of the drive from the old machine to the new one b) boot the new machine into single user mode c) perform "mkinitcpio -P" on the new machine (to rebuild your kernel image with any modules that the new machine's hardware needs) And you're done. I've done this several times before when moving to a new machine. Any reason this wouldn't work for you? DR
On Sun, 30 Oct 2022 12:28:41 -0400, David Rosenstrauch wrote:
On 10/30/22 7:42 AM, Spencer Collyer wrote:
I am looking to replace my current desktop PC, which is getting on for 8 years old now, with a more up-to-date one. Ideally I want the new one to be set up the same as my current one, which has been running on Arch since I first got it.
What is the best way to set up the new one to mirror the existing one? I'd like to have all the same packages installed, with basically the same setup, except for obvious points like the new PC having a different IP address and name on my network.
My initial idea was something like the following:
1) Install a basic Arch system on the new computer 2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?) 3) Somehow get Pacman to install the same list of packages on the new computer. 4) Tidy up any config files that need changing - e.g. for the aforementioned IP address / computer name stuff. 5) Copy over my /home directory 6) Copy over various data directories/partitions I have -e.g. I have a whole bunch of images stored in a separate partition that I'll want to copy over. The stuff in here is all self-contained so should be easy enough to copy over.
Why do you even need to a fresh Arch install on the new computer? If it were me, I would just:
a) copy the entire contents of the drive from the old machine to the new one
b) boot the new machine into single user mode
c) perform "mkinitcpio -P" on the new machine (to rebuild your kernel image with any modules that the new machine's hardware needs)
And you're done.
I've done this several times before when moving to a new machine. Any reason this wouldn't work for you?
DR
Hi David, Thanks for the suggestion. It's not something I'd thought of, nor come across when doing research on the internet for how to do it. Certainly sounds like it would be simpler than the method I'd come up with. Regards, Spencer
* Spencer Collyer <spencer@spencercollyer.plus.com> [10/30 11:42]
I am looking to replace my current desktop PC, which is getting on for 8 years old now, with a more up-to-date one. Ideally I want the new one to be set up the same as my current one, which has been running on Arch since I first got it. I keep my Arch up-to-date by running a full update roughly every four weeks.
What is the best way to set up the new one to mirror the existing one? I'd like to have all the same packages installed, with basically the same setup, except for obvious points like the new PC having a different IP address and name on my network.
My initial idea was something like the following:
1) Install a basic Arch system on the new computer 2) Get the list of installed packages from the old computer (I think there is a way to do this using Pacman?) 3) Somehow get Pacman to install the same list of packages on the new computer. 4) Tidy up any config files that need changing - e.g. for the aforementioned IP address / computer name stuff. 5) Copy over my /home directory 6) Copy over various data directories/partitions I have -e.g. I have a whole bunch of images stored in a separate partition that I'll want to copy over. The stuff in here is all self-contained so should be easy enough to copy over.
I found thread https://bbs.archlinux.org/viewtopic.php?id=171726 which had some ideas as well - the above is sort-of based on stuff I found on there along with my own thoughts.
Does that look like a reasonable plan? Anything I might be missing?
Thanks for your attention.
Regards,
Spencer I always forget to reply to the list, sorry!
A new PC/Laptop would likely use uefi and it takes maybe 10 minutes to install a minimal profile arch, so save your files, and your config folder, and do a new install. Did it yesterday....15 minutes and i3-wm was up and running. OS: Arch Linux x86_64 Host: X570 AORUS ELITE -CF Kernel: 6.0.6-arch1-1 Uptime: 15 hours, 19 mins Packages: 695 (pacman) Shell: zsh 5.9 Resolution: 3840x2160, 2160x3840, 2160x3840 WM: i3 Theme: gruvbox-dark-gtk [GTK2/3] Icons: Adwaita [GTK2], ArchCursorComplete [GTK3] Terminal: st Terminal Font: UbuntuMono CPU: AMD Ryzen 9 5950X (32) @ 3.400GHz GPU: AMD ATI Radeon RX 5600 OEM/5600 XT / 5700/5700 XT Memory: 4682MiB / 64228MiB -- Regards, ---------------------------- - ArchLinux - when you have better things to do than fixing a system
participants (7)
-
2QdxY4RzWzUUiLuE@potatochowder.com
-
David Rosenstrauch
-
Lennart Andersen
-
Merlin Büge
-
Spencer Collyer
-
謝晉凡 Hsieh Chin Fan
-
謝晉凡 Hsieh Chin Fan