6

I am struggling to understand the output from the "Disks" program. Here I see two different partitions, both pointing to the same disk space.

One is devices /dev/sda3 (highlighted) and the other is /dev/sda5.

Can someone tell me what is the difference? It is slightly confusing because I do not have two partitions and my windows partition only shows up as one (Partition 2).

Disks output

4
  • 1
    Logical partitions exist inside extended partitions and always starts with the number 5, as there can be at most 4 primary partitions. So even though you don't have any partition 4, the one and only logical partition 5 is inside the extended (a special primary) partition number 3.
    – user68186
    May 26, 2020 at 22:37
  • "Filesystem" is your root directory, which shows up as a single slash ( / ) in the output of a { df -a } command.
    – user573739
    May 26, 2020 at 22:43
  • @user68186 what is the difference between an extended and logical and primary partition?
    – Startec
    May 26, 2020 at 22:54
  • Primary partition are the fundamental type of partition. MBR type of partition tables can only hold 4 primary partitions. The extended partition is a special kind of primary partition that can have nothing else but other (logical) partitions inside them. The partition(s) inside the extended partition are called logical partitions. One can have many logical partitions inside an extended partition, thus overcoming the limitation of only 4 primary partitions.
    – user68186
    May 26, 2020 at 23:56

2 Answers 2

9

An Extended Partition is an artifact of MBR 'legacy' disk partitioning, as the MBR system only allows a maximum of four (4) partitions. To have more than four partitions, an Extended Partition is used to hold multiple Logical Partitions.

This was obsoleted by the GPT Partition Table, which removed the cap of four (4) partitions on a disk, but there are still plenty of folks out there with the MBR 'legacy' partition tables, as Windows 7 and earlier versions of Windows defaulted to the MBR 'legacy' partition tables. I suspect that's what I see in your picture above.

BTW, Partition 1 of that drive is a Windows Recovery Partition. It is a Primary Partition, just like the NTFS partition (Partition 2).

For more on filesystems, see this article.

3
  • I liked your answer better than mine. You are the guru! I learn a lot from your posts, but I also try to help when I can.
    – user573739
    May 26, 2020 at 22:35
  • 1
    @K7AAY is switching from MBR to GPT something I can do or is it specific to the hardware?
    – Startec
    May 26, 2020 at 23:01
  • You can do it; it is not hardware specific. But ,it involves 1) Back up everything to an external drive or cloud 2) Verify the backup matched the source files 3) Back up everything to a different external drive or cloud 24) Verify the #2 backup matched the source files. 5) Delete all partitions 6) Create a new partition table with GPT 7) Restore files. Worth it? Up to you, but I would not bother.
    – K7AAY
    May 26, 2020 at 23:08
6

An extended partition is a partition that can be further divided to create additional partitions.

Basically, the extended partition allows you to have more partitions on a physical drive than you could otherwise have.

Here is an example of a disk with five partitions and a link to a definition of an extended partition.

http://www.info.org/extended_partition.html

Disks display of a hard disk with five partitions

$ df -a /dev/sda*
Filesystem     1K-blocks      Used Available Use% Mounted on
udev             3910716         4   3910712   1% /dev
/dev/sda1      493235028  36226812 431930208   8% /
udev             3910716         4   3910712   1% /dev
/dev/sda5      151058636 107940272  35421980  76% /media/stephen/Hitachi72101Ptn5
udev             3910716         4   3910712   1% /dev
/dev/sda7      157554484    609108 148918960   1% /media/stephen/Hitachi72101Ptn7
/dev/sda8      151058636     60884 143301368   1% /media/stephen/Hitachi72101Ptn8
1
  • 1
    @K7AAY posted while I was still typing my answer, but I will leave my answer for the sake of example.
    – user573739
    May 26, 2020 at 22:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .