Does anyone here have a separate /root and /home partition?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Does anyone here have a separate /root and /home partition?
Ive been thinking, if I had a separate /root and separate /home/user partition, then everytime I went to do an upgrade/install, I would lose everything that was saved in the /home/user partition. Is this feasible?
/root isn't supposed to be seperate. If you want to share /home with different distros, make sure the user id numbers are the same to avoid permission problems.
Originally posted by aaa /root isn't supposed to be seperate. If you want to share /home with different distros, make sure the user id numbers are the same to avoid permission problems.
Well, what I was thinking was a separate /home partition from my Mandrake partition, that way when I upgrade Mandrake or mess with it, I dont lose whatever is saved in the /home folder. Does that make sense?
aaa - I'm confused about your post. I agree that if you were trying to share /home across different distros you could run into problems, but Kramer seems to be asking whether upgrading (ie, going from ver 8 to ver 9 of the distro, or installing additional packages manually) would have a negative impact on the contents of /home. I'd say No, they're totally independent issues. In other words, upgrading to a newer version, or installing additional software will not have any effect on the users, nor would it do anything harmful to /home. Similarly, I don't see any real harm in giving /root its own partition, if that was your desire. What downside would there be in doing this? I've learned a lot from your posts and thus I want to better understand your recommendations in this situation. -- J.W.
The reason the root dir should be part of the main partition is the same reason essential programs are kept in /bin & /sbin (and not in /usr/bin ...); they are essential to the system. It's why there is no /home/root. Root should be independent of what happens to other stuff. If something happens to one of the other partitions (say the /home), you can still boot as root in single-user mode normally.
I don't know if upgrading will change the uid number, but with a reinstall this is quite likely. Every user has a number, and the name is just for show. Stuff like ownership is determined by the uid number, not the username. If you do something a little as create users in a different order, the numbers will be different. Or the new Mandrake may assign numbers in a different order. If you want the old files to still belong to you, you need to make sure you use the same uid number.
I think the confusion's coming from his saying '/root' when I think he meant '/(root)'. Yeah, /root has to be part of /. But / can easily do without /home. I think he wants
Let's distinguish between "/" and "/root". I clearly understand that / contains the essential programs, and that there's a significant benefit to having / live on one partition and /home on another. However, to use an analogy: /root is to the root user as /home/<user> is to a regular user, right? As such, just like any mountpoint, you could create a separate partition for it if you wanted to. I don't see that there would be any meaningful downside to putting /root on its own partition - am I missing obvious drawbacks?
As for the UID, Yes, I see your point. Thanks for any input -- J.W.
I can't see any problems. Even if the drive containing /root becomes corrupted, the system should fall back on using / for /root. Home directories don't contain any files that make or break system-wide settings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.