Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
I decided to create a partition for /home, sda4. But now I realize that my /home is in sda3, which was created to house my / tree. There's a home dir in sda4 but this is not the one that my dist recognizes as system /home. Here's my fstab:
More typically people would mount a partition as /home, but since you want a directory on a partition, I guess you could delete your current /home, and create a symbolic link to /mnt/sda4/home using
ln-s /mnt/sda4/home /home.
I'd probably rename /home rather than deleting it, just in case you need it.
Last edited by billymayday; 11-29-2008 at 05:41 AM.
Reason: changed sdb to sda
I must say that your fstab looks very special. All of your partitions are mounted under the /mnt directory, both the sda3 and sda4.
Normally your home directory should be under / (root), that is /home.
To accomplish that you would mount either your sda3 or your sda4 with a line in fstab similar to this:
In contrast to windows which has several root directories, one for everey disk c:\ d:\ etc, there are only one file tree in linux, all placed under / (root)
A leading / in a path always makes it an absoulte path, so the first post is a bit misleading.
In the sda3 where / resides there are a home directory, as always, either it contains the users home directories or function as a mount point for a mounted "home"-partition.
Before the addition of sda4 the user files would be saved to /home (being on sda3). Mounting sda4 as I suggested above would make the partition sda4 "replace" or overlay the /home directory with the contents of sda4. Using soft links would be the wrong way to try to "fix" it.
When partitions are mounted in the correct place, there are no use for soft linking.
easy fix in kde go to user manager and tell it where to put user default is /home/user. . the option is there.
when you create a user it will ask if you want to create a user file and then you put it where you want it. or you can modify the user manager to for that user. I did this many times as I migrated to different hard drives. default is on the same partition as root if you loaded the whole system on sda3 and not mounting the sda4 as /home. the l -s symbolic link has caused me some troubles in the past do to /tmp/sockets etc etc. but when you loaded the new system you had a choice to make a partition and mount it as /home but you did'nt so now you need to tell the user manager where you want to put you user file. if you have a bunch of stuff there you can move it then tell the manager where to put it. as long as the user manager knows where to look for your folder. you must do this from root ok or you will be left with locked tmp sockets and you will have troubles. like the symlink stuff. it will all work just if you want to play with it. create your user and tell the user manager where to put it. your user file does not need to be in home. but if you config the fstab to /dev/sda4 /home then the default setting for adding a user goes to home.. but you will have to move them to sda4 before you do this.
/dev/sda4 /home ext3 defaults 1 2 do not copy the home file just the user file to sda4. because sda4 is now /home.
and your root sys will still look like this
bin,,,, boot ,,,, dev ,,,, etc ,,,,,,, home ,,,,,lib
make sure if you move it as root you set permisions back tou you user name and users or you will not have access to it. or just copy to sda4 then logout then login as root and change the fstab.
if you do not logout you will leave locked /tmp sockets running
Last edited by Drakeo; 11-29-2008 at 06:28 AM.
Reason: not finished
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370
Rep:
The OP must be using Knoppix, Xandros, SLAX or one of the distributions that uses the AUFS filesystem. He does not say what his distribuiton is.
I am not familiar with those current distributions and am not at all comfortable with the very different mounting of devices in the /etc/fstab from more mainstream Linux distributions.
I would be very reluctant to give any advice or suggestions given the apparent foreign nature of the file structure. While the principles may be the same I just don't know how his distribution expects things to be set up.
I would like to change my /home directory as well.. What I have in mind is to be able to have a drive for my Ubuntu operating system on one drive and my /home directory and all files on another drive. In the event I wanted to try an upgrade, the desired effect would be that all I would have to do would be install it to the operating system drive and then mount home on the other drive that has /home and the files. Could I do that merely by making a /home directory on the "home" drive and setting it up AS home in the "Users and Groups" admin utility or would it be more complex? what would be involved in both setting it up and mounting it the way I have envisioned? Any help would be greatly appreciated. I am running a dual core AMD 5000 processor and 2 gigs ram with Ubuntu 8.04 currently.
Distribution: Ubuntu, Slackware, Gentoo, Fedora, Red Hat, Puppy Linux
Posts: 370
Rep:
Quote:
Originally Posted by swright007
I would like to change my /home directory as well.. What I have in mind is to be able to have a drive for my Ubuntu operating system on one drive and my /home directory and all files on another drive. In the event I wanted to try an upgrade, the desired effect would be that all I would have to do would be install it to the operating system drive and then mount home on the other drive that has /home and the files. Could I do that merely by making a /home directory on the "home" drive and setting it up AS home in the "Users and Groups" admin utility or would it be more complex? what would be involved in both setting it up and mounting it the way I have envisioned? Any help would be greatly appreciated. I am running a dual core AMD 5000 processor and 2 gigs ram with Ubuntu 8.04 currently.
You don't even need to put the /home directory on it's own drive but on it's own partition for your idea to work. You can put /home on the same drive as your Linux files but place /home in a different partition of it's own. I always set up my Linux installations this way for just the reasons you stated. Keep in mind that if you use databases such as Postgresql or MySQL they will be placed in the /var directory on the main disk as well and may be lost if you re-install Linux. All files should be ok for regular updates and upgrades as long as you use the Ubuntu upgrade procedure and do not do a new install.
First of all, thanks everybody for your opinions but especially to ugge, you were right and, not least, very kind.
I like the discussions that lead to some point and I ensure you that controversy was/is NOT my aim. Sorry if I get it.I'll try to pass on tiptoe on the discussion, however I would jot down issue:
Code:
I would be very reluctant to give any advice or suggestions given the apparent foreign nature of the file structure. While the principles may be the same I just don't know how his distribution expects things to be set up.
It would be very wise of you to explain why can't I expect my distribution to work right.
Last edited by morphynoman; 11-30-2008 at 03:19 PM.
I would be very reluctant to give any advice or suggestions given the apparent foreign nature of the file structure. While the principles may be the same I just don't know how his distribution expects things to be set up.
It would be very wise of you to explain why can't I expect my distribution to work right.
I don't think it's about "not working right". It's about
"is it right for all possible scenarios" - which will always
have to be a clear: "NO!", for what I think are quite obvious
reasons. You can't cater to all use-cases with one set-up,
a server will require a different set-up from a gaming desktop.
And I think that (even though one could build some heuristics
into the installer, and quizzing the person installing about
their intended use) you'll never be able to anticipate all
possible uses ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.