-- Leo's gemini proxy

-- Connecting to moddedbear.xyz:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Migrating a Linux Install

2021-06-26


This last week I ordered and installed an SSD as an upgrade for my laptop which previously only had a 2TB 5400RPM hard drive. Fortunately my laptop had a free M.2 slot so I'm able to now have both drives installed alongside each other. No need to compromise between fast speeds and huge amounts of storage!


One thing I had to figure out was how to best migrate my existing Arch Linux install from my hard drive to my SSD. What I ended up doing was a fresh install on the SSD with the base system and desktop environment of choice (KDE). Once I was logged into my new install I mounted my hard drive and started copying over some of the directories from my old home directory, most notably .config and .local/share. On my old hard drive install I had also used this pacman command to generate a list of installed packages:


pacman -Qe > installed-packages.txt

Note that this command only returns packages which were explicitly installed and not packages which were only installed to satisfy dependencies.


I used this list to reinstall most of my old packages. Although pacman has a feature to install packages from a list, I did this step manually because there were some packages I didn't care to install again. I also used paru (an AUR helper and pacman wrapper) instead of pacman so that AUR packages also got reinstalled with everything else.


After these steps were done, I just logged out and back into my new install and it automatically looked and felt extremely close to my old one. There were only a few minor theming options that weren't restored for some reason, but those were easy enough to fix. All my keyboard shortcuts, system settings, and application settings were exactly as I had left them. Even KDE Connect re-paired to my phone automatically and some applications like Slack and Discord I didn't even have to log back into.


I'm impressed at how painless the whole process was. It gets a strong 8/10 from me. I'm sure there's ways to restore that are easier and more automatic than what I did too. If you've got any, I'd love to hear about them!


- moddedBear


Links

Home

Arch Linux Wiki: Pacman Tips and Tricks [https]

-- Response ended

-- Page fetched on Fri Apr 26 14:20:25 2024