[SOLVED] Partitioning Question: Primary and Extended
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
I am installing opensuse on my laptop. Dual boot with Windows 7. Two partitions are already taken by windows. I am confused about extended partitions. I know I will need one because I can only have 4 primary partitions.
Here are the partitions I want:
it's suggested to create /boot as a primary partition in ext3 format, others (/, /home/, /var, /usr, etc) in extended partitions. since the disk spaces for linux is limited, it's not necessary to have separate /var, /tmp partitions. the partitions could be:
/boot: 100 MB, primary partition, ext3
/: 10 G, extended partition, ext3
/home: all left spaces, extended partition, ext3, ext4 or reiserfs
/swap: 1 G, extended partition
Those would be logical partitions - the extended (singular) is merely a container for them. It is just a "hack" to get around the 4 primary partition limitation that is inherited by Linux and Windows from MS-DOS.
Linux has no requirement for any primary partition(s) - all (including /boot) can be logical. Presuming the laptop (the BIOS actually) is less than say 5 years old, there should be no concerns with order/placement of any partition(s).
Thanks for your help with this. I was told the reason to put /tmp and /var in their own partition is if a log or spool file got to big it could cause problems. Same with /tmp. It this something I shouldn't be worried about?
If you have an extended partition, you can have up to three primary partitions in addition to the extended partition. The extended partition can contain several logical partitions. Linux does not care at all which partitions are primary vs. logical.
(Whether you call the extended partition a fourth "primary" partition is an uninteresting terminology question. The partitions you can use are three primary plus several logical).
I generally advise against splitting out any partition other than swap. If you don't have a very good understanding of why you are splitting something out, you probably have even less understanding of how much to give each side of that split and you are doing more harm than good by making the split.
I think /tmp works better as a tmpfs rather than as either a partition or a directory within the / partition. But if /tmp is a tmpfs, be sure to include that space when computing the required size of swap. A tmpfs will cause the kernel to intelligently decide which parts of /tmp are in ram vs. swap, as opposed to a partition or directory in / for which the disk copy is quickly mandatory for any page, even if the cache also keeps the ram copy. For /tmp files that are soon deleted by their clients, a tmpfs avoids ever writing out the files or their directory entries.
If you are creating a multi user system and/or an unattended server, then you may need to prioritize the possibilities of running out of disk space. That may require splitting out /var or other directories. But doing that right is probably too hard and doing it wrong is worse than not doing it. For an attended workstation Linux, there should be no reason to do advance work to prioritize the response to running out of disk space. If/when your disk is nearly full, you will want to decide what to delete.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.