Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This 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.


  Search this Thread
Old 05-12-2009, 06:05 PM   #1
Registered: Jun 2008
Location: Peterborough, Ontario, Canada
Distribution: Ubuntu 16.04, Unity & Gnome-shell
Posts: 83

Rep: Reputation: 15
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?

Last edited by trentfox; 05-12-2009 at 07:33 PM.
Old 05-12-2009, 07:49 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,241

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
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.
Old 05-12-2009, 08:00 PM   #3
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
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:
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/ should do this if its in fstab
Old 05-12-2009, 08:28 PM   #4
Senior Member
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
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.
Old 05-12-2009, 10:55 PM   #5
Registered: Jun 2008
Location: Peterborough, Ontario, Canada
Distribution: Ubuntu 16.04, Unity & Gnome-shell
Posts: 83

Original Poster
Rep: Reputation: 15
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.


fstab, mount

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mixed mounting of automount and fstab in one folder? &different home folder using NIS herofmm Linux - Software 0 04-06-2009 11:00 AM
Folder Max Size and Limiting SSH access to home folder. Mefistofeles Linux - General 4 11-26-2005 02:09 PM
Sharing a home folder between 2 Linux distros Jongi Fedora 1 10-26-2005 04:38 PM
Chmod = no access to home folder! DeathPrawn Linux - Newbie 4 02-12-2005 11:50 AM
FTP access to home folder deWin Linux - Networking 5 04-26-2004 01:45 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:25 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration