Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 10-14-2010, 01:16 AM   #1
LQ Newbie
Registered: Sep 2010
Posts: 15

Rep: Reputation: 0
Partitioning Question: Primary and Extended

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:

/ - 10G
swap - 1G
/var - 4G
/tmp - 6G
/home - 2G
/boot - 100 MB

Is there a certain order to create these? Does it matter which ones are primary partitions and which one are part of extended partitions?
Old 10-14-2010, 02:02 AM   #2
LQ Newbie
Registered: Jul 2005
Distribution: Debian
Posts: 20

Rep: Reputation: 2
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
Old 10-14-2010, 02:18 AM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,106

Rep: Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615Reputation: 2615
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).
Old 10-14-2010, 12:47 PM   #4
LQ Newbie
Registered: Sep 2010
Posts: 15

Original Poster
Rep: Reputation: 0
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?
Old 10-14-2010, 01:59 PM   #5
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
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.

Last edited by johnsfine; 10-14-2010 at 02:01 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Partitioning.. Primary and Extended. CT_0000 Linux - Newbie 5 11-13-2009 04:13 PM
Partitioning; safe to add a primary when already having primary and extended/logical? Wim Sturkenboom Linux - General 2 08-16-2009 12:10 PM
primary and extended partitions nwtlnxqstns Linux - Newbie 4 10-13-2008 01:40 PM
Primary or Extended Partition ? Christof999 Linux - General 4 07-02-2006 12:05 PM
Primary and Extended Partitions Flossie Linux - Newbie 2 03-16-2004 12:25 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:50 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration