SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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:
Code:
#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)
#4: extended
#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:
Code:
default 0
timeout 10
title [sda3]: slackware-14.1
root (hd0,2)
chainloader +1
title [sda5]: slackware-14.0
root (hd0,4)
chainloader +1
title [sda6]: solydx
root (hd0,5)
chainloader +1
title [sda7]: centos-6.4
root (hd0,6)
chainloader +1
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!
(edit)
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.
I just use three partitions, /home /swap /everything else : ) I prefer to keep /home separate for backup & recover reasons mostly, and I can re-install and upgrade without worry most of the time.
/dev/sda = lilo
/dev/sda1 = swap
/dev/sda3 = root
/dev/sda4 = home
If I ever decide to install another distro I use another harddisk or I resize the partitions. If I am changing distro I just wipe all the configuration files off the home folder to avoid problems.
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.
storage, choice, general-admin and (physical/and-network_local_or_remote) location.
Oh, and control B-)
(edit)
and filesystem/partition type.
(edit)
and filesystem permissions/umasks
(edit)
and 'fsck' against any particular partition.
As ever with *nix, the point to be made is complete and extensive admin and control.
I'd be happy to explain real world examples why one would want the (options of the) above
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.
You really don't need to do segregated file systems anymore. If anything all you need is 3 at least:
/boot
/(root)
swap
Or even just 2:
/(root)
swap
Segregated /boot does come in handy for security purposes if you want to dismount /boot after startup in rc.local to prevent anyone tampering with it. I've often added (for example):
umount -v /dev/sda1
to my rc.local to keep it disabled by default on boot after it's no longer needed and have rc.local write only accessible from the root-admin.
Now granted having a segregated /home is useful if you do a lot of disk quotas and need to have certain space limits for a disk not in the main array. very useful for networking terminals.
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).
I'm originally from Florida, so I know how Southerns all talk. It sounds weird, but ironically it's a miss-mesh of Irish, English, Welsh, and Scottish all tossed into a blender on puree.
*southern accent mode* We ustacould say anything atall, but everyones gotabe so danged strict widda English language, can't say nuttin' anymore.
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.
Other advantages:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.