1

I want to allocate 20GB for / and remaining unallocated to /home. The problem is I can't move the unallocated space to after / using GParted.

My partitions:

Image

I'm using Ubuntu 18.04.

Melebius
  • 11,431
  • 9
  • 52
  • 78
  • 1
    @mook765 Why marked as a duplicate? This user clearly shows he knows we can use gparted to resize partitions. – vanadium Oct 08 '19 at 10:01
  • 2
    @vanadium Yeah but it seems OP isn't booting from a LiveUSB (after looking at the key icons) and AFAIK booting in live environment is necessary to resize partitions. – Kulfy Oct 08 '19 at 10:24

1 Answers1

1

First of all, make sure you are running GParted from a live session. You cannot move partitions used by a system that is currently using them.

To add the unallocated space to a partition, you will need to make sure that the unallocated space is adjacent to the partition. You will therefore need to move the partitions after the unallocated space right after sda9 first. Then, the unallocated space will move after your current sda12, which is currently your /home partition. You will then be able to expand sda12 to also use the unallocated space.

Moving partitions using gparted may take a long time. It would be faster to delete these partitions and then recreate partitions the way you want, and reinstall.

vanadium
  • 88,010
  • @Melebius, certainly so. I added this to the answer. – vanadium Oct 08 '19 at 12:59
  • Swap partitions still work. but if you don't use hibernation, they're passé, as swap files are now as fast as partitions, & much easier to manage. When you re-partition, delete the swap partition, & replace it with a swap file by doing sudo fallocate -l 4G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile && sudo nano /etc/fstab ; in fstab, add a line "/swapfile swap swap defaults 0 0" and save fstab. How much swap is needed? See https://askubuntu.com/questions/594054/how-much-swap-should-i-take-for-1gb-to-8tb-of-ram-on-14-04-or-higher/594402#594402 – K7AAY Oct 08 '19 at 20:45
  • I'm going to delete the swap and recreate it. Does this have anything to do with fstab , or any other files possibly ?. I certainly don't want to mess it up. – Tommyst001 Oct 09 '19 at 12:29
  • If yo do not need for hibernation, use a swap file instead. Otherwise, the only complication is that you need to update the UUID of your new swap in the entry for swap in your fstab file. – vanadium Oct 09 '19 at 15:36