Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to know how many Primary and Extended Partitions I can create on a x86_64 PC with Linux running on it?


Update :
If there is a limit to the number of partitions, why is that the limit?

share|improve this question

4 Answers 4

up vote 7 down vote accepted

The limitation is due to the original BIOS design. At that time, people weren't thinking more than four different OSes would be installed on a single disk. There was also a misunderstanding of the standard by OS implementors, notably Microsoft and Linux which erroneously map file systems with (primary) partitions instead of subdividing their own partition in slices like BSD and Solaris which was the original intended goal.

The maximum number of logical partitions is unlimited by the standard but the number of reachable ones depends on the OS. Windows is limited by the number of letters in the alphabet, Linux used to have 63 slots with the IDE driver (hda1 to hda63) but modern releases standardize on the sd drivers which supports by default 15 slots (sda1 to sda15). By some tuning, this limit can be overcome but might confuse tools (see http://www.justlinux.com/forum/showthread.php?t=152404 )

In any case, this is becoming history with EFI/GPT. Recent Linuxes support GPT with which you can have 128 partitions by default. To fully use large disks (2TB and more) you'll need GPT anyway.

share|improve this answer
    
I believe you only need GPT if the partition /boot is on is greater than 2TB. / should be able to be larger than 2TB since the kernel mounts it rather than the bootloader. –  jonescb Jan 12 '11 at 15:16
    
How would the non /boot partitions be defined ? –  jlliagre Jan 12 '11 at 15:38
    
There was also a misunderstanding of the standard by OS implementors, notably Microsoft and Linux which erroneously map file systems with (primary) partitions instead of subdividing their own partition in slices like BSD and Solaris which was the original intended goal. I dint understand this. Could you please elaborate on this? –  Sen Jan 12 '11 at 17:12
1  
@Sen: the original goal was that each OS would use a single partition, and if an OS wanted more than one filesystem, it would divide the partition into slices. But Linux (originally) and Windows use separate partitions for each filesystem. –  Gilles Jan 12 '11 at 21:17

4 primary partitions or alternatively 3 primary partitions and an extended partition.

the extended partition can be subdivided into multiple logical partitions

share|improve this answer
1  
Do you how many logical partitions that would be? –  Johan Jan 12 '11 at 14:24
    
@Johan: The format doesn't impose any limitation, but most OSes do have one. See jlliagre's answer. –  Gilles Jan 12 '11 at 21:14

Sen, in response to @jlliagre, it should be noted that some operating systems will create a single partition, but essentially create sub-partitions within that space.

It is analogous, but not equal, to doing:

 parted rm 1 /dev/sda
 ...
 parted rm 7 /dev/sda
 parted mkpart primary $start $end /dev/sda
 parted mkpart primary $start1 $end1 /dev/sda1

You could then use kpartx to access these sub-partitions:

 kpartx -a /dev/sda1

The sub-partition(s) would appear as:

 /dev/sda1p1

Of course, this isn't how FreeBSD and similar systems do their slicing, exactly, but it is essentially the same thing.

share|improve this answer
    
Indeed. I didn't wrote nobody followed the intended goal, just that two mainstream OSes didn't, at least originally. The IBM PC-AT introduced the extended partition standard which was limiting the damage. Modern OSes like those using volume managers or even better, ZFS, no more demand a one to one relationship between file systems and partitions. –  jlliagre Jan 12 '11 at 21:41

You can use LVM and create all the crazy partitions you wish.

share|improve this answer
1  
You cannot create partitions with LVM. LVM is a form of storage virtualization, which is more flexible than conventional partitioning schemes. It manages logical volumes, i.e. logical storage devices, which may span multiple physical volumes, e.g. hard disks or hard disk partitions. –  Thomas Nyman Oct 16 '13 at 15:39
1  
This does not answer the question(s) posed by @Sen. –  Timothy Martin Oct 16 '13 at 19:26

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.