1 (edited by patfla 2016-04-05 02:11:46)

Topic: Want to combine two linux partitions, but swap partition in the way.

Asus laptop originally Windows, added Ubuntu so now a dual boot.

I changed the Ubuntu config over time and now want to fix something.  I find that I have, first, the main linux boot ext4 partition and a second storage ext4 partition except the two are separated by the swap partition.  Would to combine the two ext4 partitions.

Went into the latest gparted, 0.25, to see if it would let me do this easily and it wasn't clear to me that it would.

I suppose (?) I could just delete the swap partition, then combine the two main partitions that I want combine then recreate the swap partition?  Ubunutu, originally 14.04 and now 15.10, will boot without any swap partition I believe?

Have done various kinds of partition surgeries over the years but not this particular one so what details/tools/etc do I want to know about?

Thanks.

2

Re: Want to combine two linux partitions, but swap partition in the way.

I highly recommend you perform an image backup of your drive before re-partitioning your drive.  That way if anything goes wrong, due to software bugs, hardware failure, or power outage, you will be able to restore back to your original configuration.

If you have enough room in your boot partition you might try the following steps:

1)  Copy the contents of the storage partition into the boot partition
2)  Delete the storage partition
3)  Move the swap partition right (this will place the unallocated space adjacent to the boot partition)
4)  Grow the boot partition to use the unallocated space

3

Re: Want to combine two linux partitions, but swap partition in the way.

That sounds a good way to proceed.  I'll give it a try.

4

Re: Want to combine two linux partitions, but swap partition in the way.

If you have any extended partitions (which contain logical partitions), then see Moving Space Between Partitions.