1

I dual booted my PC 2 years ago, and I installed a 50gb partition for Ubuntu. But now I use Ubuntu most of the time. And now there is no space remaining in my Ubuntu partition. I have watched several tutorials, read many blogs, but still can't extend my Ubuntu partition size. I have tried using GParted in Ubuntu and Disk Management in Windows. But in Gparted, I can't extend ext4 partition size Image of GParted

And in case of Disk Management it only shows delete and help option for the Ubuntu partition. There are no extend option. Image of Disk Management

I have a lot of free space in other drives, please someone suggest me the solution

free -h:

total used free shared buff/cache available Mem: 7.7G 2.8G 761M 1.2G 4.1G 3.4G Swap: 1.9G 0B 1.9G

grep -i swap /etc/fstab:

# swap was on /dev/sda8 during installation UUID=6d6b17ee-13d7-49f9-90aa-6a1118c56698 none swap sw 0 0

sudo blkid | grep -i swap:

/dev/sda8: UUID="6d6b17ee-13d7-49f9-90aa-6a1118c56698" TYPE="swap" PARTUUID="93bc1965-08"

2 Answers2

0

When you reformat the sda7 partition, you will probably want to add a partition for your /home to make storing your personal files easier, as I believe that makes mounting them easier when you update or change the operating system.

Scott S
  • 21
  • Weak answer. Should be a comment. – heynnema Mar 20 '20 at 16:49
  • You make a good point about using other partitions as mountable filespace. No need to worry about contiguous partitions at all for this approach, and the original question indicates the root is already at 50G, larger than most recommendations. – ubfan1 Mar 20 '20 at 19:08
  • @ubfan1 OP doesn't indicate that / is 50G (assumes a separate /home), they say the Ubuntu partition is at 50G... and all used up... – heynnema Mar 20 '20 at 19:31
0

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Keep these things in mind:

  • always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

  • a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

  • a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

  • if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

  • you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: Make sure that any data on /dev/sda5, /dev/sda6, and /dev/sda7 (Windows drives D:, E:, and F:) are backed up, as we're going to DELETE them below!

Note: Once started, do not stop or abort this process during the APPLY stages!

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

  • boot to a Ubuntu Live DVD/USB
  • start gparted
  • delete partition /dev/sda5
  • delete partition /dev/sda6
  • delete partition /dev/sda7
  • this should leave approx 450G of unallocated space to the left of /dev/sda8
  • click the Apply icon to save what you've done so far
  • did you remember to swapoff on /dev/sda8?
  • move partition /dev/sda8 all the way left
  • move partition /dev/sda9 all the way left
  • resize the right side of partition /dev/sda9 all the way right
  • click the Apply icon again
  • when the /dev/sda8 and /dev/sda9 move/resizes are complete, reboot the computer
heynnema
  • 70,711