LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-07-2010, 07:15 AM   #1
nee_rajdelhi
LQ Newbie
 
Registered: Mar 2010
Location: Delhi
Posts: 12

Rep: Reputation: 0
Partition in linux


How many default partition would be created, when Linux OS to be installed?
 
Old 11-07-2010, 07:53 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,476

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
Generally, you only need two: root (/) and swap; however, you can make your life a little easier if you have additional partitions, say /home and /usr/local.

If you create partitions for /home and /usr/local you can, when there is an update of your distribution software (or if you decide to install a different distribution entirely), instruct the installation utility to not format those partitions (thus saving your user accounts and any "local" software you may have added over time). This is not to say that you can or should ignore backing-up your /home or /usr/local tree before installing or updating, but it can save you a lot of time and trouble when installing a new distribution version and the like.

By this same logic, if you're using data base(s) -- MySQL, PostgreSQL, etc. -- you can create a partition for the data bases; e.g., /var/lib/mysql. Too, some additional software packages -- Adobe Reader, GoogleEarth and OpenOffice.org -- get installed in /opt. Might not be a bad idea to make a partition for that.

As you go along, you're most likely going to be downloading and adding a lot of stuff to your system and it's not a bad idea to use partitions to store that stuff (and then not format those partitions on an update or new installation) so you don't have to burn it off on CD-ROM, DVD, network storage or whatever then read it back in (or, shudder, re-download all that again). Just something to think about -- data bases can be multi-gigabyte sizes and that won't fit on a DVD. You may also want to consider RAID (if you've got space for a second drive) or an external hard drive for backup.

Hope this helps some.
 
1 members found this post helpful.
Old 11-09-2010, 10:56 AM   #3
dougunder
LQ Newbie
 
Registered: Nov 2010
Location: Massachusetts
Distribution: gentoo
Posts: 8

Rep: Reputation: 0
It's up to you, you can have one partition or 50

personally I use
/boot (round 100m)
/ (15g)
/home (what is left)

I don't use swap when i have 2g+ ram. Although I don't use a database and stick to a lightweight desktop. If unsure give 512m+ to a swap partition

I'm not sure what is default as i always do it manually. I defiantly recommend a separate home, so if you reinstall/change distro you are free to format /

When you do the install it should let you view the changes before their applied if you choose auto or the like. If it's already installed run cfdisk in the terminal to see the partition table.
 
Old 11-09-2010, 02:28 PM   #4
Dralnu
Member
 
Registered: Jul 2005
Posts: 335

Rep: Reputation: Disabled
Quote:
Originally Posted by tronayne View Post
You may also want to consider RAID (if you've got space for a second drive) or an external hard drive for backup.
Just some clarification. RAID is NOT A BACKUP. It helps avoid hardware faults and/or improve performance but it has not, is not, and never will be a backup. Just wanting to make sure someone doesn't think that this is the case.

Anyways, you only have to have a root partition. You can live without swap given enough RAM though I would suggest about 1G swap in case a program goes wrong, otherwise the amount of swap you need will vary.

Generally, I think /(root) and /home are suggested for the reasons tronayne listed. There are other reasons to go into more complex partitioning schemes, but generally speaking that is something you will develop as you learn more and run into problems.

One partition worth mentioning, however, is /var/log. In case of an error, a logfile could potentially fill a partition. This kind of problem can occure anywhere, however, but it is (imo) worth noting.
 
Old 11-09-2010, 03:55 PM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,476

Rep: Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020Reputation: 1020
Quote:
Just some clarification. RAID is NOT A BACKUP. It helps avoid hardware faults and/or improve performance but it has not, is not, and never will be a backup. Just wanting to make sure someone doesn't think that this is the case.
Well, yeah: that "or" should be "and."
 
Old 11-09-2010, 04:27 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
from reading this users 4 posts
PLEASE ban the user !!!!
 
Old 11-11-2010, 01:37 PM   #7
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Arrow

Quote:
Originally Posted by nee_rajdelhi View Post
How many default partition would be created, when Linux OS to be installed?
As far as I can understand Arch, it needs at least
- /boot
- /
- swap

Swap can always be a file, not a partition. But it's better to make it as a partition.

Last edited by Mr. Alex; 11-11-2010 at 01:39 PM.
 
Old 11-12-2010, 04:53 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Moved: This thread is more suitable in Linux Newbie and has been moved accordingly to help your thread get the exposure it deserves.
 
Old 11-12-2010, 07:50 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Quote:
Originally Posted by John VV View Post
from reading this users 4 posts
PLEASE ban the user !!!!
And the reason to ban the OP is?

I read all 4 threads, the only thing I found objectionable was that most of the queries could have been answered via Search. Loads of newbies make this mistake.
 
Old 11-12-2010, 07:57 AM   #10
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Hi there,

As most of the other posters have stated its a very personal choice.

On most systems you must have a /(root) and swap partition.

I personally do it this way:

1. Roughly 1/3 of your HDD to /
2. Max 4GB swap
3. 300-500MB /boot
4. Rest of the drive created as a LVM Physical Volume for use post installation.

I find this works for me and gives me the flexibility I require for my development, software, music etcetera.
 
Old 11-12-2010, 10:19 PM   #11
saia
LQ Newbie
 
Registered: Dec 2009
Location: Yogyakarta
Distribution: openSuSE
Posts: 11
Blog Entries: 3

Rep: Reputation: 0
I often use the partition configuration as follows (in simple form):
o> / (root)
0> /boot
o> /home -> for personal data
o> swap
o> /data -> for shared data with Windows users. Can also be included in the /home partition so that it becomes /home/data. Perhaps the name may be different such as "shared", or whatever it is.

I also use LVM to facilitate the addition of hard drives.
 
Old 11-13-2010, 02:21 AM   #12
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Hi Nee;

You've had several good answers, here's another to keep in mind for the future when you are more comfortable in linux. I like to test different distros so have an unusual partitioning scheme for that purpose.

Partition Size Mount Point Type

/dev/sda1 40G /windoze_7 NTFS
/dev/sda2 15 /shared-win NTFS
/dev/sda3 41.9G / (BSD or other *nix) ext3
/dev/sda4 400G Extended W95 Ext'd (LBA)
/dev/sda5 342M /boot ext3 <<<<<<<<< common GRUB
/dev/sda6 4 G swap swap
/dev/sda7 20 /downloads ext3
/dev/sda8 9.9G /source ext3
/dev/sda9 49G /temp ext3
/dev/sda10 31G /--SUSE_11.4 (testing) ext3
/dev/sda11 29G /--SUSE_11.3 ext3
/dev/sda12 7.7 /opt ext3
/dev/sda13 218G /Common ext3 <<<<<<<<< common to all distros

I leave /home under each distros root (/) directory due to variations between distros with softlinks from the data directories (documents, music, videos, pictures, etc.) to those directories in /Common.

Understand that I occasionally run into problems when trying a new distro but have the experience/knowledge to solve most problems or know what to ask. I don't recommend using this scheme until you have knowledge and are comfortable using terminal/commend-line.

Tom
 
Old 11-13-2010, 08:08 AM   #13
metropoliscomputer
LQ Newbie
 
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
I would create 7 partitions

I recommend to create different partitions, because if you have just one partition, it can fill up without control, and you will run out space quickly, and your Linux will became unstable.

I would create different partitions for:

/home
/etc
/usr
/var
/tmp
/backup
swap
 
Old 11-13-2010, 09:50 AM   #14
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Quote:
Originally Posted by metropoliscomputer View Post
I recommend to create different partitions, because if you have just one partition, it can fill up without control, and you will run out space quickly, and your Linux will became unstable.

I would create different partitions for:

/home
/etc
/usr
/var
/tmp
/backup
swap
What's the benefit of a partition for '/etc'?

Where's your '/'?

I agree that you will have less problems with creating separate partitions for;

'/'
'/boot'
'/usr'
'/var'
'/tmp'
'/home'

Space allocations can be a personal thing for most partition schemes. A user should be sure to allocate enough working space for the basic '/'. Your '/boot' will depend on how you are using the machine and the number of kernels you wish to maintain. If you fetch or install a lot then the '/usr' or even a '/opt' will dictate the required space. '/var' space will prevent a overrun with logs. '/tmp' size will be dictated by system use.

Of course the '/home' will depend on users and usage.
I suggest that the OP do a Search here on LQ as this subject has been addressed so many times.
 
Old 11-19-2010, 05:47 PM   #15
nycace36
Member
 
Registered: Feb 2004
Location: SFBayArea, CA
Distribution: Debian-based, Slackware 10x+
Posts: 150

Rep: Reputation: 15
IMHO, it all gets back to how much free diskspace is available and how much physical memory (pRAM) is installed.

- With 2.0GB to 6.0GB of free diskspace having pRAM up to 128MB, then
no /boot ...that's right! /boot can be in the /(root) filesystem!
/(root)
swap of 2-2.5 times the pRAM ...need as much swapspace as possible in such memory-constrained systems!

- With 6.0GB to 10.0GB having pRAM up to 256MB, then
very small /boot of less than 20MB
/(root)
swap of 1.5-2 x pRAM
small /home of maybe 400MB-800MB

- With 10GB up to 20GB freespace having pRAM from 256MB-512MB, then
/boot up to 100MB , as dougunder suggests
/(root)
swap of 1.5 x pRAM
generous size /home of 2.0GB or more

Any system with more than 20GB freespace having pRAM 512MB or greater should then seriously consider all the other split-filesystem partitioning schemes already mentioned here.
 
  


Reply


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
tricky backup of Linux system to NTFS partition to increase partition size Pandarsson Linux - General 5 07-09-2008 03:35 PM
I am using windows and linux i one partition now ia m awnt remove the linux partition sathish80 Linux - Newbie 2 01-23-2006 11:55 PM
Deleted ntfs partition - added linux partition in its place - corrupt! eklhad Linux From Scratch 2 06-28-2005 02:31 AM
How to add new partition before Linux partition in an existing Linux box? ashutosh Linux - Software 3 04-23-2002 04:26 AM


All times are GMT -5. The time now is 02:13 PM.

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