LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - General (http://www.linuxquestions.org/questions/forumdisplay.php?f=1)
-   -   Mount a local folder (http://www.linuxquestions.org/questions/showthread.php?t=510334)

samyboy 12-14-2006 04:24 AM

Mount a local folder
 
Hi there,

I would like to mount a local folder.

Example :
Home directories are in /mnt/hdx/homedir
I would like to type mount /mnt/hdx/homedir /home

No idea how to do that.

nx5000 12-14-2006 04:49 AM

Quote:

Originally Posted by samyboy
Hi there,

I would like to mount a local folder.

Example :
Home directories are in /mnt/hdx/homedir

So the disk is already physically mounted right?
Quote:

I would like to type mount /mnt/hdx/homedir /home

No idea how to do that.
1st way to do it:
Create a link from /home to /mnt/hdx/homedir:
cd /
ln -s /mnt/hdx/homedir /home

2nd way (I use this one):

from man mount:
Quote:

Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is
mount --bind olddir newdir
After this call the same contents is accessible in two places. One can also remount a single file
(on a single file).
cd /
mkdir home
mount -rbind /mnt/hdx/homedir home

samyboy 12-14-2006 05:57 AM

Thank you !

It works like a charm.

samyboy 01-23-2007 07:15 AM

The fstab entry :

/mnt/hdx/home /home none bind

cwoneil 04-26-2013 11:36 PM

Check for noexec on mount point
 
If you use software like PlayOnLinux, this must execute files in your home directory. If the mount point where you move your home directory is user mountable, then the noexec option will be set and you wine installation will stop working.

To check this type mount
find the drive where you are linking to your new home directory
ensure that it does not show "noexec" as one of the mount options
If it does, edit fstab to add the exec option or to remove the user option. Security settings in Linux don't allow files to be executed from user mountable drives.

Good luck.


All times are GMT -5. The time now is 06:03 PM.