What is extended file system and how to merge it?

Recently I've been messing around with swap configuration and I've noticed that my swap partition has been removed and my primary system partition has become extended. I've checked GParted documentation but could not find any direct explanation of what this type of file system actually does. From the name I conclude that it is some kind of container for other partitions.

Gparted screenshot

I have a couple of questions:

  • What is an extended file system and what is it used for?

  • Does it matter that my system is on a partition that is under an extended file system?

  • How do I collapse or merge the extended file system into a regular ext4 file system? In particular I am looking to merge /dev/sda2 and /dev/sda5 partitions so that sda5 becomes a regular ext4 partition.


Old style MSDOS partitioning had a 4 primary partition limit so the workaround was extended partitions containing logical partitions. The extended partition counts as one of the 4 allowed and it enabled several additional logical partitions to be created inside the extended partition. I forget the limit for logical partitions.

It doesn’t matter that your / partition is a logical partition inside an extended partition.

To make sda5 a primary partition you would need to copy it off somewhere using GParted in a live environment, delete sda5 and sda2 and finally copy the backup of sda5 back into the unallocated space.