3

enter image description here

The second partition was an NTFS, which i doesn't need anymore. So I removed the partiton to liberate more free space to add to ext4 (ubuntu) partition located after the unallocated space.

With gparted (rebooted from a liveCD) I can extend the first partition (NTFS), but not the ext4 one (located after). And cannot move the ext4 before the unallocated space.

Knowing that ext4 is the main system partition, so remove it and recreate a new big ext4 partition is not an option.

Any hint?

additional inf.

  • Windows and Ubuntu are in dual-boot.
  • Ubuntu installed with Wubi.
Thomas Ward
  • 74,764
AJN
  • 177
  • How is it a Wubi install if you have an ext4 partition and a swap partition? If you did have a Wubi install (on your NTFS partition) you could resize the extended partition using that (because your ext4 and swap partition would not be mounted or locked)... but I would guess you don't have a Wubi install. – bcbc Sep 28 '15 at 20:39

2 Answers2

3

You can't resize because of the following problems:

  1. The ext4 partition on sda5, within the sda4 Extended Partition, is mounted and in use.

  2. The swap partition on sda6, within the sda4 Extended Partition, is mounted and in use.

You also said that Ubuntu is installed via Wubi. This complicates things. We can't easily resize a Wubi installation. A Wubi installation is not a true dual-boot. It's a single container file installed in Windows that takes up Windows filesystem space. You then have it 'booting' into that container, and it is not a true dualboot.

Resizing in the way you look to be trying to achieve may not work correctly, if at all.

I advise you take the data inside your Wubi installation and copy it to an external drive, then do an actual dual boot installation, while removing the Wubi installation.

Thomas Ward
  • 74,764
2

WARNING

Partitioning always holds a risk of data loss. Moving the left borders of partitions may lead to boot failure. Especially as you did a Wubi installation I can't predict how it will react.

MAKE A BACKUP BEFORE PROCEEDING!


First, you need to boot from a live system, e.g. your Ubuntu installation medium. From there, start GParted.

You can not ⁽*⁾ resize mounted partitions, so right-click on all partitions in GParted's list that show the grey lock symbol behind the first column and unmount them.

After that, enlarge the Extended Partition /dev/sda4 by moving its left border to occupy all unallocated space. If you don't understand why, read my very metaphorical and easy explanation here, please.

Now there is unallocated space inside the extended partition, which we can now attach to your Ubuntu partition /dev/sda5. Move its left border to the beginning of the extended partition.

Tell GParted to apply the changes by clicking the green tick symbol.

Now all unpartitioned space should be covered. Task done, reboot and pray that you don't need your backup.

(*) Some file systems allow enlarging the partition to the right without unmounting, but shrinking or enlarging a partition to the left is never possible while mounted.

Byte Commander
  • 107,489
  • Thanks guys, it worked! Moved /dev/sda5 before the unallocated space from gparted liveCD (partitions unmounted) then booted from /dev/sda4 and from ubuntu gparted extended it – AJN Sep 29 '15 at 01:10