Is it safe to have no `/home` partition? [duplicate]

Solution 1:

Personally, I don't have a "technical" answer to give you and I don't think that there is one (e.g. like say, separate partitions offer greater performance), but I have always been using separate partitions for my /home folder and the main reason is the one you mention: keeping my customization and settings intact after a clean install. Especially with KDE plasma, which is full of customization and personal settings, I wouldn't want to spend two days setting the environment up, every time I did a fresh install. I can see why that might be the cause of future problems, but I weigh the pros and cons and I always choose to use a separate /home. Additionally, as izx mentioned here :

  • The biggest pro, in my opinion, is that you can easily install a newer Ubuntu version (or any Linux distro for your architecture, really), without losing most of your custom settings, configurations, downloads, etc., since such a step usually involves wiping out the existing system/boot partitions. You simply choose to preserve your /home in the partitioner during install, and you're set.
  • It is also possible to do this with /home on your / partition, but is a little more complicated. It also makes resizing/migrating to a larger home partition easier, if you ever need more space.
  • It isn't going to affect the speed of file access much, UNLESS you tend to have lots and lots of small files in your home directory. e.g., if you are a developer, or you have lots of sources lying around. That MAY affect overall file access speed on the entire partition with some filesystems. In that case, go for a separate /home.
  • There aren't any risks to making a separate home partition.

Another good reason is if, for some reason, you wanted to use a different disk for your /home folder. So to wrap it up, it's more a matter of choice and what you want to do with your system. I think it's safe to say, that it's perfectly fine to leave as it is with one big partition.

Solution 2:

It is safe
Nothing wrong with using only one root partition per install. It's the default way to do it, linking another partition is an option.

  • As far as settings are concerned: using different distros might indeed cause some clashes. It can be very annoying but not really dangerous since the settings are for user level apps.
    On the other hand, when doing an upgrade with the same distro or restoring a crashed system, keeping all your settings can save a lot of time, from your desktop background to your bookmarks, etc.

  • As far as data files: Symlinks are a good way to go about it, they just need to be setup. For someone using only one system, a separate home partition is in essence, similar to symlinks: your data is apart from your system.

Personally I use both.
The distro I use daily has a separate home partition, with the Videos, Music and Documents folders symlinked to a different drive. So I keep my home settings if I ever need to restore or upgrade and if I want to change my main distro entirely, I can compress all the hidden files and folders and restore the ones I want (firefox, etc) after the install.
I have another 3 distros installed, just for messing around. They have just one root partition each, and the same symlinks in their home folders. So I can easily access the data and not get setting problems.

Solution 3:

otherwise with let's say three Linuxes I would need 6 partitions already and that wouldn't fit an extended partition!

If I'm understanding you correctly, you're operating under a misapprehension. An extended partition can hold an arbitrarily large number of logical partitions. The exact limit depends on the size of the disk, but for any modern hard disk, the limit far exceeds six partitions. I've created test disks with something on the order of 100 logical partitions and that works fine. (That said, some older Linux distributions max out at, IIRC, 16 partitions per disk. Ubuntu has ways around that, though, as do most modern Linux distributions.) Many modern computers use the GUID Partition Table (GPT) partitioning system, which has a default limit of 128 partitions, and that limit can be raised if necessary.

But I see that many people recommend almost as a necessity to have a separate /home partition.

I would see that as an advantage if it could be used for different systems at the same time or something like that, which is not possible. The home folder contains settings which are very system-specific and also program-specific and program-version-specific.

It's possible, and safe, to share a /home partition between distributions. The trick is to ensure that users have different home directories on that shared /home partition. For instance, if you're sharing the /home partition between Ubuntu and Mint, you might give the user Fred the home directory /home/fred-ubuntu under Ubuntu and /home/fred-mint under Mint.

This is most easily accomplished by giving users different usernames in each distribution -- thus, Fred might use fred-ubuntu and fred-mint, depending on which distribution is being booted. You can, however, use the same username (say, fred) across distributions, but assign different home directories. Ubuntu's installer doesn't make this easy for accounts created at system installation time, but it can be accomplished by either renaming the home directory or changing the username after installing the OS. (Both tasks can be done with the usermod command, although renaming the home directory will also require using mv.) Some distributions enable customizing the home directory name at system installation time, which is helpful when setting something like this up.

With the separate home directories created, you can create symbolic links to simplify access -- for instance, you might have a symbolic link from ~/mint to ../fred-mint in the /home/fred-ubuntu directory to make it easier to access Mint files from Ubuntu; or you could link subdirectories you use (like ~/Downloads or ~/Videos) directly.

Setting things up this way does take more initial effort than creating separate /home partitions for each distribution, or not using separate /home partitions at all; however, it can make for more efficient use of space.

Stepping back further, though, IMHO installing multiple Linux distributions in a multi-boot environment is unlikely to be very helpful. If you want to learn about different distributions (say, RPM vs. Debian package management systems), running one distribution in a virtualized environment (VirtualBox, VMware, QEMU/KVM, etc.) can be quite effective and will save you from multi-boot headaches. If you simply want to try different desktop environments, these are not tied to whole distributions; you can install as many desktop environments as you like within one distribution and switch between them by logging out and back in again. You can even run different desktop environments simultaneously in different VTs, as described in this question and its answer.

Solution 4:

Reasonably safe. The main reasons to use separate partitions are:

1) Desire to use different filesystems, such as EXT3 for Boot and TMPFS for /tmp 2) The desire to use different permissions. I commonly have a separate /usr partition so that I can mount it Read-Only (bit of a paranoid anti-hack thing) 3) The desire to limit usage, such as mounting with noexec (common for /tmp, another paranoid anti-hack thing) 4) The desire to limit space without impacting other operations (/var so that /var/log filling does crash the system) 5) The need for different levels of redundancy (perhaps mirroring OS, but Raid 6ing general user data)

Biggest issue for putting everything under root is filling it accidentally (like with log files) and having all hell break lose.