I'm installing Ubuntu 16.04 on a 200-GB hard-disk (with 4-GB ram installed). When I let the installation do partitioning for me, it created the following partitions.

Ubuntu auto-partitioning on 200GB hard disk with 4GB ram:

The images shows the following partitions,

  1. Filesystem - 196 GB Ext4 (/dev/sda1)
  2. Extended Partition - 4.2 GB (/dev/sda2) (highlighted in the image)
  3. Swap - 4.2 GB (/dev/sda5)

I canceled and restarted the installation to check how those partitions look like. At one step in the installation you can see the current partitions, and I didn't find the extended partition (highlighted in the image), which means it's not in use. Then why Ubuntu Installation created this partition?

enter image description here

share|improve this question
up vote 23 down vote accepted

The installer, which Ubuntu inherited from Debian, wants to make sda1 to hold the root filesystem and sda5 to hold the swap area, for reasons which were never articulated and are forever lost in the mist of time. It cannot create sda5 directly, because the old-style Master Boot Record (MBR) partition table cannot have more than 4 entries; to make more than 4 partitions on a MBR-partitioned disk one has to designate one of those 4 entries as an "extended partition" and make the extra partition(s) inside it. Thus you get sda1 for the root file system, an extended partition, and sda5 inside the extended partition. Note that the extended partition is just a container for sda5, it does not have any disk space of its own.

You can always opt for manual partitioning and create the partitions the way you want them to be.

share|improve this answer
    
Hi, Thank You! Did you see the images I included? – Indu Pillai Nov 17 '16 at 4:45
1  
Yes, there is an image. I did not see it when I first read the question, but now I see it. Strange. – AlexP Nov 17 '16 at 4:47
    
But if we add 196GB + 4.2 GB = 200GB, so you are right that the partition above doesn't exist actually, its just a container. – Indu Pillai Nov 17 '16 at 4:48
    
Would you please edit my question and embed the (2nd) image, I just included the link, because I don't have enough privileges to embed it. It will be better for the future readers. – Indu Pillai Nov 17 '16 at 4:49
1  
There are now two images... And the question has a note that it was edited by muru. – AlexP Nov 17 '16 at 4:55

The swap partition is made as an extended partition to make it simpler to add extra partitions later. This way, there's space for future changes with minimal impact.

Else if you even add another partition by shrinking the sda1 and making a new primary, the swap may just change to sda3 instead of sda5. In which case some settings will have to be adjusted so it can still be used.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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