LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-29-2013, 11:09 AM   #1
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 286

Rep: Reputation: Disabled
Not able to unmount /home in Ubuntu13.04


I don't get why I can't unmount /home from root directory.
I tried via terminal (command line) as well as gparted.
It messages "device is busy"
I closed all applications. Still can't succeed.
Why so?
I am using Ubuntu13.04
 
Old 08-29-2013, 01:10 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 16,571
Blog Entries: 2

Rep: Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558
Do you have any user logged in? This will prevent unmounting. To find out what is still using home try it with
Code:
lsof /home
 
Old 08-29-2013, 02:33 PM   #3
jefro
LQ Guru
 
Registered: Mar 2008
Posts: 13,345

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692
I get the feeling that you can't usually unmount home unless you log off and log on to root. I could be way wrong on that. Almost any user setting or app might lock it.
 
Old 08-29-2013, 05:41 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 16,571
Blog Entries: 2

Rep: Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558
Quote:
Originally Posted by jefro View Post
I get the feeling that you can't usually unmount home unless you log off and log on to root. I could be way wrong on that. Almost any user setting or app might lock it.
Usually the WM or DE itself will prevent from unmounting, since they have configuration files, caches and other functionality, like virtual filesystems in the users directory. So if you want to unmount /home you have to logout or better switch to runlevel 1 (or the single target if your distro uses systemd).
 
Old 08-29-2013, 07:14 PM   #5
jefro
LQ Guru
 
Registered: Mar 2008
Posts: 13,345

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692
One of those questions that I have never had a reason to test.
 
Old 08-30-2013, 12:10 AM   #6
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,068

Rep: Reputation: 321Reputation: 321Reputation: 321Reputation: 321
You will find it much easier to do any maintenance requiring an unmounted /home by booting from a LiveCD. As soon as you do a normal user login from a normal boot on a typical system, you are most assuredly using /home yourself. Extricating yourself from using /home will be tricky. You could probably manage it as userid 'root' from runlevel 1 also. Booting from a LiveCD is probably simpler though.
 
Old 08-30-2013, 02:08 AM   #7
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 286

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
Do you have any user logged in? This will prevent unmounting.
Yes it's me who is logged.
Thanks, I got the reason why I wasn't able to unmount /home.
Quote:
Originally Posted by jefro View Post
I get the feeling that you can't usually unmount home unless you log off and log on to root. I could be way wrong on that.
Yes jefro, this was possible to log in as root when earlier I was working on old distro Fedora 9.
But is it possible in Ubuntu13.04?

As such I have got my solution from other posts herin, i.e. via runlevel1 or live CD.
 
Old 08-30-2013, 02:45 AM   #8
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 286

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by haertig View Post
As soon as you do a normal user login from a normal boot on a typical system, you are most assuredly using /home yourself. Extricating yourself from using /home will be tricky.
It is possible if I change my home directory from /home/ravbholua to say "/". I haven't tried this but simply saying a way to achieve that. But yes it w'd possible if system allows me as well as root to have the same home directory.
I only told a way but what I told may not be at all possible. I w'd try later.
 
Old 08-30-2013, 05:52 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 16,571
Blog Entries: 2

Rep: Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558Reputation: 4558
Quote:
Originally Posted by ravisingh1 View Post
Yes jefro, this was possible to log in as root when earlier I was working on old distro Fedora 9.
But is it possible in Ubuntu13.04?
Ubuntu by default does not support logging in as root. You can circumvent that by rebooting the machine and booting into recovery mode, you will be automatically logged in as root and the machine will be in runlevel 1 for maintenance work.
 
Old 08-30-2013, 06:11 AM   #10
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
you can set a traditional root account

Code:
sudo -i
passwd
was always my first job on *buntu
 
Old 08-30-2013, 10:16 AM   #11
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 286

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Firerat View Post
you can set a traditional root account

Code:
sudo -i
passwd
was always my first job on *buntu
It may be that I misunderstood the above.
I ran the above 2 commands. for passwd, I entered password.
I rebooted expecting that in login screen username w'd be there for root using which I w'd enter the system. But no, nothing like this.
What I misunderstood?
 
Old 08-30-2013, 12:19 PM   #12
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
root is still hidden from the graphical login

you shouldn't use root for a 'desktop environment'
instead. get a console with. ctrl+alt+F1 ( through to F6 )

get back with alt+f7 ( might be 8 or 9 )
'
 
1 members found this post helpful.
Old 08-30-2013, 05:05 PM   #13
jefro
LQ Guru
 
Registered: Mar 2008
Posts: 13,345

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692
Not sure going to a console from a gui would work. I'd think some part of home might still be locked.

Most distro's are trying to keep common folks safe. They do that by default settings. One has been a hot button topic as to log on to root either by init 3 or gui. Most admins don't think that is a good idea. So, some users do know of ways to enable root again.

We have all basically agreed that /home is locked by some means and you have to get around those means. Either live boot, single user, init 3 or such. Normally home is a needed mount point for a common user to log on.
 
Old 08-30-2013, 05:22 PM   #14
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
yeah, but with root can switch runlevel

or just stop the gui login
Ubuntu so,, as root

Code:
service gdm3 stop
 
Old 08-30-2013, 05:52 PM   #15
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 3,112

Rep: Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754
Quote:
Originally Posted by TobiSGD View Post
Usually the WM or DE itself will prevent from unmounting, since they have configuration files, caches and other functionality, like virtual filesystems in the users directory. So if you want to unmount /home you have to logout or better switch to runlevel 1 (or the single target if your distro uses systemd).
This works SOMETIMES. If you are using a system with a .gvfs mount though, it won't because the filesystem will always be busy as long as gnome is active. It is also possible that EVEN THEN it won't dismount - because some GUI application has a file open (sometimes just for logging errors) and THAT will prevent you from dismounting.

If you want to find out what is preventing it, do a "fuser -mu /home". This will list any processes that have files open on the /home filesystem (and list how it is used - see the fuser manpage for all that) and the user name associated.

Last edited by jpollard; 08-30-2013 at 05:53 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth on Ubuntu13.04 not functioning! ravisingh1 Linux - Networking 2 08-26-2013 08:19 AM
Missing unmount and unmount.cifs johnmccarthy Linux - Newbie 3 11-19-2011 07:01 AM
Difficult: 'buntu upstart won't unmount /home partition cleanly tredegar Linux - Newbie 1 12-07-2009 10:01 PM
how to unmount a drive where my '/home' is mounted anindyanuri Debian 3 06-25-2006 08:46 AM
command 'unmount' not found - how can i unmount??? GloVe Linux - General 1 10-04-2003 06:33 AM


All times are GMT -5. The time now is 12:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration