SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Can somebody please enlighten me on the benefits of having separate partition for 'everything-under-the-sun', /boot, /home, /var, /tmp, /whatever.
I just don't get it.
Admittedly, I have been a distro-hoe in the past - can you imagine having 3 (or more) different distros on a single disk - and then having several partitions for each distro? Must be a real nightmare!!
I know several people prefer a common /home - eeeek - there is nothing that will bring you more grief than having .config-files clobbering each other - or trying desperately to recover from some quaint settings ... IMHO - dot-files in general should not be assumed to be general/universal - but then, I might well be wrong - in which case, do tell me!
OK - let me tell you what _I_ do (and I do have some experience ...).
My partitions look like this:
#1: 128MB, ext2, 'grub-partition' (legacy grub to boot all other partitions via chainloader)
#2: common swap partition
#3: 20GB, 1st linux - all including (ie no seperate mountpoint)
#5: 20GB, 2nd linux - all including
#6: 20GB, 3rd linux - all including
#n: remainder, usually mounted as /work under all linuces ...
For each 'user' under the different linuces, I link Documents, Downloads,Music,Pictures,Public,Templates,Videos to the same directories under /work/users/ or /work/<username>/ (generally, there is only 'myself' as a user anyway)
Unless you are a fanatic and want to shave as many secs as you can from booting and running - heck, what is it that most people do? They write letters, email, connect to the internet, whatever, ... so what does it matter if it takes some msecs more or less? Usually, your 'limit' or constraints will be your internet connection - and that doesn't worry about msecs ...
Here's a li'l example of one of my 'menu.lst' on the first partition:
title [sda3]: slackware-14.1
title [sda5]: slackware-14.0
title [sda6]: solydx
title [sda7]: centos-6.4
ie for every distro I try/use, I install the boot-loader on the first sector of the root filesystem - that way I don't have to worry about the all-encompassing grub2 that wants to be on the 'mbr'. If I can't install to the root filesystem - I'm not interested - its not worth my while.
So - this is _my_ way of being a distro-hoe - and it works perfectly for _me_. I would still like to know what others think, what I can do to improve upon it, etc etc
Thank yall for reading this!
Guess I should mark this as 'solved' - but plueeeze to feel free to post as much as you want - I'll still be reading it! ;-)
It gets complicated with more than two distros. When I was distro hopping I didn't use more than two at once, because it got complicated.
You don't have to install a bootloader more than once. You just have to register a new entry with it. So, if you already installed GRUB with one of them, keep it, and just add an entry for your new distro.
That's the system that I use every day. I used to have several reiserfs partitions, but they were starting to lock up the system at shutdown.
Some of those partitions were left-overs from when I used physical partitions (the /spare/XX crud) that I haven't bothered to align to any type of standard. The /newhome and /newroot crud was from upgrades back in the single-digit Slackware days.
dh2k wrote an excellent set of reasons. I'll add that with logical volumes, you can decide how much room that you want to give anything. (And it's really easy to make those volumes come and go.) That /var/lib/pgsql partition is currently set to 2G. If one of my databases starts to grow beyond the size that I thought it should be, it will not be able to effect the rest of my system. Ditto for the mongoDB that I've got running. Ditto for my virtual machines whose disk images live in /var/lib/libvirt.
My day job is software development and I use this machine for some of that. I find it useful and (frankly) really neat to be able to do this. If you don't have a use for it and find it to be a real PITA, then don't do it.
Much of the practice of putting other directories, such as /var and /tmp, on separate partitions,dates back to much smaller hard drives and the directories, in fact, could be put on separate physical drives.
Thank yall (or should that be 'all yall'?) for your input - appreciated!
I still think having all my 'private files'away from /home/<user> has its advantages - and having just the root filesystem - I have been known to have as much as 6 different distros on one disk - the dot-files/directories can be difficult to 'manage' if I use a common /home.
Also, keeping grub(2) (sorry, I'm not using lilo!) on the root-filesystem means I wont have the problem with replacing one distro for another - I _would_ have a problem if my 'current' grub2-distro got replaced with another, or I just decided to leave the space empty (too much of grub2 resides on the root filesystem beside the MBR)
My main disadvantage - I can't play around with the different filesystems to the same extent. Especially if a distro uses grub2 - I'm more or less restricted to ext3/4 since most distros will not allow the use of 'blocklists' for other than ext3/4 (not enough space before the filesystem proper).
Partitioning schemes are rather dependent upon how the system is being used. I can certainly understand using a single partition for each distro if one is running multiple distros. But there are scenarios where the ability to have separate partitions is extremely useful. I generally like to take advantage of this ability by using the following approach.
/boot - I sometimes use a small boot partition, but not often. It can simplify things for multi-boot by keeping all the kernels in one place, but I don't often multi-boot except during full upgrades.
/ - I like to have two partitions available for root, both about 10-15GB in size. This allows me to do full upgrades while retaining the previous version until things are sussed out. I "ping-pong" back and forth between them. For example, if I have 13.37 installed on sda1 then I will install 14.0 sda2; and later I will install 14.1 over sda1.
/usr - Having /usr on a separate partition allows my pair of root partitions to be smaller; the root partition only needs to be large enough to hold the initial install, after that is up and running I can move its /usr directory to this dedicated partition (allowing room to install all the third-party packages). If I have more than one disk in the system, I will typically place /usr on a RAID1 to provide a slight increase in access speed. (I also have a laptop where I've placed /usr on an SD card, increase read speeds and freeing up some space on the harddrive.)
/home - I have not experienced any major problems with sharing a common /home between different Slackware versions, but if I were to boot a different distro, things would be different.
/pub - I have a common pub directory which contains files to be shared across my home network. All users on my network have full permissions to this directory. In the past these would be NFS shares -- mounted on /mnt/hostname -- but I imagine there is a better solution to this (perhaps using unionfs).
swap - Not much to say about swap other than I will sometimes make it large enough to serve as my alternate root directory, converting it between the two uses during upgrades.
/srv/local contains my non-private data: things like my .flac files and local copies of stuff freely available on the internet.
/srv/crypt is luks encrypted and contains my private data (stuff I wouldn't want a burglar to have access to if he broke in and stole my system). I keep nothing 'private' under /home.
/usr/src contains a number of git clones I refresh often, which is why I gave it its own filesystem.
/maint (I should probably move that to /srv/maint to be consistent/tidy - it's something fairly new that I was trying out to see how well it works) contains my local mirror of slackware, the nvidia-drivers, my local packages built from slackbuilds and a few scripts and other stuff which help to maintain my system.
Spliting off /var, /tmp, /home and /usr/src from the rootfs is to reduce read-write activity to the rootfs. What this means is that the rootfs superblock and filesystem meta-data will be in a consistent state for much more of the time than if it was subject to the constant write activity that the other filesystems can be subject to, which should theoretically reduce the chance of filesystem corruption in the event of a kernel Oops or power-failure.
Ring-fencing space has already been mentioned.
Catastrophic file system corruption won't take out everything because of the isolation and I don't have to restore everything. Recovery time will be quicker.
Wiping and reinstalling the OS needs no special action to be taken to preserve my data: stored in /home, /srv/local and /srv/crypt.
I can share /srv/local and have access to all my media files and reference data with a linux installed to a spare partition I keep for testing (either other distros or Slackware current).
Should you want to, you can use mount options like nodev, noexec, nosuid to harden security a little - I don't bother on this system, but would on a dedicated server.
You can tune the individual filesystems to make optimum use of the available space (i.e. set an appropriate nbpi value for the average filesize). This can make a huge difference with very large filesystems
There's really no right answer to layout (though IMO there are a few 'wrong' answers ). It's mostly about what you care about, and what works best for you. The above is what works for me, nothing more.