Score:2

Reinstall Ubuntu (former 20.04.5LTS, new 22.04.2LTS), completely wipe / and keep all /home in separate partition

I guess the title is explicit enough. I have a PC with a single hard disk. Can anyone provide info on how to:

  1. Install 22.04.2 LTS into /dev/sda6, which now has 20.04.5 LTS (in /)
  2. Keep all of the info in /dev/sda7, which holds /home

I have read various sources, and I find contradicting information. E.g.,

  1. https://help.ubuntu.com/community/UbuntuReinstallation indicates one should select "Upgrade..." I don't see that option. I only see the other 4 below it in the image.
  2. Re-install Ubuntu without losing data in home folder
  3. Re-install Ubuntu without losing data in home folder
  4. erase ubuntu and reinstall will it affect windows and other windows partitions

Given this seeming contradiction, information from those who succeeded, firsthand, is most valuable.

PS: there is no need to remind that one should always make a backup of important data.

Organic Marble avatar
us flag
Did you already move /home to a different physical partition? If not, completely wiping / will wipe out /home. I know you wrote "partition" but sometimes people are imprecise and a mistake could be bad. In other words, unless you did something nonstandard, "the partition that holds /home" is /
sancho.s ReinstateMonicaCellio avatar
@Rinzwind - I posted a couple of wrong links, now fixed. On one hand, when I say "contradicting information" I mean Person A says action 1 works (possibly from reading some source, but not having tried it), and Person B says "it didn't work for me". Or website A says "do this" and I cannot "do this" because the menu doesn't show that option. AFAICT, that is not an opposition of opinions, but of information.
ar flag
Does this answer your question? [Keep /home directory when installing Ubuntu 14.04](https://askubuntu.com/questions/630966/keep-home-directory-when-installing-ubuntu-14-04)
crip659 avatar
pl flag
An upgrade is usually a choice given after one of the system updates is finished. If not you change the setting in software and updates, to notify for new upgrades. This will upgrade to the newer version and keep your data. For most people this works, but for the few it is a SNAFU(why backups recommended). Can also format /sda6 and install new version in sda6. People with fat fingers might also format sda7 and lose all their data.
sancho.s ReinstateMonicaCellio avatar
@OrganicMarble - I will shortly remove the comments to reduce the clutter.
ag flag
You may want to make a backup of your /home partition.
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) *I've written an answer on that question that covers what I do somewhat regularly... I don't upgrade some systems but use the re-install weekly as a QA-test to achieve upgrades; currently jammy is a release I do this with using the 'daily' which will be released as 22.04.3 for example*
Score:6
cn flag

A couple of things about the links you posted before I answer the 2 bullet points.

Those links are not contradicting.

ANY instructions from before the last LTS should always be read with caution. Anything before an LTS that breaks with previous versions needs to be ignored. 2 examples: Ubuntu before systemd (so versions that used upstart), before wayland (as in systems before Unity). The installer got updated two times. Faqs from before each need to be read with extreme caution or simply ignored. ALWAYS use faqs closed to the LTS you are at. So using 20.04? Use faqs for 20.04 or 22.04.

In my opinion anyone should use 2 disks. 1 boot disk. 1 personal disk. -disk- not partition. Only if you do not have 2 disks 2 partitions. But even then I would use the harddisk for the system and use a (quick) USB for personal files.

Why you ask?

1 ssd for speedy boot. Holding your system including /home with no personal files. My system boots within 7 seconds. It takes me 19 minutes to reinstall including post install (apache and mysql for instance as I host websites from my notebook).

1 hdd for personal files including my websites and databases.

Your hdd is slow but your personal files do not need a quick disk. That disk needs to be durable as a HDD is (compared to an SSD). Your OS does like speed (the personal cache files in /home/$USER also benefit from the SSDs speed)

If your boot disk breaks you can replace it and install an Ubuntu adding your personal disk. If your motherboard fries itself you can extract your personal disk and stick it into another system.

If you want to reinstall you can safely delete / and then add your 2nd disk. Because it is a disk it is clearly visible when you pick "something else" when the installer asks since you actually need to activate this disk. If you forget no problem: you will end up with a disk that is not mounted and you can manually add it.

All the other installer options tend to be misinterpreted by users As an example: "replace windows" WILL also delete a D: disk for instance.

Install 22.04 LTS into a partition that has 20.04.5 LTS (in /)

"omething else", mount this partition as EXT4 if it is EXT4 now and with label / and format it.

Keep all of the info in the partition that holds /home

"something else", mount this partition as EXT4 if it is EXT4 now and with label /home and mount it.

That method will always be possible and will never change.

Score:1
gl flag

If you search for "Software Updater" on the 20.04.5 LTS installation with internet access, do you get a dialogue similar to the following with an Upgrade... button: enter image description here

I have used the Upgrade... option on a different PC to upgrade the original installation from 18.04 -> 20.04 and then from 20.04 -> 22.04. Where the Upgrade left my home directory intact.

You might have some installed packages which get obsoleted and removed during the upgrade.

While the title of the question contains completely wipe /, an upgrade doesn't completely wipe / but rather changes the installed packages and Kernel. I'm not sure if you actually need to completely wipe /.

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.