automatic access to home folder from two distros on same computer using fstab
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Distribution: Ubuntu 11.04, UNE 10.10, CrunchBang Statler, Bodhi
Posts: 52
Rep:
automatic access to home folder from two distros on same computer using fstab
I have both Ubuntu 9.04 and #!CrunchBang 9.04 installed on my MSI Wind Netbook. Ubuntu was first, and I set it up with a separate volume for the /home folder. The /home folder has music in it that I would like to access from #!CrunchBang, preferably without having to copy it over. I know how to access the volume from #!CrunchBang with a mount command, and I mount it at /mnt/volumes.) My music player was given that location to access music, but how can this be set up automatically so that I don't need to type in a mount command? I researched this a bit and I now know that I could add the volume to the /etc/fstab file, but I'm not clear how I get it mounted in a given location (like /mnt/volumes) that way. If it isn't mounted at a given location, how does the music player access the music files?
Just copy a line from the current fstab and adjust as needed. You can see the values by mounting it by hand as you are, then do
cat /etc/mtab
NB do not adjust mtab by hand. Its dynamically set by the system to show what's currently mounted, as opposed to fstab which lists what you'd like mounted.
Using the same home/user directory may give you conflicts as a lot of your configuration files are in there. You could mount the partition to something like ~/ubuntuhome easily enough using fstab.
first create a directory called ubuntu home in your home directory
Then add this line to the file:
Code:
sda1 /home/bill/ubuntuhome ext3 defaults 1 2
this assumes that the partition is sda1, that your username is bill, your using the ext3 FS and a few other things. There's plenty of documentation on the net and here's a nice easy example.
then run: mount ~/ubuntuhome.
as for mounting it on start up. the script in /etc/init.d/mountall.sh should do this if its in fstab
when you installed your systems at that point you had the ability to create a partition called home and from then on when you install a system you tell it to use the partition home without formatting it. if you did not do this then you need to create a partion for home and configure all your users to use that partition.
So I have five systems and sda5 is home for all the other systems and there is three other hard drives. this makes backing up home very easy.
How to to do this easy create the partition and use your gui or command line to tell each system that the user home is on that partition. kind of like what arch shade has said.
after that any time you add a new user it asks where you want the home your name to be.
Distribution: Ubuntu 11.04, UNE 10.10, CrunchBang Statler, Bodhi
Posts: 52
Original Poster
Rep:
Thanks for your replies. I had it all right except the "defaults" part. Once I fixed that in fstab, I got the volume mounted at startup. archShade, I mounted the other home file in a folder I created under mnt - /mnt/volumes - to make sure I didn't run into a /home conflict.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.