Score:1

Install Ubuntu without deleting home directory from previous Install

sg flag

I had installed Fedora last year, now wanting to switch back to Ubuntu. But how do I install Ubuntu without removing all the files from my home directory from the previous Fedora install?

I've tried searching all over Google and I can't find anything. Any help?

Hi-Angel avatar
es flag
It's only possible if your home dir is located on a separate partition. In this case you simply chose a custom-based partitioning in the installer, and instead of removing home you chose it as a partition to be mounted at `/home` dir. However, if your home partition is on the same partition as everything else, I'm afraid you're out of luck. I mean, you can of course use another disk *(or even partition for that matter)* to copy all your data there, but no automation on the installer's side.
guiverc avatar
cn flag
@Hi-Angel that isn't true... You can re-install Ubuntu Desktop systems (inc. *flavors*) even if on a single partition without losing any configs, having *manually installed* packages re-install automatically, an option that `ubiquity` used to offer via "Repair installation" decade+ ago, but is still available & triggered by the lack of format.
guiverc avatar
cn flag
I have a system that contained Fedora & OpenSuSE and is now two versions of Ubuntu. Ubuntu Desktop installers `ubiquity` & `calamares` (`calamares` is used by two flavors) can trigger this install if you use "*Manual Partitioning*" (or "*Something else*") and don't format, which causes your packages to be noted; system directories erased; new system installed, then *manually installed* package get installed too (IF internet is available & available in new release) without any change to $HOME be it on same partition or different. You're then asked to reboot
guiverc avatar
cn flag
I'll provide this link (https://discourse.lubuntu.me/t/testing-checklist-understanding-the-testcases/2743) which covers Lubuntu QA (*Quality Assurance*) testcases; the install method I'm suggesting (*prior comment*) is called "*Install using existing partition*" (I prefer thinking of it as "*Upgrade via re-install*" as it's faster than *release-upgrade*). It's what I'd use, and is mentioned on this site in 30+ threads but lower upvoted answers are harder to find sorry so I'm not looking (*mostly mentioned in comments like this as I rarely find the answers*)
guiverc avatar
cn flag
FYI: I mention automatic restoration of packages; that assumes a *deb* based system, as you're coming from an *rpm* based system you'll get no benefit from that so don't try (*or really expect all your added RPM/flatpak/appimage* packages to be auto-reinstalled). You didn't specify if you're asking about Ubuntu 22.04 LTS Desktop **or** Ubuntu 22.04 LTS Server, my comments assume desktop thus a `ubiquity` install, but you should be clear with details. Of course backup everything first; as it's easy to make a mistake!
C.S.Cameron avatar
cn flag
Below is something I wrote a few years ago about copying home to a flash drive. You can copy it back to your computer as you wish. I have not tried this with Ubuntu/Fedora.
guiverc avatar
cn flag
Does this answer your question? [How to reinstall Ubuntu in the easiest way?](https://askubuntu.com/questions/446102/how-to-reinstall-ubuntu-in-the-easiest-way)
karel avatar
sa flag
Does this answer your question? [Changing to another distro: can the -home partition be kept?](https://askubuntu.com/questions/41079/changing-to-another-distro-can-the-home-partition-be-kept)
Score:0
cn flag

Copy home to Portable USB drive

Format flash drive to ext4.

As root use Grsync to copy home/{username} from internal drive to the flash drive. Preserving owner, permissions and group works for me.

enter image description here

Copy or write down UUID of the new partition.

Edit /etc/fstab on the internal drive to add the /home UUID:

UUID={UUID from above} /home   ext4    defaults        0       0

It might be a good idea to use an encrypted home when traveling.

Thanks to ubfan1 for hint

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.