I have a partition table that looks like this in gparted:

gparted partition table

I want to delete the /dev/sda6 partition and allocate the space to my main sda1 partition, and also allocate the unallocated space to it as well. How do I do this, please? Warning: I am a noob with linux!


Right click on /dev/sda6, and select delete. Then right click on sda1 and select resize/move. increase the storage until there is no free space following it. click resize/move and then click on the tick in the top of gparted.

  • 1
    Please note in the image, that /sda6 is inside /sda2. At the very least /sda2 will need to be shrunk, and probably moved to make the empty space contiguous with /sda1 – Charles Green Feb 11 at 16:41
  • I am unable to resize sda1, and don't know how to merge sda2 and sda1, how do I do that? – marienbad Feb 11 at 18:04

Boot with live USB/DVD in gparted.

  1. Since except the swap on 'sda5' no space is being used as 'sda6' is to be deleted. I would suggest that swapoff -a and delete 'sda2'.

  2. resize 'sda1'.

  3. Create new swap partition.

Then mount the Ubuntu partition.

sudo mount /dev/sda1 /mnt

Find the UUID of Ubuntu and swap partitions.

sudo blkid -o full -s UUID

Edit /etc/fstab file

sudo gedit /mnt/etc/fstab

Change the UUID entries of "/" (Ubuntu) and swap partitionsin /etc/fstab

Save and close.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.