mounting SD card

How can I get opensuse 11.2 to automount sd cards?

Until recently I had SD card reader of my laptop turned off in BIOS, now I turned it on and hardware wise it is working fine (I can mount SD cards manually) - but how can I get opensuse to mount the cards automatically upon insertion? (is working for other media) It probably something trivial, but I missed it…

Thats a good question. I can’t remember how SD cards behave on my system (openSUSE 11, KDE 4.3) and I’m not using my laptop at the moment.

Try using this consle command

lshal -m

and observe what is reported after inserting an SD card.

These might help as well

dmesg |tail

fdisk -l

If the last command acknowledges the presense of the media, but it does not get mounted by your desktop, then it may possible to ‘automount’ the SD media via a udev rule. Which desktop are you using?

yes, lshal, dmesg and fdisk all acknowledge the presence of the SD card and I can definitely mount it (manually) so the udev thing sounds the like the thing I need to know - I am using Gnome.

(I wonder if all this has something to do with the fact that I installed 11.2 while the SD card was turned off in the BIOS - rest is working great…)

(I wonder if all this has something to do with the fact that I installed 11.2 while the SD card was turned off in the BIOS - rest is working great…)

I doubt it.

It would be interesting to know whether SD card automounting works ‘out of the box’ for others, and whether this depends on the specific hardware employed.

Anyway, after a quick google, I found this archlinux wiki article:

Udev - ArchWiki

Read the ‘Mounting SD Cards’ section. It will be interesting to see how you get on.

deano ferrari wrote:
> It would be interesting to know whether SD card automounting works ‘out
> of the box’ for others, and whether this depends on the specific
> hardware employed.

worked automatically here from the day in 2008 this 10.3 was born, and
still…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

thanks - copying the 11-sd-cards automount rule and reloading the rules with udevadm worked!

1 thing however: it does seem to use a different mechanism from the way e.g. USB drives currently work on my system, because there is no 11- rule in /etc/udev/rules.d/ for usb and when I try to unmount a sd card (with right click on the desktop) as user it complains about the absence of /dev/mmcblk0p1 in fstab and being not root, whereas I can unmount USB drives as user…

fipe wrote:
> when I try to unmount a sd card
> (with right click on the desktop) as user it complains about the absence
> of /dev/mmcblk0p1 in fstab and being not root, whereas I can unmount USB
> drives as user…

as far as i know:

don’t confuse the difference between drives you normally want
constantly connected (whether inside or outside the case [via IDE, USB
or SATA]) with a sd card (or USB hard drive) you want autodetected for
use…

inserted and then auto-detected and auto-mounted cards do not need to
be unmounted…further, they are not listed in fstab (instead they are
automatically written into /etc/mtab)…

auto detected drives/cards are automatically owned by the logged in user…

on the other hand placing a drive in fstab (whether SATA or USB) will
cause it to be (if so set) auto-mounted during boot and as a system
drive (vs a user connected device) owned by root and should be
unmounted by root prior to removing…(unless some/any users are so
authorized by being included in a group so designated)

hope i got all that right (?)


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

Le 30/04/2010 16:24, DenverD a écrit :

> inserted and then auto-detected and auto-mounted cards do not need to
> be unmounted…

of course they did, this is the reason for the “safely release” comand

jdd

I haven’t figured out yet what the difference of the udev rules way of automounting and the normal way is (is that also done through udev rules?)…

jdd wrote:
> of course they did, this is the reason for the “safely release” comand

news to me…how does one use this “safely release” command in
openSUSE? that is, do you open a terminal and what? type:


umount -safely release /media/[something]

or what??

i think i’ve heard that XP and (maybe) Ubuntu has such, but i’m not
aware of it in openSUSE…

well, google can find a single instance of “safely release” on the
entire opensuse.org site, try it yourself:

http://www.google.com/search?q=site%3Aopensuse.org+“safely+release”


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

Le 30/04/2010 21:07, DenverD a écrit :

> or what??

in dolphin, right clic on the device name “retirer en toute sécurité”
in french, so in english, I beg, “safely remove”.

Also with the last connected peripheral plasmoid, using the right
button (very difficult to explain - I try to join an image - refused
by nntp server :-()

here: http://en.opensuse.org/Live_USB_stick

"Finally, click the “Write” button, and wait for a few minutes. Once
the write completes, you should be able to exit the program and
“Safely Remove” your USB stick. "

USB flash disks are specially sensitive to the umount command, failing
to do so may detruct the file system completely :frowning:

The curious thing, at least under kde4 is that when you insert an usb
device, it’s not mounted. Only “available”. To have it mounted you
have to try an access (dolphin, for example)

only root can umount, but the user can “safely remove”. It’s probably
enough to issue the command “sync” to make the usb device clean.

jdd

The curious thing, at least under kde4 is that when you insert an usb
device, it’s not mounted. Only “available”. To have it mounted you
have to try an access (dolphin, for example)

Yes, that is correct for earlier versions of KDE4. However, this behaviour can now be set by user preference via the devce notifier as fas I understand. I use KDE4.3, and use ‘Places’ within Dolphin to mount/unmount external devices manually. (The actual detection is handled automatically).

only root can umount, but the user can “safely remove”. It’s probably
enough to issue the command “sync” to make the usb device clean.

Acually, the ‘Safely Remove’ does unmount the external filesystem as well (for hal/udev mounted devices). Type ‘mount’ from a console to confirm this.

1 thing however: it does seem to use a different mechanism from the way e.g. USB drives currently work on my system, because there is no 11- rule in /etc/udev/rules.d/ for usb and when I try to unmount a sd card (with right click on the desktop) as user it complains about the absence of /dev/mmcblk0p1 in fstab and being not root, whereas I can unmount USB drives as user…

There are rules assocated with usb devices, but the actual mounting location is set by hal, and so the custom udev rules are just replicating this for SD devices.

BTW, its not necessary to restart udev after adding/editing/removing rules anymore; its taken care of dynamically.

fipe wrote:
> I haven’t figured out yet what the difference of the udev rules way of
> automounting and the normal way is (is that also done through udev
> rules?)…

sorry, i don’t know enough about this to understand your
question…here is what i think i know:

if you plug anything into a running system’s USB port the system
should recognize it and make it available to you—is that “the
normal way” you mention?

on the other hand, if you want to always have a USB drive connected as
you boot, and always want that drive to be a certain place, with a
specific name (say /home/[you]/archives) then that needs an fstab
entry… (otherwise, if the drive is system auto-mounted the system
will assign both mount location and name)


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

jdd wrote:
> Once the write completes, you should be able to exit the program and
> “Safely Remove” your USB stick. "

ah, now i see…it is not a ‘command’ but rather an advisory to the
user that the read/write is complete and it is therefore safe to
remove the USB stick…

that advisory does not say it is now safe to issue an umount command
and THEN remove the stick…

as i said earlier: if it is auto-detected and auto-mounted you do not
have to unmount it (either as root or user), just remove it…

true, i had assumed the reasonable user would wait for all
read/write to cease…an assumption i probably should not have made,
so i should have said to wait for the system to tell you it is save to
remove the stick, without issuing an umount in the terminal…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

sorry, i don’t know enough about this to understand your
question…here is what i think i know:

if you plug anything into a running system’s USB port the system
should recognize it and make it available to you—is that “the
normal way” you mention?

@DenverD: The OP is specifically referring to his SD Card sevice, not regular usb storage media.

@jdd: I’ve just fired up my laptop to check SDHC mounting behaviour. With KDE 4.3, I can see the deivice in Dolphin’s ‘Places’ panel. Clicking on the device icon then allows me to mount it. (No custom udev rules required). Now, I realise you are using Gnome, but I’m not sure why the equivalent function is not available to you.

Le 01/05/2010 10:36, deano ferrari a écrit :

> @jdd: I’ve just fired up my laptop to check SDHC mounting behaviour.
> With KDE 4.3, I can see the deivice in Dolphin’s ‘Places’ panel.
> Clicking on the device icon then allows me to mount it.

yes

(No custom udev
> rules required).

this I don’t know

Now, I realise you are using Gnome, but I’m not sure
> why the equivalent function is not available to you.
>
>
no, In use Kde, but the OP may use Gnome.

jdd

My apology jdd. I meant @fipe. :slight_smile:

Le 01/05/2010 09:30, DenverD a écrit :
> jdd wrote:
>> Once the write completes, you should be able to exit the program and
>> “Safely Remove” your USB stick. "
>
> ah, now i see…it is not a ‘command’ but rather an advisory to the
> user that the read/write is complete and it is therefore safe to
> remove the USB stick…

no. It’s a command, even if not CLI. You have to safely remove your
USB device to be sure it’s harmless. I experienced writing several Gb
of data to USB (even USB flash card can have now up to 64Gb data),
this takes up to several hours. One can’t expect a user to know he
have to wait a so long time (mini devices don’t even have a led flashing).

> as i said earlier: if it is auto-detected and auto-mounted you do not
> have to unmount it (either as root or user), just remove it…
>
> true, i had assumed the reasonable user would wait for all
> read/write to cease…

and how do you know an application is not acessing your device?

an assumption i probably should not have made,
> so i should have said to wait for the system to tell you it is save to
> remove the stick, without issuing an umount in the terminal…
>
the system don’t tell you anything, unless you ask it

This procedure is not bullet proof, though, The green tick mark is
issued if the command retourn true (I beg it’s a “sync && umount”),
but often I notice the flashing led (if any) is still flashing 1 or 2
seconds after the green, so better not to be too fast.

jdd

just to be clear: I am using Gnome. if don’t do anything and I insert an SD-card nothing happens, but I can mount manually as root. If I put an 11-sd-cards-auto-mount.rules in /etc/udev/rules.d with an appropriate content (copied from the wiki), I do get an automatic mount, but it behaves differently from an automatic mount of e.g. an usb stick: I cannot unmount it as normal user…
(also the SD card is mounted in media in a directory with the device name, so e.g. /media/sd-mmcblk0p1, while USB mount with volume names).