Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I was trying to install MATLAB on my computer, and I got an iso and used this command to mount it:

sudo mount /path/to/iso /home/muhammad -t iso9660 -o loop

As you can see, I forgot to type in one more folder and now my entire home directory has been overwritten! I'm freaking out to the max right now and am too scared to even suspend my laptop. Please help me figure out how to undo this!

Thank you!!!!

share|improve this question

closed as too localized by Basharat Sialvi, Raja, Jorge Castro, ændrük, Uri Herrera Apr 23 '13 at 19:44

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

did you try sudo umount /home/muhammad? – Nil Apr 23 '13 at 3:14
It says that the device is busy. Would it work to type that in a tty? – Muhammad Khan Apr 23 '13 at 3:17
well, just a little experiment, i created a directory in my home folder. Inside that directory I created another directory. Then a mount one of my partitions on the outer directory. Then I unmounted it and the inner directory was still there. I believe the contents of your home folder are still intact, its just that your home directory now points to that iso. Just need to unmount that iso...don't know why umount didn't work. – Nil Apr 23 '13 at 3:45
My guess is that the device is busy because it's the /home directory so other processes are using it. Maybe if I restart then it'll unmount automatically? – Muhammad Khan Apr 23 '13 at 4:10
This doesn't damage your home directory, it only overlays the iso image on top of it. Nil is quite right. You'll be back to normal once you manage to unmount. Your guess about other processes seems likely. A reboot would put things back to normal. – Salt Apr 23 '13 at 5:38

1 Answer 1

Well, seeing as how this question still needs an answer, I will summarize the conclusions based upon the above comments

What happens when an iso is mounted to a directory?
This doesn't damage your directory, it only overlays the iso image on top of it. The contents of the directory will still be there once it is unmounted.
Why couldn't the home directory be unmounted?
The device is busy because it's the /home directory so other processes are using it.
What is the solution?
In most cases, unmounting the directory would suffice. sudo umount <directory> would unmount it. However, because this is the home directory, unmounting failed. A simple reboot fixed the problem.

share|improve this answer

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