LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   A partition for /home is pointless (https://www.linuxquestions.org/questions/linux-general-1/a-partition-for-home-is-pointless-568034/)

zoubidoo 07-10-2007 03:12 AM

A partition for /home is pointless
 
I recently upgraded from Ubuntu Dapper to Feisty leaving my /home partition unchanged. The result was a locked up unusable system requiring console access to fix.

With a clean /home the system worked fine once again. So there is obviously some configuration file in my home subtree that is causing problems, (presumably gnome/gconf related although I haven't been able to track down the exact problem yet).

The whole point of having a separate partition for /home is to separate system software from user data. But this experience shows that it isn't quite so easy. So what would be a good way to avoid this kind of problem?

Is it reasonable to expect applications (in this case gnome) to be more robust when encountering "old" config files?

syg00 07-10-2007 03:39 AM

Last I looked a direct upgrade from Dapper to Feisty wasn't supported.
So problems shouldn't be unexpected.

I've used a separate /home successfully for years.

rkelsen 07-10-2007 03:46 AM

Quote:

Originally Posted by zoubidoo
Is it reasonable to expect applications (in this case gnome) to be more robust when encountering "old" config files?

I don't believe so.
Quote:

Originally Posted by syg00
I've used a separate /home successfully for years.

Me too. :D

thloh85 07-10-2007 03:56 AM

Works for me too...
Try remounting the partition after the boot is completed... Then you might see the problem...

zoubidoo 07-10-2007 04:06 AM

Quote:

Originally Posted by syg00
Last I looked a direct upgrade from Dapper to Feisty wasn't supported.
So problems shouldn't be unexpected.

I didn't say it was a direct upgrade. It was a fresh install that replaced Dapper with Feisty. /home was unchanged.

Daws 07-10-2007 04:22 AM

Quote:

Is it reasonable to expect applications (in this case gnome) to be more robust when encountering "old" config files?
Since we're talking about debian-ish systems:

package libzzz1 v1 is configured via filezzz.rc

It is reasonable to expect libzzz1 v2 to work with filezzz.rc.

However if configuration syntax changes, filezzz.rc may not work, therefore a new debian package is created:

eg. libzzz2

As a general rule you can expect that libzzz2 will not work with filezzz.rc.

This allow sys admins to deal with the configuration changes on their own terms.

Tinkster 07-10-2007 04:46 AM

I've succesfully used a Slackware-based /home on a dapper system,
no problems (not pertaining to home, anyway) ... sad that Ubuntu
to Ubuntu should give one problems.


Cheers,
Tink

b0uncer 07-10-2007 05:20 AM

Usually binary distribution software upgrades trough package managers, if they work at all, only work from a version to the next one, not jumping over versions (for example 1->2 then 2->3, not 1->3 directly). Jumping over versions increases the probability of trashing the system. Clean installs are always better.

The idea of /home on a separate partition is, if you ask me, that you can format your root partition (and others) without losing personal data. This happens when you do a "clean" install where you don't upgrade the existing system, but format / and then install over the formatted root partition. Not having /home under root partition but on a separate one leaves you with the choice of letting /home unformatted, which leaves you with the possibility of having all per-user configurations, personal files etc. there and saves you a lot of time because you don't necessarily (unless an accident happens, which can happen any moment anyway) have to restore backups. You take backups, don't you? No? Well you should.

Of course it's easier to use automatic partitioning (if offered) and put everything in one partition - the good side is that free space is there for you to use, and you don't end up in a situation where root partition runs out of space and your system starts dying even though there are hundreds of gigabytes of free space under /home. The bad side is that if you ever need to reinstall, you're either going to have to make huge backups and make sure they work just for that job, and then restore them after the setup (which is the same as if you had /home separate, didn't format it and just saved hours) or you're going to have to leave / unformatted (if the setup lets you to) and get a system which has potentially loads of major problems. And the out-of-space problem can be circulated with always checking out you do have enough space, and if it seems like you don't, buy more.

There is no sane reason not to have separate /home, except that you don't have any valuable data (test to see: if you're ok with formatting your whole disk right away without backing it up, you don't have valuable data - if a thought crosses your mind thinking what you might lose, you do have valuable data) and don't care to save it.

nx5000 07-10-2007 05:52 AM

Quote:

The result was a locked up unusable system requiring console access to fix.
When booting, the system will not even open a single file in /home so I don't see how any distro would "lock up" because of a bad /home.
Maybe something went wrong during the partitionning?

I'm using a separate /home since years and it's very handy.

bigrigdriver 07-10-2007 06:15 AM

Quote:

The result was a locked up unusable system requiring console access to fix.
IMHO, it would be most instructive to know what you had to do to effect a fix. That might shed much light on the nature and cause of the problem.

jschiwal 07-10-2007 06:24 AM

Did you use a different username on the new install. I will change my home directory by adding -bu at the end and then create a new user. Later, I'll copy the old contents I want to my new home directory. If you go from one distro to another, there may be a different UID used. Some distro's start UIDs at 500, others at 1000. Also, one advantage of a new install may be how the menus and other items in ~/.kde or ~/.gnome are setup.

GregLee 07-10-2007 06:46 AM

Gnome doesn't cope well with old incompatible configuration files, but there's no need to get rid of everything in /home. Just "cd; rm -rf .gconf .gconfd .gnome .gnome2".

stress_junkie 07-10-2007 08:30 AM

Quote:

Originally Posted by GregLee
Gnome doesn't cope well with old incompatible configuration files, but there's no need to get rid of everything in /home. Just "cd; rm -rf .gconf .gconfd .gnome .gnome2".

I've seen the same thing with KDE. Often a new version of the operating system will have a new version of the window manager and base X software. These, at least in KDE, will often not be compatible with the old configuration files. I also create a new user home directory, run KDE, reconfigure the desktop, then copy over the non-window manager data from the old directory. It is a lot of trouble but not doing this can be more trouble.

As far as the utility of having a separate partition for /home I think that there are several benefits. For one thing you can easily encrypt the /home partition. I use True Crypt.

Another benefit to having /home on a separate partition is that you can mount the /home partition as noexec. That will prevent most applications that reside on the /home partition from running. This is a good idea to prevent a malicious web site from downloading an application to your home directory and running it. I do the same thing with the /tmp and the /var/tmp directories. I use small container files that contain a file system and mount them through a loop device to /tmp and /var/tmp using the noexec directive in the mount command. That way every place that the normal user account can write files forbids running software from that location.

So having a separate partition for the /home directory can be useful.

Junior Hacker 07-10-2007 03:21 PM

Well, I guess jschiwal beet me to the punch.
I also used the same /home partition with many distribution, Mandrake 10 and Mandrake 10.1 are two different distributions. Yes I would render one distribution inaccessible to the user's account if I used the same user in another installation, eventually I figured out I had to create a different user for every distribution. I once had 9 users, and could only access files in some of them as root from a terminal.
I prefer the setup I'm using now, leave home in the / partition and set up a shared ntfs data partition, install ntfs-3g in Linux and access all data from any OS. And when it comes to upgrading, simply wipe out / and install another in it's place. And now I only have one user with the same root and user password in all the OS's without interference.

jschiwal 07-10-2007 07:00 PM

You can use the same username, but have each distro's home directory entry in /etc/passwd refer to a different directory.

For example, if your user name is jdoe, you could have /home/jdoe-suse/ while in Fedora Core, use /home/jdoe-fc/. The username could be the same for each. In this case the SuSE UID may be 1000 and the FC UID may be 500.

You can edit /etc/login.defs in one of the distros so that the UID ranges of normal users matches, and use the same UIDs for regular users. You would need to do this anyway if you want to use NFS between two SuSE & FC hosts.


All times are GMT -5. The time now is 10:24 AM.