3

I've got an NTFS partition which I never need as a whole. When using it from Ubuntu I only need a specific directory of it which I like to have mounted into a dedicated directory under my Linux FS root. Can I specify it in fstab?

1 Answer 1

5

Not directly. You still have to mount the filesystem of the partition but if you dont want it to show up as a drive in nautilus, mount it to somewhere in /mnt/

From there you can do a further bind-mount in /etc/fstab to mount the specific directory you want in a place where you want it, eg:

/mnt/windows/dir-you-want-to-mount    /media/mydir    bind
3
  • Given he needs to mount the whole partition somewhere in the fs, wouldnt a symlink pointing from /mnt/somedir to /media/mydir be much better than a 2nd fstab entry?
    – MestreLion
    Feb 20, 2011 at 17:52
  • @oli Is 'bind' a type of mount? I am looking for a resource to search how to understand those mounting types but I don't know what keyword I should be searching for exactly, could you please provide me with some guidelines to start?, Thanks. Oct 21, 2013 at 8:53
  • @MohammadAbuShady Yeah, it's a simple in-kernel mapping between two already-mounted places. The documentation for bind mounts is in man mount (search for "bind" and you'll see it). It's not that thorough but it's quite a simple method.
    – Oli
    Oct 21, 2013 at 9:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .