Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In a nutshell an extended partition ( i.e Ext'd) is a container for logical partitions. It is the means to be able to create more then 4 partitions with a MBR drive. Primary partitions are numbered 1-4 and logical partitions are anything>4.
When hard drives first became available one could only create 4 partitions. To overcome this limitation the primary/logical partition scheme was developed. When you select a primary partition to be an extended partition you can then create addition partitions called logical partitions. An extended partition is not mounted nor does it contain a file system.
To provide some addition confusion since MBR (Master Boot Record) drives are limited <=2TB we now have GPT. GPT also allows one to create more partitions then a MBR drive.
thank you very much for that.
I really want to learn more about logical partition and MBR limitations. So can you please tell me where to read, because i already googled it but didn't find a good source.
since this is my partition table:
Device Boot Start End Blocks Id System
/dev/sda1 * 63 204796619 102398278+ 7 HPFS/NTFS/exFAT
/dev/sda2 204796681 488375999 141789659+ f W95 Ext'd (LBA)
/dev/sda5 204796683 337911209 66557263+ 83 Linux
/dev/sda6 337911273 488375999 75232363+ 7 HPFS/NTFS/exFAT
can i partition /dev/sda5 again to create swap partition without re-installing Linux and keep the Linux in that partition only?
can i partition /dev/sda5 again to create swap partition without re-installing Linux and keep the Linux in that partition only?
I assume you are really asking about sda2 and not sda5. All the space within the extended partition is used. If there were additional free space outside of the extended partition you could either create a primary since 3&4 are not used or expand sda2 and create additional logical partitions. You can add swap space without reinstalling but I suggest adding a swap file which is just as good as a swap partition.
There are different limitations as to the total number partitions based upon the operating system and what linux version you are running. The 4 primary partition limitation is independent of OS, version etc. The latest linux versions due to using SCSI subsystem limit the total partitions to 15.
The bottom line is, as stated, there are exactly four slots in the (vintage ...) "partition table" on sector-0 of the hard drive. To circumvent that restriction, the notion of an "extended partition" was introduced: the first blocks of that partition contain a different, more-extended version of a "partition table" which the hardware-BIOS doesn't have to understand. Operating systems do. The final physical-partition encompasses all of the logical-partitions that have been defined within it.
Linux will detect the partitions (physical and/or extended) and during boot will assign "sdan" or "hdan" identifiers to them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.