Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB Automounting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Torretto1
n00b
n00b


Joined: 28 Sep 2014
Posts: 7

PostPosted: Thu Oct 02, 2014 11:48 pm    Post subject: USB Automounting Reply with quote

Hey there, brand new to Gentoo. Love it so far but I'm just stuck on trying to get a few things working. One of them is automounting USB. On most other distros when you plug in a usb device it mounts automatically. I cannot seem to get this to work, when i connect a USB drive it gives me an error message :
Not able to mount <disk name>
Not authorized to perform operation
I haven't been able to find a solution to this, I have seen a lot of mention about editing /etc/fstab but I believe that would only work with one specific drive. I want it to work when any USB disk is connected. Thanks in advance for any help that you folks can provide. BTW I am using Genkernel and MATE DE.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Fri Oct 03, 2014 8:27 am    Post subject: Reply with quote

Your user needs to be in a group.

Code:
roman@localhost ~ $ groups
wheel audio cdrom video games cdrw usb vboxusers android plugdev roman wireshark dropbox


Please provide the output of the command groups as your ordinary user. In the past there was something called pmount to use it.

On a sidenote, why don t you mount it manually as root? You know where it is mounted and anthing else.

As I used a full blown desctop environment some auto mounted some not, but basically you need a service which does this for you.

Have you ever considered looking at the search engine of your choice first?

https://www.google.at/search?q=gentoo+wiki+automounting&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&channel=fflb&gfe_rd=cr&ei=V14uVIO4EYSh8welkYGwDQ

gives

http://wiki.gentoo.org/wiki/AutoFS

more relevant

http://wiki.gentoo.org/wiki/Mdev/Automount_USB

my choice because I know what is done and it always works. Relying on a daemon to mount stuff never worked for me as I was a bit more lazy user. Manually mounting as user root with the mount falgs user so any user can rw a device always worked

http://wiki.gentoo.org/wiki/Mount

http://wiki.gentoo.org/wiki/USB/HOWTO
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Fri Oct 03, 2014 9:44 am    Post subject: Re: USB Automounting Reply with quote

Torretto1 wrote:
Hey there, brand new to Gentoo. Love it so far but I'm just stuck on trying to get a few things working. One of them is automounting USB. On most other distros when you plug in a usb device it mounts automatically. I cannot seem to get this to work, when i connect a USB drive it gives me an error message :
Not able to mount <disk name>
Not authorized to perform operation
I haven't been able to find a solution to this, I have seen a lot of mention about editing /etc/fstab but I believe that would only work with one specific drive. I want it to work when any USB disk is connected. Thanks in advance for any help that you folks can provide. BTW I am using Genkernel and MATE DE.


How do your start your X session? Do you have USE="... consolekit policykit ..." in your make.conf? Do you have "consolekit" added to the default runlevel? What's the output for this command if you run it in xterm (or similar) from within your X session?

Code:
$ ck-list-sessions

_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Torretto1
n00b
n00b


Joined: 28 Sep 2014
Posts: 7

PostPosted: Fri Oct 03, 2014 8:40 pm    Post subject: Reply with quote

In response to tw04l124, the groups account gives the following:
[ziggy@ziggy_gentoo ~]$ groups
wheel audio cdrom video usb users portage plugdev ziggy
And I have found several articles like those that you listed but I've had trouble getting any of them to work. I'll try the ones you list there specifically.

In response to i92guboj:
I have my dm (lightdm) in the default runlevel so it loads on boot, and then it logs me directly into my DE. I did not have consolekit in the default runlevel, nor did I have consolekit or policykit in my make.conf file. Output of the
Code:
$ ck-list-sessions
command is:
Code:
[ziggy@ziggy_gentoo ~]$ ck-list-sessions
Session4:
   unix-user = '1000'
   realname = '(null)'
   seat = 'Seat1'
   session-type = ''
   active = TRUE
   x11-display = ':0'
   x11-display-device = '/dev/tty7'
   display-device = ''
   remote-host-name = ''
   is-local = TRUE
   on-since = '2014-10-03T23:44:48.625822Z'
   login-session-id = '53'

_________________
Laptop:
Core i5 2.5 Quad
6GB RAM
750 GB Hard Drive
Gentoo with Genkernel 3.14.14
MATE Desktop Environment
LightDM Display Manager
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Sat Oct 04, 2014 12:23 am    Post subject: Reply with quote

With such output from ck-list-sessions, automounting should work.

If it doesn't seem as if it did, recheck with 'udisksctl mount'
Back to top
View user's profile Send private message
Torretto1
n00b
n00b


Joined: 28 Sep 2014
Posts: 7

PostPosted: Sat Oct 04, 2014 1:21 am    Post subject: Reply with quote

It seems like it is, or would be working, just that my user doesn't have permissions to mount. When I connect a USB drive an error pops up automatically saying not authorized to perform operation. The fact that it is automatic would seem to mean that it would be auto mounting given the right permissions
_________________
Laptop:
Core i5 2.5 Quad
6GB RAM
750 GB Hard Drive
Gentoo with Genkernel 3.14.14
MATE Desktop Environment
LightDM Display Manager
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Sat Oct 04, 2014 2:00 pm    Post subject: Reply with quote

Something doesn't look right here.

Post taken from one terminal, one after the other:
1. ck-list-sessions
2. 'ls -l <the device node of the plugged device>'
3. 'getfacl <the device node of the plugged device>'
4. 'udevadm info <the device node of the plugged device>'
5. full output of 'udisksctl mount -b <the device node of the plugged device>'

Cause it seems that you're giving the output of the commands for different users.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Sat Oct 04, 2014 3:34 pm    Post subject: Reply with quote

As VoidMage says, it should work given that output from ck-list-sessions.

The error you are getting is exactly the kind of error you get when you are not attached to a valid consolekit session. So, knowing if mounting works from command line using udisksctl is imperative. The rest of that info will help us to narrow the issue.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Torretto1
n00b
n00b


Joined: 28 Sep 2014
Posts: 7

PostPosted: Sat Oct 04, 2014 8:39 pm    Post subject: Reply with quote

Solved the problem! Turns out for some reason I had installed systemd at some point, uninstalled that, and problem is now solved. USBs automount exactly how I want them too. I was having trouble figuring out why everyone was so against sytemd on every forum or anything I had read, but I now fully understand. Removing it has fixed both of the main issues I was having. I'm very glad to have these forums as a resource as I learn my way around!
_________________
Laptop:
Core i5 2.5 Quad
6GB RAM
750 GB Hard Drive
Gentoo with Genkernel 3.14.14
MATE Desktop Environment
LightDM Display Manager
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Sun Oct 05, 2014 1:04 am    Post subject: Reply with quote

:roll:
Actually, the real problem with systemd is a completely different matter...

What might have played a role here, is that consolekit and systemd just don't play well together, as the former was one of the components the later sought to assimilate.
Back to top
View user's profile Send private message
Torretto1
n00b
n00b


Joined: 28 Sep 2014
Posts: 7

PostPosted: Sun Oct 05, 2014 1:07 am    Post subject: Reply with quote

Lol well either way I definitely know to avoid it lol. And I had read that they dont work well together, which is what led me to try uninstalling systemd. Thanks guys
_________________
Laptop:
Core i5 2.5 Quad
6GB RAM
750 GB Hard Drive
Gentoo with Genkernel 3.14.14
MATE Desktop Environment
LightDM Display Manager
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum