How to automount a memory card?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to automount a memory card?

Stefano Salvi-2
I have a wbsd card reader installed into my PC.
I use SID (installation of Sarge, than update to Sid).
The devces for the card are correctly created on insetion (/dev/mmcblk0,
/dev/mmcblk0p1) with user root and group disk.
If I manually mount the device, it works correctly but, differently from
any USB disk, the partition is not automatically mounted.
I looked for any information or hint about udev and
gnome-volume-manager, but I found very little end confusimg docs in
internet.

Thank you
        Stefano Salvi


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to automount a memory card?

Josselin Mouette
Le dimanche 06 novembre 2005 à 12:42 +0100, Stefano Salvi a écrit :
> I have a wbsd card reader installed into my PC.
> I use SID (installation of Sarge, than update to Sid).
> The devces for the card are correctly created on insetion (/dev/mmcblk0,
> /dev/mmcblk0p1) with user root and group disk.
> If I manually mount the device, it works correctly but, differently from
> any USB disk, the partition is not automatically mounted.
> I looked for any information or hint about udev and
> gnome-volume-manager, but I found very little end confusimg docs in
> internet.

If you want the partitions to be automounted, the devices should be
created with the "hal" group.
--
 .''`.           Josselin Mouette        /\./\
: :' :           [hidden email]
`. `'                        [hidden email]
  `-  Debian GNU/Linux -- The power of freedom

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to automount a memory card?

Stefano Salvi-2
Josselin Mouette ha scritto:
>>I looked for any information or hint about udev and
>>gnome-volume-manager, but I found very little and confusimg docs in
>>internet.
>
>
> If you want the partitions to be automounted, the devices should be
> created with the "hal" group.
I'v added to te file /etc/udev/rules.d/020_permissions.rules the lines:
----------------------
## MMC devices
BUS=="mmc", KERNEL=="mmcblk*", GROUP="hal"
----------------------
and now I get:
brw-rw----  1 root hal 254, 0 2005-11-06 18:00 /dev/mmcblk0
brw-rw----  1 root hal 254, 1 2005-11-06 18:00 /dev/mmcblk0p1
exactly the same as my pendrive:
brw-r-----  1 root hal 8, 0 2005-11-06 18:00 /dev/sda
brw-r-----  1 root hal 8, 1 2005-11-06 18:00 /dev/sda1
 that is regularly mounted

but still the MMC doens't get mounted!

What more must I do to get the card mounted?

Thank you
        Stefano Salvi


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to automount a memory card?

Sam Morris
Stefano Salvi wrote:

>>>I looked for any information or hint about udev and
>>>gnome-volume-manager, but I found very little and confusimg docs in
>>>internet.
>>
>>If you want the partitions to be automounted, the devices should be
>>created with the "hal" group.
>
> I'v added to te file /etc/udev/rules.d/020_permissions.rules the lines:
> ----------------------
> ## MMC devices
> BUS=="mmc", KERNEL=="mmcblk*", GROUP="hal"
> ----------------------
> and now I get:
> brw-rw----  1 root hal 254, 0 2005-11-06 18:00 /dev/mmcblk0
> brw-rw----  1 root hal 254, 1 2005-11-06 18:00 /dev/mmcblk0p1
> exactly the same as my pendrive:
> brw-r-----  1 root hal 8, 0 2005-11-06 18:00 /dev/sda
> brw-r-----  1 root hal 8, 1 2005-11-06 18:00 /dev/sda1
>  that is regularly mounted
>
> but still the MMC doens't get mounted!
>
> What more must I do to get the card mounted?

What happens when you 'pmount -d /dev/mmcblk0p1'?

--
Sam Morris
http://robots.org.uk/

PGP key id 5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to automount a memory card?

Stefano Salvi-2
Sam Morris ha scritto:

> Stefano Salvi wrote:
>
>>>> I looked for any information or hint about udev and
>>>> gnome-volume-manager, but I found very little and confusimg docs in
>>>> internet.
>>>
>>>
>>> If you want the partitions to be automounted, the devices should be
>>> created with the "hal" group.
>>
>>
>> I'v added to te file /etc/udev/rules.d/020_permissions.rules the lines:
>> ----------------------
>> ## MMC devices
>> BUS=="mmc", KERNEL=="mmcblk*", GROUP="hal"
>> ----------------------
>> and now I get:
>> brw-rw----  1 root hal 254, 0 2005-11-06 18:00 /dev/mmcblk0
>> brw-rw----  1 root hal 254, 1 2005-11-06 18:00 /dev/mmcblk0p1
>> exactly the same as my pendrive:
>> brw-r-----  1 root hal 8, 0 2005-11-06 18:00 /dev/sda
>> brw-r-----  1 root hal 8, 1 2005-11-06 18:00 /dev/sda1
>>  that is regularly mounted
>>
>> but still the MMC doens't get mounted!
>>
>> What more must I do to get the card mounted?
>
>
> What happens when you 'pmount -d /dev/mmcblk0p1'?
>
To manually mount the device, I've added an entry to fstab, so I get the
following messages:
------------------------------------------------------
salvi@asus:~$ pmount -d /dev/mmcblk0p1
resolved /dev/mmcblk0p1 to device /dev/mmcblk0p1
device /dev/mmcblk0p1 handled by fstab, calling mount
------------------------------------------------------

and the device regualrly appears on the desktop.

If I delete the device form /etc/fstab the result is:

---------------------------------------------
salvi@asus:~$ pmount -d /dev/mmcblk0p1
resolved /dev/mmcblk0p1 to device /dev/mmcblk0p1
mount point to be used: /media/mmcblk0p1
no iocharset given, current locale encoding is ISO-8859-15
Cleaning lock directory /var/lock/pmount/_dev_mmcblk0p1
device_whitelist: checking /etc/pmount.allow...
device_whitlisted(): nothing matched, returning 0
find_sysfs_device: looking for sysfs directory for device 254:1
find_sysfs_device: checking whether /dev/mmcblk0p1 is on
/sys/block/mmcblk0 (254:0)
find_sysfs_device: major device numbers matchfind_sysfs_device: minor
device numbers do not match, checking partitions...find_sysfs_device:
checking whether device /dev/mmcblk0p1 matches partition 254:0
find_sysfs_device: checking whether device /dev/mmcblk0p1 matches
partition 254:1
find_sysfs_device: -> partition matches, belongs to block device
/sys/block/mmcblk0
device_removable: corresponding block device for /dev/mmcblk0p1 is
/sys/block/mmcblk0
get_blockdev_attr: value of /sys/block/mmcblk0/removable == 0
Errore: il dispositivo /dev/mmcblk0p1 non è rimovibile
policy check failed
--------------------------------------------------------

and the device is not mounted.

I noticed that pmount reports that the device is not removable (that is
incorrect). How can I mark it removable?

Why, when the device is in fstab and pmount succedes it doesn't get
automounted?

Thank you again
        Stefano Salvi


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to automount a memory card?

Sam Morris
Stefano Salvi wrote:

>>>>>I looked for any information or hint about udev and
>>>>>gnome-volume-manager, but I found very little and confusimg docs in
>>>>>internet.
>>>>
>>>>If you want the partitions to be automounted, the devices should be
>>>>created with the "hal" group.
>>>
>>>I'v added to te file /etc/udev/rules.d/020_permissions.rules the lines:
>>>----------------------
>>>## MMC devices
>>>BUS=="mmc", KERNEL=="mmcblk*", GROUP="hal"
>>>----------------------
>>>and now I get:
>>>brw-rw----  1 root hal 254, 0 2005-11-06 18:00 /dev/mmcblk0
>>>brw-rw----  1 root hal 254, 1 2005-11-06 18:00 /dev/mmcblk0p1
>>>exactly the same as my pendrive:
>>>brw-r-----  1 root hal 8, 0 2005-11-06 18:00 /dev/sda
>>>brw-r-----  1 root hal 8, 1 2005-11-06 18:00 /dev/sda1
>>> that is regularly mounted
>>>
>>>but still the MMC doens't get mounted!
>>>
>>>What more must I do to get the card mounted?
>>
>>What happens when you 'pmount -d /dev/mmcblk0p1'?
>>
 >
 > [snip]
 >

> salvi@asus:~$ pmount -d /dev/mmcblk0p1
> resolved /dev/mmcblk0p1 to device /dev/mmcblk0p1
> mount point to be used: /media/mmcblk0p1
> no iocharset given, current locale encoding is ISO-8859-15
> Cleaning lock directory /var/lock/pmount/_dev_mmcblk0p1
> device_whitelist: checking /etc/pmount.allow...
> device_whitlisted(): nothing matched, returning 0
> find_sysfs_device: looking for sysfs directory for device 254:1
> find_sysfs_device: checking whether /dev/mmcblk0p1 is on
> /sys/block/mmcblk0 (254:0)
> find_sysfs_device: major device numbers matchfind_sysfs_device: minor
> device numbers do not match, checking partitions...find_sysfs_device:
> checking whether device /dev/mmcblk0p1 matches partition 254:0
> find_sysfs_device: checking whether device /dev/mmcblk0p1 matches
> partition 254:1
> find_sysfs_device: -> partition matches, belongs to block device
> /sys/block/mmcblk0
> device_removable: corresponding block device for /dev/mmcblk0p1 is
> /sys/block/mmcblk0
> get_blockdev_attr: value of /sys/block/mmcblk0/removable == 0
> Errore: il dispositivo /dev/mmcblk0p1 non è rimovibile
> policy check failed
> --------------------------------------------------------
>
> and the device is not mounted.
>
> I noticed that pmount reports that the device is not removable (that is
> incorrect). How can I mark it removable?
>
> Why, when the device is in fstab and pmount succedes it doesn't get
> automounted?

I ran into this problem this morning: are you using kernel 2.6.12 or
later? Since moving off 2.6.8, I have needed a newer libsysfs in order
to pmount external usb hard drives.

libsysfs1 1.3.0-2 from unstable does the job for me. I was tipped off by
 
<http://www.mail-archive.com/linux-usb-devel@.../msg36342.html>.

--
Sam Morris
http://robots.org.uk/

PGP key id 5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to automount a memory card?

Stefano Salvi-2
Sam Morris ha scritto:

>>
>> and the device is not mounted.
>>
>> I noticed that pmount reports that the device is not removable (that is
>> incorrect). How can I mark it removable?
>>
>> Why, when the device is in fstab and pmount succedes it doesn't get
>> automounted?
>
>
> I ran into this problem this morning: are you using kernel 2.6.12 or
> later? Since moving off 2.6.8, I have needed a newer libsysfs in order
> to pmount external usb hard drives.
>
> libsysfs1 1.3.0-2 from unstable does the job for me. I was tipped off by
> <http://www.mail-archive.com/linux-usb-devel@.../msg36342.html>.
I'm using SID, so I've kernel 2.6.14 and libsysfs1 1.3.0-2 installed.

My USB devices mount without any problem.

The proble is with a PCI cardreader (not an USB one) embedded into my
notebook.

Thank you anyway
        Stefano Salvi


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]