0

Possible Duplicate:
How to automount NTFS partitions?

I have 300 gb NTFS drive with documents folder on it. Is it possible to automount /media/300gb/documents to home/documents at system startup? How can i do it?

3 Answers3

2

You'll first have to set up the NTFS partition to be automounted (see this answer), then you can set up the appropriate links as @mikewhatever suggested.

Along with this you might also need to update the entries in the ~/.config/user-dirs.dirs file for it to apply a specific user, or /etc/xdg/user-dirs.conf for all users.

In my case (under Ubuntu 12.10) I moved my Documents folder to a backup location before replacing it with a link to a folder on an NTFS partition. But afterwards Nautilus, LibreOffice, etc. still defaulted to the old folder until I updated the user-dirs.dirs file.

For more detail, see this answer.

esmail
  • 231
1

The fstab entry to bind mount one location to another looks like this:

/media/300gb/documents /home/USER/documents bind defaults,bind,auto, rw 0 0

You might need to adjust the mount options (defaults,bind) for ntfs a bit: users,exec,nls=utf8,umask=003,gid=YOUR_GROUP_ID,uid=YOUR_USER_ID

Remove the 'exec' if you don't intend to install executables on the ntfs partition. You can determine your group and user IDs with the id command in a terminal.

Your link problem possibly stems from the fact, that documents is already an existing directory when you are issuing the link command.

  • Can't remember why nor find the site saying it, but i read there that this (mount with bind parameter) is better than linking. – DanMan Oct 07 '12 at 12:19
  • @DanMan, one reason I prefer mount binds over symlinking a partition, is in Vim, if I jump to to containing directory, it may not behave as expected when using symlinks. But I still use symlinks for things like .ssh, .vimrc etc. – Brady Trainor Aug 05 '14 at 17:45
0

Instead of messing with mount points, you can create a link to /media/300gb/documents like this:

ln -s /media/300gb/documents ~/documents
mikewhatever
  • 32,638
  • it is half-solution. It makes link in documents folder and path looks like ~/documents/documents – tilly willy May 09 '12 at 00:49
  • The command above should create a link called documents in your home folder, and point directly into the /media/300gb/documents. In what way is that a half solution? – mikewhatever May 09 '12 at 01:57
  • Sorry, maybe problem in my locale. I'm russian-speaking and my home folders names are in russian. I'll try to change default names to english. – tilly willy May 12 '12 at 03:23
  • Hm..., that shouldn't matter. Insidentally, I am Russian as well, and can vouch that it works with Russian names. Perhaps you can add the exact commads to the question. On the other hand, if you don't like to deal with commands, right click the documents folder on the 300gb device and select 'Create link'('Создать ссылку'), then move the link where ever you want it. – mikewhatever May 12 '12 at 04:06
  • Folders Документы, Музыка, Видео etc are already in bookmarks by default and it's much easy to switch between them in nautilus.Deal with terminal isn't hard. I rename folders to english by ubuntu tweak, but ln -s still create link inside folders, like /documents/documents. – tilly willy May 14 '12 at 11:10