Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Certain distributions allow you to set up auto defaults which partition the hard drive with "/var" "/swap" "/home"..etc and other distributions only do two other partitions "/swap" "/". I know that I can manually create the partition in the latter example but is there a reason for this.
Does it matter how you have the HD setup hardware wise?
I guess it boils down to your preference. I just use the " / " and /swap . I'm usually adding and removing distros for testing and fewer partitions is what I'm after.
- you don't want to run out of disk space in a particular area
- you want to use a common data area, e.g. /var/data or /home across multiple versions of linux
- you want to keep your /home data safe when reinstalling your system and reformatting all other partitions
- you don't want one area using up all the space that other parts require. e.g. you risk a temporary file from a database crashing your system completely. instead it cdan just fill up it's own partition and fail by itself without impacting the core system.
Sure, there's a reason to do it ... or NOT do it. ;-)
It depends on how you plan to use your system. For a general home system that has no special use planned for it you can easily get by with only / and /swap if that's what you want. It is a simpler setup. Some special uses may make you think differently however. For example, say you're building a MythTV box. This will create huge video recordings that take up lots of disk space. You wouldn't want to be in the middle of recording something and run yourself out of space if all's you had was /. Your recording would have run your entire system out of space - including the Linux OS itself. You would not have a happy computer! On the other hand, if your recordings were going to a seperate mounted filesystem, you'd run the recording itself out of space but not the operating system. Your recording would crash but not your computer.
There are other reasons to have seperate mountpoints as well. Backups are easier to configure. Upgrades are easier. In the case of an upgrade, think what would happen if you decided to move from Fedora, to say Debian. With everything under /, including those 80Gb of MP3 files in your home directory, a move to a different distro would be quite a workout. But if you had planned ahead and mounted /home (and all those MP3's) seperately, it becomes relatively trivial to change distros without having to backup/copy/restore those MP3's.
Personally, I have everything on different mounted partitions. Not exactly true. I have many different physical partitions and disks, but I also use LVM (Logical Volume Management) on top of that for even more flexibility. So my setup is much more complex than just / and /swap. This is my personal choice. I favor flexibility over simplicity for my situation. Multi-boot, multi-purpose, and multi-user (to a small extent). It's also great for learning and experimenting. If you just want something that runs, and you don't have to worry about it, go for just / and /swap (similar to a Windows box with a 300Gb drive and only one big 'ol C: drive!)
it doesn't know, as in it has no idea that it exists at all. once a partition is mounted it is simply another part of the filesystem. /var/lib/pants/blah just so happens to exist on a different location, that's all, it's totally abstracted from a file writing to a certin directory.
Above someone mentioned that a single / was the most fliexible... well... cue LVM. a fnatastic idea that gives you total flexibility of both views, as you cvan move the partition sizes around all you want in an instant.
it doesn't know, as in it has no idea that it exists at all. once a partition is mounted it is simply another part of the filesystem. /var/lib/pants/blah just so happens to exist on a different location, that's all, it's totally abstracted from a file writing to a certin directory.
Above someone mentioned that a single / was the most fliexible... well... cue LVM. a fnatastic idea that gives you total flexibility of both views, as you cvan move the partition sizes around all you want in an instant.
so how do I get the OS to know to put var files in the /var partition during the install.
I think acid_kewpie's answer might be a little confusing, or maybe not. But in case it is, I'll try to clarify what he is saying.
When you create several partitions and mount them, you are telling the OS that, for example, /var is going to be located on that certain partition you created. When you look at your filesystem or directory tree you will not see any sign of multiple partitions but they're there. If you did a 'umount /var' you would still have a /var directory but the files, which are located on that partition you just umounted, will no longer be available.
What all that means is that when the system has mounted, for example, /dev/hda5 at the /var location, everything that is written to /var by your OS will automatically go to /dev/hda5, or whatever your partition happens to be.
I hope that helps.
And just to add my own preference to this discussion, the most flexible partitioning scheme starts with a swap partition, a root (/) partition and a home (/home) partition. That way you can reinstall your OS on the / partition, or add an OS to some other partition or whatever, and still have your home files ready for you. I think having only the root (/) partition is the least desirable scenario.
Last edited by Vincent_Vega; 01-09-2006 at 08:47 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.