You are not logged in.

#1 2012-11-26 21:26:22

notphunny
Member
Registered: 2011-05-25
Posts: 6

udev problem with auto mounting n900's internal eMMC

So problem is that this rule isn't activated when I connect my n900 because before
mounting can be possible I need to press "mass storage" button on n900...
I confirmed this with udevadm monitor

So I tried to put this in my rule:
RUN+="/usr/bin/sleep 2s"
And was hooping that if i press "mass storage" before this 2 seconds expire
it would mount...
but it didn't smile
any ideas?
ty

# Start at sdb to avoid system harddrive. 
KERNEL!="sd[b-z][0-9]", 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}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002,dmask=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"

Offline

#2 2012-11-26 21:42:19

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: udev problem with auto mounting n900's internal eMMC

I gave up using udev rules for this when they failed to accommodate a similar arrangement on my android. Now I use udiskie, so I tap the required buttons on the device, plug in the cable when it tells me to, and it mounts just fine.

OK, completely different devices, I know - but give it a try anyway. smile

Offline

#3 2012-11-26 22:04:44

notphunny
Member
Registered: 2011-05-25
Posts: 6

Re: udev problem with auto mounting n900's internal eMMC

Unfortunately n900 doesn't have app to setup "mass storage" mode before you plug your device..
I could probably run script from terminal that would do that, but I was hoping there is some simple
solution on PC end of communication smile

Offline

#4 2012-11-26 22:51:20

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: udev problem with auto mounting n900's internal eMMC

You will need to modify the Maemo /etc/init.d files to always use "Mass Stroage". However, I would never do that with my N900. The PC Suite mode is vary usefull, becuase it sets up the USB networking for you.

Infact, I never use the "Mass Storage"..., I use BlueTooth to transfer files or ssh. To each his own.

Now, after you select "Mass Stroage" you can configure your Arch system to auto mount the storage device, or if you are using a DE like KDE you can configure KDE to auto mount removeable devices.

Last edited by hunterthomson (2012-11-26 22:53:01)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

Board footer

Powered by FluxBB