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 a new(ish) installation of Ubuntu in a VirtualBox, with OSX as a host machine. I was attempting to mount a shared folder into Ubuntu, so typed in the terminal:

sudo mount -t vboxsf VBShare ~/

...or similar, expecting to mount the folder in my home. However, what appears to have happened is that the folder has replaced my home folder, which now just contains the files from the shared folder.

(There is a chance I also tried something like:

sudo mount -t vboxsf VBShare /home/michael/

)

What has happened? Is recovery a possibility? What should I have done instead? I haven't tried a restart yet...

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Just run

sudo umount ~

to unmount the drive. See this question about mount overwriting directories.

In the future, you should make a new directory and then mount to there. For example

sudo mkdir /media/Share

sudo mount -t vboxsf VBShare /media/Share.

share|improve this answer
    
Great, thanks. When I try to umount, though, I get the error: umount: /home/michael/: device is busy. There seem to be three processes using it, one of which is gnome-terminal. How can I stop these safely? –  Bill Cheatham Oct 25 '11 at 20:07
    
What directory are you calling the command from? If your shell is currently at ~ then it won't work because you're using that directory. Just cd .. and run it again. –  Kris Harper Oct 25 '11 at 20:11
    
Excellent, I did that and also learned about the -l (lazy unmount) switch, which has worked a trick. Thanks a bunch. –  Bill Cheatham Oct 25 '11 at 20:12

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.