Mounting file system permanently in cygwin



Problem:The “mount” command is built for mounting USB devices and the temporary devices, So it will usable for per user session.
If user logout from the user session, you can’t access that mount drive again.

Work around :
Add the mount command on “.bash_profile” file ( available at you home directory)
.bash_profile will execute every session, It is like permanent mount.
RISK: If user run the mount command second time, get the error message that it is already mounted, because that our script may fail.

Solution: creating soft links (shortcuts) instead of mounting
Ie. As we are using the cygwin , “ln –s” command instead of “mount”
The command is: “ln –s x: /usr/local/share/data”

It solved my problem, let me know if you have any other thought :)

1 comment:

Anonymous said...

Edit /etc/fstab to make mounts "permanent"

E.g. add:

c: /c ntfs binary 0 0

will remount c: on /c automatically