[Techtalk] Repartitioning advice

David Sumbler david at aeolia.co.uk
Sun Mar 21 17:54:43 UTC 2021


The disk on my desktop computer is partitioned like this:

Device         Start        End    Sectors   Size Type
/dev/sda1       2048   15624191   15622144   7.5G EFI System
/dev/sda2   15624192  140623871  124999680  59.6G Linux filesystem
/dev/sda3  140623872  265623551  124999680  59.6G Linux filesystem
/dev/sda5  265625600  281247743   15622144   7.5G Linux swap
/dev/sda6  281249792 1953523711 1672273920 797.4G Linux filesystem

The big partition, /dev/sda6, holds my /home directory.  The operating
system (currently Ubuntu 18.04) is on /dev/sda2, and /dev/sda3 contains
the previous version (Ubuntu 16.04).

Of course, I am currently using version 18.04.  The idea if the above
scheme is that when I install a newer version, I install it over the
older of the two systems, so that if there are any major problems I can
still boot the one I was using previously.  When I eventually get
around to installing v.20.05 (or perhaps 22.04), I shall write it over
v.16.04.

I use a similar arrangement of partitions on my laptop computer.

My partner's computer only has 3 partitions, like this:

Device          Start        End    Sectors   Size Type
/dev/sda1        2048    1050623    1048576   512M EFI System
/dev/sda2     1050624 1937022975 1935972352 923.1G Linux filesystem
/dev/sda3  1937022976 1953523711   16500736   7.9G Linux swap

This computer was bought with Ubuntu 16.04 ready installed, but 
v.16.04 reaches the end of its 5-year support period very soon, so I
urgently need to install a newer version (20.04).

I would like to repartition the disk in a similar layout to my own
computers.  In other words, I want to shrink /dev/sda2 to, say 60Gb,
create a new partition of a similar size (eventually for v.20.02), and
use the remaining 800Gb as /home.  All that, of course, without losing
any data, and still being able to boot v.16.04.

What is the best software to use to do this, in a fairly foolproof way?
(I don't think I'm a fool, but I am capable of making mistakes!)

David




More information about the Techtalk mailing list