0

How to extend Ubuntu installation partition size?

I have accidentally given Ubuntu less hard disk size then I know I need.

I need more size because I do web development and often use heavy IDE like PyCharm.

I have an extra free 22 GB partition and want to add it to the Ubuntu partition.

Is there any way to do this? I have previously tried gparted but on boot Ubuntu primary partition is not resizing. How can I do this ?

here is snapshot of partitions: Disks view

David
  • 2,101
  • 13
  • 16
  • 25
  • No @guiverc. I have tried that but gparted shows ubuntu primary partition resizing disable – NaSir HuSSaiN Apr 08 '21 at 04:28
  • That does not look like a picture of a gparted screen. – David Apr 08 '21 at 04:29
  • yeah, that picture is of disks screen. But I have tried gparted but no success – NaSir HuSSaiN Apr 08 '21 at 04:31
  • @guiverc I did try that but primary partition size is disabled – NaSir HuSSaiN Apr 08 '21 at 05:23
  • You have old BIOS/MBR configuration. So all logical partitions have to be inside the extended partition. Your unallocated is outside the extended, so you have to extend it first. Then you can move other partitions. You can only do the changes from gparted on a live installer so all partitions are unmounted. You probably still have to unmount swap with swapoff. Only make changes if you have good backups of both Windows & Ubuntu. – oldfred Apr 08 '21 at 12:08
  • what is swap and swapoff? – NaSir HuSSaiN Apr 08 '21 at 14:15

1 Answers1

0

I don't have enough rep for commenting, so I'll leave this here.

First, back up everything important, may be make a backup of the system with Timeshift.

  • You need a live media for this. Boot into Ubuntu (or for that matter, any distro with gparted) with a live USB or CD.

  • Choose "Try Ubuntu" and run GParted. If you don't have that on that distro, try installing it.

  • Then you can safely unmount (if already mounted) and resize your / partition from there.

  • You cannot resize your / partition if you boot into the Ubuntu that's on your drive (ie, the installed version).