Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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
share|improve this answer
    
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 '11 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. –  Mohammad AbuShady Oct 21 '13 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 '13 at 9:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.