[SOLVED] Minumum partitions required to install linux
Linux - GeneralThis 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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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
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.
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
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.
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.
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.
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.
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
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.
To install linus all three partitions will be required.
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.