0

I installed Ubuntu 20.04 six Months ago and my Issue is, I installed Ubuntu with custom partition schema (created partitions myself) as this: My Partition Table enter image description here

And Because I do development (and curious to test OSS projects usually), 20GB in the /home is not enough and very often I have to move things around to other partitions which obviously gonna delete them soon because I just experimenting with'em anyway.

I seperated /home and /root just because if I messed up smth in the system my personal files will be safe (hopefully).

I wanted to be to shrink the /root partition which is ~260GB in order to increase /home which is 20GB partition, but it seems impossible as the data in /root is stored in the beginning of the partition so I can't grow the /home partition.

Hence, I read about that, Linux systems use files as swap nowadays, I thought I could delete that partition but also afraid of losing data if I grow the /home partition in the beginning.

I thought that no place is better to ask! if there is another option to move the data far from the beginning so I can resize the partitions at either side safely?

Akam
  • 1

1 Answers1

0

Fun Fact 1: I solved my problems after last day of college today. wanted to share it with you.

Fun Fact 2: I did everything without any sort of backup, it was DANGEROUS and not recommended (highly discouraged, in fact).

So what I did was simple but a little bit dangerous:

what I did?

  1. Shrink-ed an 80GiB of sda7 aka root partition on the right end (it was ~260GiB) with resulting

    | Home: ~20GiB | root 180GiB | unallocated ~80GiB |

  2. Moved the root partition to the right, so the resulting scheme will be:

    | Home: ~20GiB | unallocated ~80GiB | root 180GiB |

  3. Grow-ed the home sda6 partition to extend all the way up to the edge of the root partition (extending by all the remaining unallocated space, resulting scheme:

    | Home: ~100GiB | root 180GiB |

How did I do it?

  1. I used an Ubuntu 18 stable with a live boot USB stick (because partitions have to be unmounted and it was not possible with normal setup because the system was on which I was wanted to edit).
  2. I used GParted, a graphical application helps you shrink/move and many many more things graphically with a very stable and clear procedure.

References:

  1. Resize Partition with GParted: https://gparted.org/display-doc.php?name=help-manual#gparted-resize-partition
  2. Move Partitions with GParted: https://gparted.org/display-doc.php?name=help-manual#gparted-move-partition
Akam
  • 1