1

I was recently given a completely new workstation at work. My old workstation has Kubuntu 20.04 and the new one has better hardware in every respect. I'm looking to install Kubuntu 22.04 on it.

I put all my data in my account's /home, which is its own partition on its own nvme drive. I'd like to use the (faster) drive in the machine already as the new home of my home partition, and install the OS on a different partition. I'm wondering if anyone has any advice on the most graceful way to affect the switch.

My current plan is to use my boot-drive USB to do a partitioned install on the new machine, and then copy the files in home over using an external drive. (including the various dotfiles that are used for configurations). This seems inefficient, though. If I can plug my old home partition into the new machine, then affect the transfer somehow thereafter, it seems like it might be faster/easier.

Thanks for the advice.

Nmath
  • 12,333
LGS
  • 115
  • 1
    /home partitions are not as transplantable as they were a decade or more ago. Most applications store configuration files there and this often does not translate to a new installation, especially if it's a different version or distribution. This is why a separate home partition is no longer recommended and not even offered as an option during system installation unless you choose "something else" to manually configure your install. I suggest a new installation with the default options (no separate home). Treat your existing home as a backup and restore only what is desired or necessary. – Nmath May 10 '22 at 23:20
  • My wife has been using the same /home partition for fourteen years now: See https://askubuntu.com/questions/991189/using-existing-home-directory-from-a-bootable-external-drive. She has reported no problems with this setup. I often make Full install flash drives using home partitions as a test. – C.S.Cameron May 12 '22 at 15:24
  • @Nmath I copied the data in my old home dir to the new machine and it is now completely inoperable. I can get into a safety terminal, but nothing else. Any advice on how to rectify this issue? – LGS May 16 '22 at 18:13
  • As I noted in my comment, home folders are not easily transplantable. You've now discovered this the hard way. If you don't want to reinstall the system again, then you'll need to create a new user and delete the existing user. This will spawn a new home folder for the new user. If you want/need to use the same username, you'll need to do this twice, after deleting the original user and its home folder. Anything you want to restore from the original home folder will need to be on a case-by-case basis. Static files will be fine but any configs will need to be copied judiciously. – Nmath May 16 '22 at 18:18
  • So I desired to have my files and folders in the same place, so I rsynced my home folder to a directory on an external, then rsynced it into my home directory on the new machine. I think you need to be more specific about 'judicious' or something, because this was what got me in trouble? To be clear, literally no applications work (this is more for someone else reading this). Konsole doesn't even run. – LGS May 16 '22 at 18:36
  • I'm not sure how else to put it... Home folders are not easily transplantable especially across different versions due to all of the application configs stored in the home folder. All of these configs would be set up for the hardware on your old system and the versions of software on your old system. When I say you need to be judicious it's because there are dozens or hundreds of these files and it only takes one incompatible one to mess up some kind of functionality. Only restore what you actually need. It seems clear that you will not be able to reuse the entire home as-is. – Nmath May 16 '22 at 19:06
  • The method shown at this link: https://askubuntu.com/questions/285212/keeping-the-same-home-partition-after-a-clean-install, works for me reusing /home as long as the Ubuntu flavors are the same. Ubuntu 18.04 ->Ubuntu 22.04 is okay, Ubuntu 18.04 -> XUbuntu or Lubuntu is not. – C.S.Cameron May 17 '22 at 16:20
  • @LGS: Here is a method to copy home directory from internal drive to Persistent USB. It also works for copying home directory from internal drive to another internal or external drive. https://askubuntu.com/a/1062085/43926 – C.S.Cameron May 17 '22 at 16:45
  • @Nmath I figured out what was locking up my system. It appears that .Xauthority and .xsession-errors couldn't be transferred. In other words, the transplant did actually work except for that one file. Of course I did have to reinstall all the programs I used to have on the previous machine. I did that by saving the packages I had explicitly installed from apt to a txt file, then telling apt on the new machine to install all those packages. – LGS May 18 '22 at 19:00
  • @C.S.Cameron I appreciate this, but I think there are additional steps to transfer from a portable USB to a new machine, which I've already done without a separate partition at this point. I did this by setting up a new install, backing up my home to an external, then rsyncing it into my new home on my new install. – LGS May 18 '22 at 19:02

0 Answers0