0

I know that there are several questions regarding this already on this forum, but each one mostly addresses a specific question.
So I have a separate filesystem partition for /home and a separate filesystem partition for /.
I currently have ubuntu 16.04.

I want ubuntu 20.04. Among the various things in this forum, I have two options, either I take a backup and clear all ubuntu partitions and install ubuntu 20.04, and another option is that I ubdate 16.04 to 18.04 to 20.04. Which among these are beneficial and why? Also, I do not want to rely on the back up that I have taken.
Is it possible that I create another partition and for "/" in Ubuntu 20.04, and use /home partition from ubuntu 16.04? Will this be a good option?
To create a new partition will I have to defragment current partition and then create free space?
I want the most secure option among all above. I do not want to loose any data from "/home"
PS: I can see a grub option in possible keywords, I am not sure of what changes are required in grub.

A J
  • 41
  • 2
    If you want to discuss your options on a forum you should be asking it over at https://ubuntuforums.org/ – Terrance Mar 25 '22 at 15:05
  • 1
    It should be noted that unless you have an ESM subscription, 16.04 hasn't been supported for about 11 months which included the supported upgrade path to 18.04. Unreliable backups are not a very good plan here. What if you make a mistake? – Nmath Mar 25 '22 at 15:09
  • There are many details here that weren't provided, ie. differences will exist for server or desktop install (you didn't say!) plus what applications you're using. I concur a format would be better than a Q&A site that requires a clear question that allows for clear answers. Your question is very unclear & too-broad. You mix details that don't apply, but you can upgrade via re-install desktop systems (allowing you to install 20.04 & achieve an upgrade) within limits & expect 95%+ perfection depending on what your system is, what apps you use etc. and that'd be my choice if desktop. – guiverc Mar 25 '22 at 21:24
  • @karel The question Can I skip over releases when upgrading is very different from this question. – A J Mar 27 '22 at 07:05
  • You can download a 18.04 iso at https://releases.ubuntu.com/18.04/. And do a step by step upgrade. A clean install of 20.04, or if you can wait a month a clean install of 22.04, would be cleaner and would take less time. If you don't want to rely on your current backup(s) make new ones. – Joepie Es Mar 27 '22 at 08:04

3 Answers3

1

You can use a seperate "/"-partition.

During install you can choose 'something else' when asked how you want to install Ubuntu.

About using your current "/home"-partition during installation, I'm not so sure, as the newer Ubuntu will use newer version of programs and files there, or even other programs.

What you can do is install the whole system in your "16.04 /"-partition. Make backup of your documents, downloads, music, videos etc (decrease size of your "/home"-partition and create another parttion on which you copy your files, or use an external medium) first. You can also make a list of the programs you installed. Afterwards, when installed you can alter your FStab, so you seperate "/" and "/home"-partitions again.

If you have an SSD (memory chips inside)don't use defragmentation. This will only harm (unnecessary read an writes) your SSD. If you have a HDD (spinning disks inside) defragmentation is usefull on FAT (16,32) or NTFS partitions. EXT (2,3,4) and BTRFS do no fragment.

And if you're not in a hurry, you can wait till the end of april (only 1 month) for the 22.04 LTS release.

  • Nice part about fragmentation Homer! – Joepie Es Mar 25 '22 at 15:50
  • If I install 20.04 in "16.04 /" partition, then what will happen to current "16.04" version? Also, can I further create another free disk space from "16.04 /" partition and "16.04 /home" partition, and install 20.04 there? – A J Mar 25 '22 at 17:10
  • Do a lsblk | grep -v loop - if /home is NOT there then you do not have a separate home-partition. Regardless, you have no "update" option: BACKUP your data (/home and /etc at least, X setup too maybe), reinstall from scratch, restore BACKUP, use settings files as REFERENCE - do not copy & past blindly, instead use bits and pieces from them, verify that what you copy actually does what you expect. – Hannu Mar 25 '22 at 18:18
  • I do have /home and / as different partitions! – A J Mar 26 '22 at 04:41
1

If you want to keep 16.04 /(root) just make room and create a 20.04 /(root) partition. If you don't want to keep 16.04 /, format it during installation (check the box format partition).

I hope you use a swap-file or your swap-partition is located at the end of your disk. That would make things easier.

If your / and you /home are located next to each other, yes you can snoop a little bit of either and install 20.04 in the created space. (Mind that you can only decrease on the right side, so you'll probably have to move your /home to the right after shrinking. That can take a long time ( and has a certain risk, hence the backup ).

1

No, but if you want to snoop a little bit of of both partitions and make a new one in between them, then yes. Lets says you have -/---/---/- where the first - is boot, --- is /, --- is /home and the last - is your swap. You can snoop 1- of of /, snoop 1- of /home (which it will do on the right (result -/--X/--X/-)). Then move /home to the right (-/--/XX/--/-). Now you have your free space (X) together to make a new partition for 20.04. If you put a screenshot of GParted in your question, and specify exactly what you want to do (keep 16.04 or not/seperate / and /home of 20.04 or not, I can guide through the process step by step if that would be helpfull. (This is too long for a comment, hence another answer, which is not exactly an answer.)