1

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?

raidz
  • 31
  • 4
  • 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. – Hi-Angel Oct 22 '22 at 00:48
  • 1
    @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 Oct 22 '22 at 01:03
  • 1
    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 Oct 22 '22 at 01:06
  • 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 Oct 22 '22 at 01:09
  • 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! – guiverc Oct 22 '22 at 01:29
  • 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. – C.S.Cameron Oct 22 '22 at 03:41
  • 1

1 Answers1

0

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

C.S.Cameron
  • 19,519