I am reading about partitioning in Linux, and I found out that it is not possible to create an "infinite" number of primary partitions, as I had thought. So, why is the maximum number of primary (non-logical) physical partitions 4?
This is not a Linux restriction, it's a restriction of the MBR partition layout. The original MBR spec fit the partition layout into a single 512 byte sector, and there was only room to define four "primary" partitions there. Various nonstandard extensions exist allowing more than four partitions in MBR, but the classical spec only allotted for four.
"Extended boot records" are a fairly common way of extending MBR past its first four primary partitions. One partition entry in the MBR partition table is actually a pointer to another partition table. This second partition table can have a pointer into a third, etc etc, giving, in principle, an unlimited number of extended partitions. However, since these extended partitions are not defined inside the main MBR, they are not primary partitions, and you typically cannot boot from them.
Switching to a more modern standard, such as GPT, removes this restriction -- but may not be compatible with some motherboards and operating systems. For example, Windows does not support EFI, the modern spec underlying GPT, unless you are running a 64-bit operating system.
Its 4. It is a limitation of MBR.
If you want more partitions, you can create three primary and one extended partition.
Inside extended partition, you can create as many logical partitions.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With