Find the answer to your Linux question:
Results 1 to 7 of 7

Thread: partitioning ?

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    partitioning ?

    question 1
    I am wondering what the difference is between primary partition , extended partition , and logical partition.

    This is what I know
    The mbr contained the partition table which had space for at most 4 possible entries. That means you could at most boot 4 different os on the same harddisk (i.e have 4 different partitions )

    I have recently bought a 1TB hardrive used gpart to partition the drive into about 15 different partitions. How I did that is I put the whole drive as an extended partition and then each partition in the extended partition was a logical partition.
    Then I installed grub and an os on each of the partitions.
    Works great I can boot into any of the 15 or so OS on the same harddrive.

    question 2
    When I was using gpart I noticed the boot flag options that you could set. I didn't play around with these but I am curious what they do for a given partition ?
    some of these flags are named boot , dialog , LVM ,hidden...etc
    They must have some purpose. But never directly had to use them when partitioning???
    Other then these flag options the other possible options in gpart are pretty easy to understand.

    question 3
    Using grub it seems to allow me to boot any type of partition a primary , extended , or logical partition (even have used chainloading to load a os on a different device such as a floppy , cd , or other harddrive.

    I am wondering why one would use one over the other partition?

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Tucson AZ
    An Extended partition is a primary partition. It can not contain any data but can have logical partitions in it which can contain data.

    A windows partition must be marked active to boot. It's boot files must be on a primary partition. This is not necessary with a Linux partition.

    Grub can boot an OS from a primary or logical partition. Since an Extended partition is just a container and doesn't hold any data there is nothing on it to boot.

  3. #3
    Ok if extended partitions are the same as a primary partition.
    Why would one use one over the other?
    ( would the only benifit for useing a extended partition as opposed to a primary partition to beable to boot more then 4 os's on the same harddisk. )

    And is it possible to create more then one primary partition ?
    I think I can create more then one extended partition if primary partition is exactly the same as extend then I should beable to create more then one primary using gpart?

    I think you may have messed up on your explaination.
    I would think since a pimary partition contains data this type of partition would be equivalent to a logical partition in the extend partition?

    Last edited by sam111; 10-02-2011 at 05:32 AM.

  4. $spacer_open
  5. #4
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    I think this WIKI page has a lot of good info you might want to feast your eyes upon.
    Disk partitioning - Wikipedia, the free encyclopedia
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  6. #5
    ok, after reading thru the wiki pages my understanding is
    1) You can have up to 4 primary partitions max. these corospond to the 4 entries in the mbr partition table.
    2) An extended partition contains logical partitions "like a container for the logical/data partitions"
    3) logical partitions contain the filesystem , os , files , folders ,...etc "data"

    what I don't get is
    Can the primary partitions contain logical , or extended partitions ?
    Or is the extended partitions only the partitions that contain logical partitions.
    Seems to me if extended partitions are the same as primary partitions then what is the filesystem/data on the primary partition called if the data on the extended partiton is called logical partition ?

    Question 2
    Is their any limit in the number of extend partitions you can create on a harddrive?
    Is their any limit in the number of logical partitions you can create in a given extended partition ?

  7. #6
    Linux Newbie BoDiddley's Avatar
    Join Date
    Oct 2010
    Plainfield, New Jersey
    You should think of a partition as a file system. Ext is a different files system than NTFS or Reiser. They all become primary partitions.

  8. #7
    Ok, I have one more question.
    I am wondering what gpart / other partitioning programs do/write out to the harddrive while creating a partition.

    For example when I create a primary partition with gpart does all it do is go to the partition table in the mbr and place an entry for that partition in their. (i.e place a 16 byte partition entry in the partition table of the mbr telling where the starting LBA is , how many sectors the partition contains ,...etc etc)

    Or is their more to creating a primary partition.

    If that is the case then to delete a primary partition all you would have to do is go into the partition table and delete the entry. To resize all you would have to do is modify the number of CHS/LBA sectors part in the 16byte partition entry.

    Just curious if anybody knows what physically gets written out to the HDD when creating a primary partition. ( believe it is just in the partition table of the mbr thats it but I could be wrong )
    I know after the partition is created you need to create the filesystem in this region that the partition occupies but usually gpart are the os installing does this for you not interested in how the filesystem is created just the partitions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts