0

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.

1
3

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.

3
  • Thanks for answering. What would be the safest way of moving sda5 out of extended partition? I am very new to anything Linux related, so it is a bit of a steep learning curve.
    – Matthew
    May 1 at 11:50
  • 1
    If you are concerned about safety you need a backup of the entire disk including all 4 partitions. Then you would need a working live environment with GParted available. The easiest way to get this is to make Ubuntu installation media. To get into a live environment you boot the Ubuntu installer and choose “Try Ubuntu” NOT install Ubuntu. That will give you a desktop with the GParted app. Then you need another disk with 50GB of unallocated space (not just space available in a partition) where you copy sda5. Then delete sda2 and the original sda5. Finally copy your copy of sda5 back
    – PonJar
    May 1 at 13:41
  • @guiverc Thanks, helpful suggestion
    – PonJar
    May 30 at 8:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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