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 have dual boot (win7/ubuntu 12.04) system. I want to mount a specific folder (namely the Dropbox folder) from my windows partition in my home directory. Unfortunately, I am not able to do that. As far as I understand, I can not 'directly' mount only a folder from a partition, but have to mount the entire partition first and then mount --bind the folder.

If I mount the partition writable, there are no problems. But if I mount the partition with

sudo mount -r /dev/sda2 /mnt/win

and afterwards try

sudo mount --bind -w /mnt/win ~/Dropbox/

It says

mount: warning: /home/ope/Dropbox/ seems to be mounted read-only.

I also tried it using /etc/fstab, following the solution given here. The relevant fstab lines look like this:

/dev/sda2 /mnt/win ntfs user,ro,umask=0222,defaults 0 0
/mnt/win/Dropbox /home/ope/Dropbox ntfs-3g rbind,user,rw,defaults 0 0
#/mnt/win/Dropbox /home/ope/Dropbox ntfs-3g rbind,user,rw,umask=0222,defaults 0 0

The last two lines both create only a read-only mounted folder. Is there antything I am missing ? Thank you very much for any hints.

share|improve this question
    
Why not use dropbox in ubuntu instead? askubuntu.com/questions/126198/how-to-install-dropbox –  McNisse Jan 24 '13 at 15:51
1  
I should have added that ;) : I do want to use it, but I do not want to have the files duplicated under win and ubuntu. –  feob Jan 24 '13 at 15:57
add comment

2 Answers 2

up vote 1 down vote accepted

Mount the filesystem rw somewhere else, then bind mount only that directory to where you want it to appear. You can then unmount the original mount.

share|improve this answer
    
Is there a way to do this automatically with a script? –  feob Jan 24 '13 at 22:10
    
@feob, yea? put the commands in a script? –  psusi Jan 25 '13 at 4:36
add comment

Someone else all ready solved this thing, just follow the link http://ubuntuforums.org/showthread.php?t=1927504

share|improve this answer
    
To be honest, I dont think how that helps - the thread is basically about mounting ntfs partitions, or did I miss something ? –  feob Jan 24 '13 at 22:11
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.