USB Automount with Eden?
#1
Hi

If there is a user out there who got USB Automount with Eden under ubuntu without a windowmanager (pure XBMC use) please post here.
Reply
#2
apt-get install halevt
Reply
#3
Ok. My problem is that with Ubuntu and Eden USB Automount isnt working. Ubuntu itselfe should mount the USB Drives in the /media directory.

Does this work with halvet
Reply
#4
I think "ubuntu" only mount in gnome. In gnome-less xbmc xbmc does the mounting. In the past this have required permssion settings and missing package.

You could start by creating a debug logg and see if you can find the issue in it.
Reply
#5
Ok. But in my case i got a perfect running System with Dharma and after a update to Eden (same System, same Ubuntu, same Kernel) USB Automount stops working.

The fact that it is working in Dharma tells me that all required packages are installed an all user permissions are set. A simple update of xbmc should not make any difference... or am i wrong?
Reply
#6
Quote:or am i wrong?
I dont know, but it did stop working didn't it?

In theory anything could happen
1) Perhaps Eden requires other packages than Dharma did?
2) If xbmc does the mounting, it may be simply be broken in pre-eden.
3) Perhaps Eden requires other permissions than Dharma did?
4) Eden may have brought in new packages/ new versions of packages that broke your system.

Anything could happen. In 9.11 you could not install firefox (with default settings) without breaking usb mounting. The problem was probably that something in the policykit system was upgraded compare to xbmc-live.
Reply
#7
vikjon0 Wrote:I dont know, but it did stop working didn't it?

In theory anything could happen
1) Perhaps Eden requires other packages than Dharma did?
2) If xbmc does the mounting, it may be simply be broken in pre-eden.
3) Perhaps Eden requires other permissions than Dharma did?
4) Eden may have brought in new packages/ new versions of packages that broke your system.

Anything could happen. In 9.11 you could not install firefox (with default settings) without breaking usb mounting. The problem was probably that something in the policykit system was upgraded compare to xbmc-live.

Ok. I nedd someone who can confirm this issues...
Reply
#8
john.cord Wrote:Ok. I nedd someone who can confirm this issues...

Works fine for me but I built a my pre-eden on natty. I used this guide http://wiki.xbmc.org/index.php?title=XBMCbuntu

Check this section... http://wiki.xbmc.org/index.php?title=XBM..._Automount

I know dharma uses the user you create to run xbmc. Not sure what pre-eden does. For my build I created an 'xbmc' user. Hope this helps.
Reply
#9
Ok, so you got USB Automount working with udsik usbmount?
Reply
#10
john.cord Wrote:Ok, so you got USB Automount working with udsik usbmount?

Apparently it only works if XBMC is running as the 'xbmc' user. I can't seem to get it working any other way.
Reply
#11
Funny, i tryed it many times with a "xbmc" user and it did not work any time...
Reply
#12
ok, checked my log and atm the disks are getting mounted by udiskmount. my only question is why this working setup stops working with a eden built.
Reply
#13
john.cord Wrote:ok, checked my log and atm the disks are getting mounted by udiskmount. my only question is why this working setup stops working with a eden built.

Not sure but you can try the following. The only problem is that everything will be mounted by the 'xbmc' user and therefore be have 700 permissions and be owned by xbmc.

Code:
# sudo apt-get purge xbmc-live udisks usbmount
# sudo adduser xbmc --gecos XBMC
# sudo usermod --group adm,sudo,cdrom,floppy,audio,video,plugdev,netdev,powerdev,fuse,polkituser xbmc

if you get an error about groups not existing then just remove those groups from the command

Code:
# sudo apt-get install udisks usbmount
# sudo nano /etc/usbmount/usbmount.conf
Change line
Code:
FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"
to
Code:
FILESYSTEMS="ntfs vfat ext2 ext3 ext4 hfsplus"
Set permissions for user xbmc to handle udisks polices
Code:
sudo nano /var/lib/polkit-1/localauthority/50-local.d/custom-actions.pkla
Put this in the file:
Code:
[Actions for xbmc user]
Identity=unix-user:xbmc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedesktop.udisks.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
Then reinstall xbmc-live
Code:
# sudo apt-get install xbmc-live
The key is to have the xbmc user setup before installing xbmc-live.

I'm going to try this as it looks like it better suits my needs. Good luck.
Reply
#14
plz let me know if it works...
Reply
#15
Thumbs Up 
john.cord Wrote:plz let me know if it works...

Ok so scratch all those other solutions. Undo everything you have tried before. I've found a working solution which uses udev. So make sure it's installed, which it most likely is.

Create a udev rule file:
Code:
# sudo vi /etc/udev/rules.d/11-media-by-label-auto-mount.rules

And put this in it:
Code:
KERNEL!="[color=red]sd[a-z][0-9][/color]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="[color=red]usbhd[/color]-%k"

# Global mount options
[color=red]ACTION=="add", ENV{mount_options}="relatime"[/color]
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,[color=red]uid=1000,gid=1000[/color],umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"




Note that I have highlighted some things in red that I changed to suit my needs.

First, I changed
Code:
"sd[a-z][0-9]"
to
Code:
"sd[b-z][0-9]"

since sda is my internal HDD.

I commented out ACTION=="add", ENV{mount_options}="relatime" so it would look like:
Code:
#ACTION=="add", ENV{mount_options}="relatime"
I believe it was causing some problems for me.

For ENV{dir_name}="usbhd-%k", you can change usbhd to whatever you want. It will be the prefix for the mount name in the event it does not have a label.

Last, the UID and GID I changed to 1000 which is my main user.



Give credit where credit is due is what I say.

Original writeup is @ https://wiki.archlinux.org/index.php/Udev

Some other links that I found that may help are:

http://ubuntuforums.org/showpost.php?p=1...ostcount=8
http://igurublog.wordpress.com/downloads/script-devmon/
Reply

Logout Mark Read Team Forum Stats Members Help
USB Automount with Eden?0