Linux partitions and limitations

In recently reading an article on linux basics before I embark and my personal installation project I came across this passage -

IDE drives have three types of partition: primary, logical, and extended. The partition table is located in the master boot record (MBR) of a disk. The MBR is the first sector on the disk, so the partition table is not a very large part of it. This limits the number of primary partitions on a disk to four. When more than four partitions are required, as is often the case, one of the primary partitions must instead become an extended partition. An extended partition is a container for one or more logical partitions. In this way, you can have more than 4 partitions on a drive using the MBR layout.

The MBR layout also limits the maximum size of disk that is supported to approximately two terabytes. The newer GUID Partition Table (or GPT) layout solves this size limitation and also the rather small limitation on the number of partitions. A disk formatted using GPT layout supports up to 128 primary partitions by default and does not use extended or logical partitions. For more information on MBR internals and how the GUID Partition Table (GPT) works, see MBR, EBR, GPT and LVM internals.

So when doing the math it would seem that only a total of 8 partitions 4 primary and the rest extended are allowed on a hdd - is that still the case today with modern SATA hdds -:confused:

I smell old Windows information. I believe almost any device can be formatted as one partition and mounted to LINUX. Physical partitions are just a pain. JFS is nice, where you can dole out space as needed. However, disk is very cheap now, so do not set yourself up for a life as a spoon feeder! Advanced virtual FS also support striping and RAID, so you can multiply your device speed.

First off, it's got nothing to do with SATA or any other kind of controller. All a disk controller does is give you block #972983 when you ask for block #972983, and who cares what it means.

This is how Microsoft partitions work... Linux supports many different partition schemes, not just these, but most PC distributions use these because they tend to be installed alongside Windows on consumer PC's. That, and most consumer PC disk software expects this kind of partition table and won't be able to handle other kinds.

But you're slightly confused. Each of the 4 base partitions can be a primary partition or an extended partition, so you couldn't have 4 primary and one extended. You could have 1 primary ( to boot from ) and 3 extended, each of which can have 4 partitions inside them.

An extended partition can have any number of logical partitions inside it, as logical partitions are just a chain of one partition and a pointer to the next. Not too efficient, though...
If you can afford it, use GPT and/or virtual FS.

A disk may have *only* one extended partition.

You could have 1 primary and up to 4, or 3 primary and 1 extended, or a single extended partition.

An extended partition can also have any number of logical partitions, not just 4. It's not infinite but last time I checked it was limited to something like ~60 for IDE drives and ~250 for SCSI drives assuming there are enough reserved major numbers.

A logical partition can be used as a boot partition too, as long as it's not part of any LVM.

Thanks guys - @verdepollo please correct me if I'm wrong I believe 4 primary and one extended partition are allowed - the maximum number of allowable logical partitions on an extended partition is 32 - however can the logical partitions be used for Linux distributions ?

No, that'd be 5 partitions in total which is not possible.

No, unless you're using a prehistoric kernel.

Seems I was wrong about the ~250 limit though: SCSI disk limitations

I have no idea what you're asking.

Can you boot a Linux distribution such as Slackware from a logical partition within an extended primary partition ?

---------- Post updated at 04:05 PM ---------- Previous update was at 04:01 PM ----------

Or let me put to you this way - using a hdd that with an MBR can you install more then 4 Linux distributions ?

Yes, you can install as many distribution as your disk space allows. It doesn't matter where you put them.

The only constraint is that the boot partition should not be controled by LVM.

Thanks for rephrasing the question.

@verdepollo thank you for your reply - however I'm still a bit confused on this end - you stated that yes I could install as many distributions as my disk allows - that is fine - however can I boot linux and or BSD distributions from extended logical drives residing within a primary drive -

Absolutely. A boot partition may reside in a logical partition (extended partition).

@verdepollo I was watching a u-tube link last night for a compTIA exam & the professor stated in no uncertain terms that there is no real need or reason to know anything about extended logical partitions and that he couldn't understand why they still where required to teach students about them -an incredibly naive and foolish thing to say given your reply just now if you ask me - I did have one more question sir, are you familiar with basic disc and dynamic disc in Microsoft ?

I'm barely familiar with Windows so I cannot really tell. Probably a Microsoft forum would be a better place to ask.