LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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



Reply
 
Search this Thread
Old 02-27-2010, 01:17 AM   #1
pix9
Member
 
Registered: Jan 2010
Location: Kalyan, Mumbai, Maharashtra, India
Distribution: Red Hat (RHEL 6.0)
Posts: 141

Rep: Reputation: 19
Question Minumum partitions required to install linux


hello friends,
I have one doubt regarding minimum partition required to install linux O/S to the best of my knowledge, "/", "swap" & "/boot" are the essential partitions required for installing Linux, but i think linux should also work without "swap". please suggest or correct me if I am wrong
thank you
 
Old 02-27-2010, 01:59 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
You are correct up to a point. The minimum partition needed to run gnu/linux is one - the root partition.

There is some flexability gained in having a separate boot partition - not to be confused with /boot which is a directory - though we often lazily name partitions by their customary mount-points. (It doesn't normally matter - context usually makes it clear.)

To install gnu/linux is two - a root and a swap. Most installers (all the major ones) will insist you designate at least a token swap partition. You need a swap partition if you use memory-hungry programs (that is, hungry by comparison to the amount of memory you have). In general, if you have less that 1gig of ram, you should have a swap partition. You also need swap if you want to be able to hibernate your computer. Hibernation is the main reason for large (> 1gig) swap. If you have loads of ram, you may have some advantage in setting swappiness to a low number like zero.

How many partitions you actually use depends on how you want to set the system up. For eg - for an encrypted system you want three - boot, root, and swap. You want swap inside the encrypted LVM volume. Some people encrypt the entire drive and put boot on a usb keydrive.

A user may want to preserve their desktop between upgrades - and so put their /home directory on its own partition - possibly on another computer. There are also setupt with /usr and /var on their own partitions - which allows simple resizing when you run out of space. It is getting unusual to se these things now - HDDs are just so cheap.
 
1 members found this post helpful.
Old 02-27-2010, 04:35 AM   #3
pix9
Member
 
Registered: Jan 2010
Location: Kalyan, Mumbai, Maharashtra, India
Distribution: Red Hat (RHEL 6.0)
Posts: 141

Original Poster
Rep: Reputation: 19
thank you for you reply,
till now every time I have installed linux with at-least 3 partitions that is "root file system" then other for boot and third is swap" this time I will try installing it with skipping boot and swap

thank you!!
pix
 
Old 02-27-2010, 07:51 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
For simplicity, I just have a single root partition and a swap partition. So /boot is not necessary.
 
Old 02-27-2010, 08:10 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
I always create a separate partition for /home
When you need to reinstall, you can reuse the /home partition.
 
Old 02-27-2010, 08:57 AM   #6
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
Quote:
To install gnu/linux is two - a root and a swap. Most installers (all the major ones) will insist you designate at least a token swap partition.
Do most installers really force you to have swap? That's obnoxious. I don't use swap on my netbook to reduce writes to the SSD drive, but I've only ever had Arch on there.
 
Old 02-27-2010, 09:30 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
FORCE you to have swap?? No----they might encourage it because it is a good idea.

for reasonably large RAM (eg 1GB or more), just set swap = RAM size and forget it. One reason might be that hibernate (suspend to disk) uses the swap space (IIRC)

I can't speak to having no swap to save SSD writes but: "If it works, it's OK."
 
Old 02-27-2010, 09:44 AM   #8
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
Quote:
I can't speak to having no swap to save SSD writes but: "If it works, it's OK."
It's the recommendation in the Arch Wiki for the Aspire One and Eee PC, plus a number of other places around the web. My Dell Mini has 1 GB of RAM and I usually only use ~100MB, so it seems unnecessary regardless. And I never use sleep/hibernate. It boots in <20 seconds, so doesn't seem worth the bother.
 
Old 02-27-2010, 11:20 AM   #9
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
Originally Posted by pixellany View Post
FORCE you to have swap?? No----they might encourage it because it is a good idea.
The ubuntu and fedora installers will not pass the partitioning stage unless you have specified a swap partition. (Last tried Ubuntu 9.10 and fedora 10.) I understand OpenSUSE and RHEL are the same. Give it a go.

Redhat has always preferred to have a separate boot partition as well, so that is standard on their installs, with LVM.

Way back, FC6(?) had a bug in the installer which mangled the swap file entry in fstab - I was running swapless for ages and only half a gig ram. Didn't notice a thing. More recently, on the aspire 4315, hibernate did not work because swap was disabled in the oem install.

swap is something you can adjust after the install - if you seem to be using a lot then add a swap file.

swappiness is subject to some debate though.
http://kerneltrap.org/node/3000

The whole "how to partition" thing ends up quite personal. For newcomers, eg at installfests, I just stick to the default scheme for the distro with the exception of redhat/fedora because I don't like troubleshooting lvm, and I don't trust redhats upgrade method (so I set a separate home partition and tell the user to clean install each time). But that's me.
 
Old 02-27-2010, 05:42 PM   #10
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,229

Rep: Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825Reputation: 825
Quote:
Originally Posted by Simon Bridge View Post
Redhat has always preferred to have a separate boot partition as well, so that is standard on their installs, with LVM.
Actually, if you use LVM /boot is essential. Whether LVM is worth the trouble, other than on a server, is another question!
 
Old 02-28-2010, 07:05 AM   #11
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 3,919

Rep: Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779Reputation: 779
Quote:
Originally Posted by pix9 View Post
to the best of my knowledge, "/", "swap" & "/boot" are the essential partitions required for installing Linux, but i think linux should also work without "swap".
If you have enough ram and if you don't use hibernate, swap will not be essential (although I'd still want to have at least a small amount of swap available). Embedded Linux more often has no swap, but that deals with what is, in essence, a workload that can be predicted at build time.

Even if you want swap, you can use a swap file; these days Andrew Morton claims that it does not have the speed disadvantages that it used to, but most people (99%++) still use a swap partition; perhaps due to the fact that it is unclear what operational advantages a swap file might have, apart from reducing the almost arbitrary 'number of partitions' metric.

So you can use a few as one partition (actually, you can use zero, but that's not what you meant), but, for a sensible set-up you probably shouldn't.
 
Old 03-01-2010, 08:57 AM   #12
Stalwart1
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
To install linus all three partitions will be required. the '/' boot is needed to hold the GRUB and booting files (if I am not wrong) and the boot partion is for general usage.

However on the issue of swap it is essentially important especially when you are running processes that require a lot of RAM. The basic rule of the swap partition creation is to have it twice the size of the RAM i.e. for a machine with 2GB RAM the swap size should be 4GB and so on and so forth. The swap is important because if the machine finds it self in a situations where by various resource consuming processes are on going it can temporarily relocate the process at the swap space untill the process that is currentl using the RAM finishes. Then the process that was in the swap space is allocated the RAM.

This is mainly done for resource consuming processes and it prevents processe from being stopped due to lack of memory

Hope this helps
 
Old 03-01-2010, 01:44 PM   #13
adiehl
LQ Newbie
 
Registered: Nov 2006
Location: Mannheim, Germany
Distribution: Debian & Ubuntu
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by Stalwart1 View Post
the '/' boot is needed to hold the GRUB
No, you don't need a special /boot partition for grub.

This was formerly needed by LILO because older versions didn't support LBA-mode and because of this the kernel had to be in the first 1024 cylinders of the disk. To ensure this, one created a boot-partition in this area, separated from the root-filesystem.
Most modern boot-loaders support filesystems and lba-mode, so a separate boot-partition is obsolete.
 
Old 03-01-2010, 11:45 PM   #14
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
To install linus all three partitions will be required.
(my emphasis)
I am sure that Linus will be surprised to find instructions to insert him into a computer - at least, from this direction. I think we can expect him to resist any attempt to partition him in three.

Note - you do need all three (boot root and swap) to run a complete gnu/linux distribution. But they do not need to be on separate disk partitions. / and /boot are just directories in the file tree, while swap can be a file. However, swap is optional - there are many conditions in which the distributions runs quite well without it.

A seperate boot partition is not obsolete either - it is used with luks+LVM encryption.
IIRC: the old grub could not boot off LVM or RAID, so a seperate boot partition was needed there too.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are Partitions Really Required -- Specifically When Multipathing is Used xadamz23 Linux - General 1 08-21-2009 12:25 PM
What Partitions are required prakash.akumalla Linux - Newbie 9 07-10-2008 12:14 AM
partitions required and their sizes?? andrewf8 Linux - General 3 12-30-2005 04:37 AM
What is minumum memory and processor required for Redhat 9 pls meadensi Linux - Hardware 1 02-09-2005 11:26 AM


All times are GMT -5. The time now is 10:55 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration