0

When log in Lubuntu, I can't

$ sudo umount /home
umount: /home: target is busy.

where /home itself is a mount point of a filesystem.

How can you umount /home?

/ can't be umounted, because OS is running from it. Can /home be easier to be umounted?

Thanks.

  • Linux don't allow you to umount a mount point if there's still some living reference to it. – 炸鱼薯条德里克 Feb 24 at 2:23
3

You can unmount /home if it's an independent file system. The Target is busy message means that there are either:

  1. files under /home that are still open
  2. directories under /home that are the CWD of some process (this could be the shell from which you try to unmount /home)
  3. a filesystem mounted on a mount point under /home

For 1) and 2), the lsof command can help, but if you are using a GUI, you have very many files permanently open under /home/{your id} so unmounting /home is not going to be easy. If you log using a TTY instead of a GUI, you can better control what process are running with your id and what files are open.

  • Thanks. Do you think it is better to boot into a live Lubuntu so that the /home on disk is not mounted by default? – Tim Feb 24 at 0:06
  • 1
    Yes, it could make things easier. But why do you want to unnount /home?. – xenoid Feb 24 at 0:49
  • 2
    I agree that it’ll be difficult if your logged in (even at the text console) as a user, if your ~ is on /home, but I want to warn you that even if you manage to log in as root, you might encounter a situation where /home is unmountable. If you use systemd and you have any services that have ProtectHome=read-only, it will have a bind mount of home that will prevent /home from being uncounted. It won’t show it in lsof, since it is a kernel syscall. – jsbillings Feb 24 at 1:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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