14

My dual-boot machine has partitions as follows:

  • sda1 50 GB NTFS
  • sda2 15 GB unallocated
  • sda3 20 GB ext3
  • sda4 20 GB ext4

I would like to allocate the unused space on sda2 to my Ubuntu partition on sda4, hopefully leaving the other two partitions untouched, leaving this configuration:

  • sda1 50 GB NTFS
  • sda3 20 GB ext3
  • sda4 35 GB ext4

Is this possible? If so, how can it be done, preferably using GParted?

psusi
  • 37,551
goric
  • 3,816

2 Answers2

11

You must run gparted from a livecd because you will be moving the partitions.

  1. Backup your data (there is an high risk if something goes wrong during partition changes)
  2. Move sda3 to the beginning of the unallocated space
  3. Move sda4 to the beginning of the unallocated space

  4. Resize sda4

João Pinto
  • 17,159
0

This cant be done. You can create a partition in unallocated space and mount it to some path in your home directory or any where else in your Ubuntu partition but you can not merge two non contiguous partitions.

binW
  • 13,034
  • 1
    You can do it,if there is unallocated free space,you can extend that free space to any partition by resizing it. – karthick87 Dec 30 '10 at 13:51
  • @karthick: but that free space is NOT next to sda4 – LFC_fan Dec 30 '10 at 14:03
  • 1
    Well, binW is right about the fact that you can't really merge the two partitions. Of course expanding one partition works beacause the other one is empty.

    Maybe should we edit the question title.

    – Maxime R. Dec 30 '10 at 14:11
  • @karthick87: You can add free space to partition only if it is immediately before or after the partition on the disk. the partition table defines starting and ending points for a partition on a disk. Here sda3 lies between sda2 and sda4 so you cant merge them even if sda2 is empty – binW Dec 30 '10 at 14:22
  • That's why I commented on karthick87 answer : delete sda2, move sda3 and then you can expand sda4. – Maxime R. Dec 30 '10 at 14:26
  • Small addendum: you cannot use unallocated space inside an extended partition to enlarge a partition outside of the extended partition (and vice versa). I faced this problem quite often with dual boot systems, where the installer usually put Ubuntu in an extended partition. – htorque Dec 30 '10 at 18:06
  • well, for extended partition, you should first shrink the extended partition. this will create free space outside the extended partition and it can be then used for expanding some other adjacent partition. – binW Dec 30 '10 at 18:17