7

How can I expand/resize my extended partition (sda3) with unallocated free space to the left of it? I want this to be able to expand my / partition (sda5).

gParted screenshot

1
  • The only thing the two gentlemen below forgot to tell you is that to be able to use the free space to the left of that partition is that you need to move sda3 to the left first before you can extend sda3 to the right and then extend sda5 inside it... ;-)
    – Fabby
    Mar 4, 2015 at 14:53

2 Answers 2

8

You only can resize (except expanding by moving the right border; depending on the file system) partitions that are unmounted.

Every partition that is in use by your system is mounted. You can see it in gParted when there is this key symbol right to the partition name.

So you have to unmount the partitions inside the extended partition (sda5, sda6, sda7) and then the extended partition (sda3) itself. This is done by selecting "unmount" in the context menu of the partition in gParted.

But stop! Ubuntu will not allow you to unmount the partitions it is running from. Therefore, you have to boot your PC from a live medium (e.g. Ubuntu installation DVD) and run gParted inside this live sessions, where no hard disk partitions are mounted.

Note that partitioning is always dangerous and can lead to data loss or errors at boot time. So make sure your backups are valid and up to date!

1
  • But I upvoted anyway (see my comment below the Q) :P ;-)
    – Fabby
    Mar 4, 2015 at 14:53
5

First backup your data. Any time you resize you run a risk of losing data.

Since you can't resize a mounted partition, Boot from a Live media, Open a terminal and issue the command sudo swapoff -a to insure the swap partition on the drive you are working with isn't in use. Run sudo gparted or gksu gparted.

Right-click your extended partition and choose Resize/Move. Move it to the left to utilize the 7.81 GB of space you have available there.

When you have your desired result click the green check mark to apply your changes.

You'll also want to Resize it to the Right to actually expand the amount of space available in the partition. Again, When you have your desired result click the green check mark to apply your changes.

Follow up by moving and expanding your sda5 partition as you desire using the same process. If anything is unclear, drop me a comment and I'll expand my answer.

More info can be found here

4
  • How to resize any partition......
    – Elder Geek
    Feb 28, 2015 at 23:06
  • +1 for swapoff and link back to you! :-)
    – Byte Commander
    Feb 28, 2015 at 23:14
  • But I upvoted anyway (see my comment below the Q) :P ;-)
    – Fabby
    Mar 4, 2015 at 14:53
  • @Fabby Good point. I'll update my answer.
    – Elder Geek
    Mar 4, 2015 at 16:22

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