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.
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.
I have bought a 200GB hard drive to replace my old 20GB drive. Given this amount of space that I now have, I want to establish an optimal partitioning scheme, given my intentions described below:
I want to load up a couple of distros to play around with (e.g. Ubuntu, Debian, and FreeBSD) although my primary is and will be Slackware. I will be having a separate /, swap, and /home partitioning scheme, and was thinking of partitioning for /var, /opt, and /etc.
What are people's thoughts, and rough appproximations of size. I am running 500MB of RAM, so the SWAP space will be about 600MB I was thinking (unless there are other suggestions?), but any thoughts about this scheme?
I would recommend looking into LVM ("Logical Volume Management") so you DON'T have to guess all your partition sizes correctly up front (which is an impossible task in my experience). Simply adjust them later as needed.
You didn't say what your intentions were either. "I'll be installing Slackware, Debian, Ubuntu, FreeBSD..." are not intentions. What do you plan to use these distros for? A multi-user system? A webserver? A code development environment? A GUI desktop for web surfing and email? These types of things are closer to "intentions" whereby somebody might make a partitioning scheme recommendation.
But I'd still opt for the LVM setup myself. More flexibility to define or change your intentions at a later date.
Read up on LVM at http://www.tldp.org/HOWTO/LVM-HOWTO/ Be sure and read the section 2 part that covers "benefits". I think it will match your needs. And since you are asking these partitioning questions up front BEFORE you run yourself into trouble, that indicates to me that you have the knowledge and mindset so that LVM will not place any undo administrative burdens on you.
Thanks for the reply haertig. My intentions are to run a single user, networked to a LAN desktop-cum-workstation. The usage of all those distros is to experiment with them for fun and experience.
I think that my question was to ascertain (a) what partition usage would be wise to allow me to load these different distros' (for example - does FreeBSD and Debian all use /etc or do they need entirely different partitions because they are different distros) and (b) given the amount of space, most of which will be going to /home, are there any other factors I should takew into account when dividing up the drive. I will look at the reference you suggest, and maybe the answers to my queries will be there. But, if in the interim someone wants to take a stab at replying that would also be useful: more info is better than less.
Hi syg00. Thanks for replying. I don't know what suspend2 is, nor how to use it? Is it something that is recommended for drives this size or for having multiple distros loaded?
I can't really see too many problems sharing swap. I presume that if I lay out the partition scheme like this, then I should be okay?
/, swap, /home, /etc, /var, /opt, /tmp
I take your point about not allocating all of the drive so that I can use it in the future. In truth though, I will probably allocate the balance to /home with about 30GB to / and 20GB to /opt and 1 or 2 GB to /etc, /tmp, and /var
My question still remains though: if these partitions are allocated as described, can/will other distros use these or will each distro require its own partition scheme. I am pretty certain that they won't, but am unsure about FreeBSD's requirements. Does anyone have any experience dual booting a Linux distro and FreeBSD?
You could have different distro's share /home, /tmp and swap. Anything more than that could get downright dangerous. You might be able to share /boot as well, but you might have to do some manual work/repair if different distro's stomped on each other (grub config files come to mind as a possible conflict).
p.s. - any non-standard filesystem could be shared between distros as well. Say /music or /photos or something like that.
Dude! Do *NOT* put /etc on a seperate partition. Think about it: where is your fstab file that tells the kernel where to mount your other partitions? In /etc. So how is the kernel going to read this file when only '/' is mounted? It's not, and you will have a borked system...
Now, as to your orig. question, my setup is almost exactly what you want to do: FreeBSD will need a seperate partition from which you can create BSD 'slices' in. I used 20GB for this, and it is plenty of room to play around with FreeBSD, even with Ports installed.
As for different Linux installs, you can safely share swap between them, and /home is possible too, as long as you ensure your user's UID is the same on all installs (some default to 500, some to 1000 for first available user UID). I recommend sharing /boot as well. Make it /dev/hda1 and put all your kernels from all distros there (ie: vmlinuz-slack, vmlinuz-ubuntu etc etc...
Only install a bootloader (I strongly recommend grub) during your first 'main' install. When you install another distro simply add a menu item to grub.conf to boot the new install...
Thanks for the heads' up guys re: a separate /etc partition!!! That hadn't even occurred to me. You saved my proverbial bacon I don't have to load FreeBSD onto the same drive so if that becomes too problematic then that would be the one I'd drop, and I can always look at loading that onto a spare machine once I have successfully installed the new HDD and transferred the data over from my old, smaller HDD.
The idea of having a mount point for /music is actually a good idea and was one that I considered but then discarded thinking that it wasn't feasible. But Bulliver, you are suggesting that not only is it feasible, but even desirable. I'll give that some thought then. Thanks for the tip re: UID - I have fallen foul of that before when trying to get NFS to work!!!
Well, looks like the next step then is to just do it, so that is part of the project I'll be doing at the end of the month when I have a four day weekend.
The idea of having a mount point for /music is actually a good idea...
When I mentioned /music earlier, that was just an example. If you really want to do this, you might consider putting things like this under a different mountpoint more in line with filesystem standards. For example, something you might be "serving up to other computers" would fit better under /srv, per the FHS ("Filesystem Hierarchy Standard"). Find some docs on FHS here -> http://www.pathname.com/fhs/
I have seperate mountpoints of /srv/music (ext3), /srv/photography (ext3), /srv/videos (xfs), /srv/backups (ext3), and /srv/shared_data (ext3) that I share with other computers. /srv/backups is not normally mounted ... only during backups or restores. Those other computers accessing this data are running Windows, so I share via Samba rather than NFS.
When I mentioned /music earlier, that was just an example. If you really want to do this, you might consider putting things like this under a different mountpoint more in line with filesystem standards.
Yeah, you could do that, or just put it wherever is easiest for you. I think a strict interpretation of the FHS would want music files in /srv but since this is a non-standard directory anyway all bets are off.
I have my media files mounted via NFS at /home/music on all my computers, including the computer they actually reside on. This way, path specific things such as playlists still work no matter what computer I am using them on.