0

I am running 14.04 LTS and would like to upgrade to 16.04 LTS with a complete reinstall. One of the motives behind the complete reinstall is that there is a dualboot system with a zombie Windows I want to get rid of. So it is fine for me that the new Ubuntu release takes hold of the hard-disk resources in full once again.

There are two partitions, though, that I would like to keep in place out of convenience: those where I had mounted /home and /opt. Of course I am aware that backup is just as important as clean water, and that I can resort to that after a brute-force reinstall.

However, I wondered if, during a complete reinstall, I could instruct the installation medium of 16.04 not to wipe those specific partitions, so than I can mount them again when the new Ubuntu is in place?

Same question holds in the scenario I move onwards from 16.04 to 18.04.

It is worth mentioning that /home is encrypted, in case this complicates the matter, although this question and answer Why can I not deselect "encrypt my home folder"? gives a hint of what will happen. Confirm/confute welcome.

2

You can re-install using "something else" and not format your partitions. The installer will take note of your applications, erase system directories (not touching your $HOME or /home directory) then install, then add-back additional software you had added to your system if found in Ubuntu repositories, then ask you to reboot. PPA's & 3rd party repos are disabled so software sourced from them won't be re-installed.

I've used this without issue with an encrypted /home partition (also had an issue once with a [possibly beta] 17.10 re-install, but it was a missing file in the installer that once added, all was good). I however didn't use encrypted when I upgraded from 14.04 LTS to 16.04 LTS, so my encrypted upgrades were later releases.

This method allows you to 'skip' releases too, or go backwards (ie. from 18.04 LTS to 16.04 LTS if you decide you didn't like 18.04 for some reason..) It's also useful should you just need to re-install the same version you were on; and I've used it many many times. The something else gives you full control over partitioning.

  • The remark on the handling of ppa's and third-party repositories (stored in /etc/apt/sources.list/d btw) has been quite handy. The only exception to the above is that the system does not make it obvious that it will not touch /home: you need to identify the attending partition from its /dev/sdaX (from the previous /etc/fstab); ask not to ignore that partition by setting the journalling system (ext4); not ask to format it; and setting the mount point to /home. Then, be careful to sign yourself up as a new user with the same old name and password to access the data encrypted previously – XavierStuvw Aug 18 at 8:43
  • Using 'something-else' as I described works if you have a separate /home partition, or it's only a directory on the / partition. In my case I take note of my partitions (on an envelope or scrap paper from recycling) before I reboot to the installer. Yeah I assumed a lot with my answer, and I know /home re-use is documented somewhere (I read it), but I forget where - help.ubuntu.com/lts/installation-guide/i386/install.en.pdf, ubuntu-manual.org or one of the other documentation resources (that few of us read). Very pleased it all went well :) – guiverc Aug 18 at 9:08
  • All for the benefit of future readers. Thanks for the contributions – XavierStuvw Aug 18 at 11:23
  • Word of warning for future users. The handling of the encrypted home direction went like a breeze from 14 to 16, the cares mentioned above having been taken. The upgrade from 16 to 18 can be troublesome though: there is a host of posts in AskUbuntu there mentioning this issue. See askubuntu.com/questions/1030572/… for an informed post – XavierStuvw yesterday

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.