2

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.

2 Answers2

6

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.

Rinzwind
  • 309,379
1

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 /.