OpenSuse 11.3 / failure to mount sd memory card

My SD card is recognised by OS 11.3 if it is inserted at boot up. If I remove it and reinsert it, the devise monitor states ‘no devices plugged in’. This is a problem that I have also had (and reported in these forums) with 11.0, 11.1, 11.2.

Now I notice that there is a section for ‘removable devices’ in the system configuration. But even if I click the box ‘enable automatic mounting of removable media’ and the sub-box ‘automatically mount removable media when attached’ the SD card is not remounted, there remain ‘no devices plugged in’.

Is there another setting somewhere that I have missed?

KDE - Yes?
No more settings that I know of

What does fdisk -l report

And to add to caf’s question: what does mount report (I am the conspicius one here, seen to many posts about something being not mounted without prove).

Yes, I am using KDE:

fdisk -l after boot, before removing SD memory card (without partition data part):

Disk /dev/mmcblk0: 4026 MB, 4026531840 bytes
31 heads, 30 sectors/track, 8456 cylinders
Units = cylinders of 930 * 512 = 476160 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

    Device Boot      Start         End      Blocks   Id  System

/dev/mmcblk0p1 9 8457 3928064 b W95 FAT32

Disk /dev/dm-0: 63.4 GB, 63392710656 bytes
255 heads, 63 sectors/track, 7707 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn’t contain a valid partition table

fdisk -l after removing and reinserting SD memory card:

Disk /dev/dm-0: 63.4 GB, 63392710656 bytes
255 heads, 63 sectors/track, 7707 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn’t contain a valid partition table

mount returns the following:
/dev/sda5 on / type ext4 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
devtmpfs on /dev type devtmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/mmcblk0p1 on /local type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true)
/dev/mapper/vg1-lvol1 on /home type ext3 (rw,acl,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/harvey/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=harvey)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

While I do not love it when info is left out of the computer output (and please next time put computer output between CODE tags to keep the readability), I see that the device special file of the device is /dev/mmcblk0.

I also see it is mounted at /local. That must mean that there is an entry in /etc/fstab, because HAL/DeviceKit will noy mount there IMHO.
Is there an entry for this in /etc/fstab (inother words, post the contents of it). When there is one, it will not be handled by HAL/DeviceKit.

You say: “My SD card is recognised by OS 11.3 if it is inserted at boot up.” I have a few questions about that:
. What do you mean by "recognised? Is it shown in dmesg output?
. Do you mean that it is not only recognised, but also mounted without further intervention? (we see that it is mounted, thus it is rather sure that it is recognised, but your wording makes me uncertain).
. And when it is mounted, does this happen om boot, or afer login?

EDIT:
And another one about your wording. “If I remove it and reinsert it …”. Do you mean that you jst pull it out without unmounting?

for the record, here is the whole output from fdisk -l, copied and pasted from the terminal screen. It reflects the status immediately after boot and login

linux-qj38:/home/harvey # fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000283a4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         126     1012063+  82  Linux swap / Solaris
/dev/sda2            4866        9730    39072631+  8e  Linux LVM
/dev/sda3   *         127        4865    38066017+   f  W95 Ext'd (LBA)
/dev/sda5             127        2022    15229588+  83  Linux
/dev/sda6            2023        4865    22836366   8e  Linux LVM

Partition table entries are not in disk order

Disk /dev/mmcblk0: 4026 MB, 4026531840 bytes
31 heads, 30 sectors/track, 8456 cylinders
Units = cylinders of 930 * 512 = 476160 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1               9        8457     3928064    b  W95 FAT32

Disk /dev/dm-0: 63.4 GB, 63392710656 bytes
255 heads, 63 sectors/track, 7707 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table
linux-qj38:/home/harvey # 

I cannot recognise and entry in fstab:


/dev/disk/by-id/ata-ST98823AS_5PK3MVP2-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST98823AS_5PK3MVP2-part5 /                    ext4       acl,user_xattr        1 1
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/disk/by-id/mmc-SD04G_0xb0095a67-part1 /local               vfat       users,gid=users,umask=0002,utf8=true 0 0
/dev/vg1/lvol1       /home                ext3       acl,user_xattr        1 2

By ‘recognised’ I mean it is shown in the tray object ‘Devices recently plugged in’ => 3.7 GiB Media
This is, obviously after booting and logging in
It makes no difference if I umount first or not, the memory card is not ‘recognised’ (‘No Devices plugged in’) after reinserting

Thanks, it is a relief to see it in readable form :slight_smile:

It IS in your /etc/fstab:

/dev/disk/by-id/mmc-SD04G_0xb0095a67-part1 /local               vfat       users,gid=users,umask=0002,utf8=true 0 0

The mount point is* /local *(as we saw earlier), this means this is the entry we are looking after.

The device special file is /dev/disk/by-id/mmc-SD04G_0xb0095a67-part1. When you do an

ls  -l /dev/disk/by-id/mmc-SD04G_0xb0095a67-part1

you will see it is a symbolic link to* /dev/mmcblk0p1*, which is shown in /etc/fstab as the only partition on the device. It is also shown in the mount output you posted earlier, where it shows it as mounted on* /local *(full circle).

Thus what happens at boot (way before login) is that the partition is mounted on /local. That is where entries i*n/etc/fstab *are for. When the device is not available, that will give you a mount error while booting (it must be possible to find this using dmesg). I do not know who configured it like that. Either the device was alreeady inserted during install and thus automaticaly (well not fully, there is always a way to influence the partitioning/mounting during the install process), or the system administrator (you?) configured it using YaST (or manual).

When you want to remove the device, you have to unmount it before you start using your fingers on it!

When you then insert it again, the hardware will be detected most certainly (that is not the same is it showing up somewhere in a silly Desktop aplication). But it will NOT be mounted because the software responsible for mounting “automaticaly” so called media devices for the desktop (HAL/DeviceKit) refuse to do so when there is an entry for the device in /etc/fstab. This on the assumption that when there is such an entry, that entry is not made for nothing and HAL/DeviceKit should not overrule this.

In this case mounting must be done by root with e.g.

mount /local

or

mount /dev/disk/by-id/mmc-SD04G_0xb0095a67-part1

or

mount -a

(the last one wil mount all entries in* /etc/fstab*, except of course what is allready mounted.

In fact you must make a choice between two:

  1. it is a fixed device/partition, to be mounted on boot and to be unmounted at shutdown (of course, for maintanace reasons (un)mounting by hand is not forbidden, but not the normal case);
  2. use it as a “come and go” device like CDs/DVDs/USB-sticks (some people call this “external” devices, do not know why, but this may help you understanding). This means remove the entry in* /etc/fstab* and insert the device AFTER login. It will then be mounted on a directory inside /media and be available to the one that is loged in. Unmount using the device notifier before you remove.

Heeeee, long story. I hope you understand. Feel free to ask clarification.

It is a obviously a ‘come and go’ device, since it can be added and removed at will. So 2) is the alternative to be considered. But I would be unhappy to be forced to insert it only after login, to be sure it gets mounted. Still, if that works, it is better than having to reboot every time I want to move the card from my laptop to camera and back (for example).

I removed the line

/dev/disk/by-id/mmc-SD04G_0xb0095a67-part1 /local               vfat       users,gid=users,umask=0002,utf8=true 0 0

from /etc/fstab and, indeed, I can insert and remove the card after login at will with success. By the way, I cannot unmount the card successfully first - there is always an error message telling me that the device is in use. I remove it anyway and insert it again. Everything is fine.

I also tried rebooting with the card in the card slot (no entry in /etc/fstab). It is present after login, but no longer after removal and reinsertion, as before.

We are on the way now. Not at least because we do understand a bit what is going on.

It will not unmount as long as some process has still opened a file inside the mounted parrtition. Thus when it complains about that, you should make sure that you stopped any apps using files in it (or at least close those files from witthin the apps). That includes file managers being positioned inside a directory in there, because it thus has that directory open. So try to indentify which program is still using it.

About it being inserted on boot, I am not sure what happens. When I have some time to day I might test with an USB stick here. The problem as I see it is then that HAL has no running desktop to ask what to do with it. Thus what is it that HAL decides to to?

Again it would be interesting to now where the partition is mounted, and who is the owner of the mountpoint in all steps:

  1. where is it mounted when it is inserted during boot and who is the owner of that mountpoint?
  2. same when you insert after login;
  3. same when after a “forced” removal and insertion again (my idea is that it will use a different mount point).
    In all three casess you can find out with
mount | grep mmcb

the mountpoint is after the word on. Then do

ls -ld  <mountpoint>
 mount | grep mmcb 

returns nothing. I booted with the memory card inserted and it shows up in the device list (‘devices recently plugged in:’) as usual

Sorry, I want real information from the CLI, not from some desktop thingy :(. When the system does whatwe want (or at least we know what the system does) we can then find out how the next layer up (the desktop) presents this.

Strange that there is no output. Then do it as before, just

mount

and find the correct line yourself (or post the whole output here).

 harvey@linux-qj38:~> mount
/dev/sda5 on / type ext4 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
devtmpfs on /dev type devtmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/mapper/vg1-lvol1 on /home type ext3 (rw,acl,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/harvey/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=harvey)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
harvey@linux-qj38:~> 

believe it or not! The desktop thingy (:slight_smile: shows it, as usual, until I remove the card and reinsert it again.

By the way, the error message from the desktop thingy when I try to unmount comes even if I have done nothing (not even retrieved the file list) with the card. There is no application blocking the umount.

I do not understand. Compare the output with the mount yoou showed earlier. The line with /local is not there. Thete is no line for the device at all!
Did you make this right after boot? And the line in /etc/fstab is still there? Or am I missing something (to many threads in myhead :wink: ).

Yes, right after boot and login. Here is /etc/fstab as well

/dev/disk/by-id/ata-ST98823AS_5PK3MVP2-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST98823AS_5PK3MVP2-part5 /                    ext4       acl,user_xattr        1 1
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

/dev/vg1/lvol1       /home                ext3       acl,user_xattr        1 2

Thanks, the line is indeed removed from /etc/fstab, thus it does not mount on boot via the standard procedure.

And you have a list (after GUI loginin KDE I supppose) where it says it is plugged in. Is that the Device notifier (the console like icon with the USB symbol and the half CD at the top). And when you click on it and choose something like: open with Dolphin and then do te mount to get information?

Yes, I had already removed the line from /etc/fstab as you had suggested.
Yes, that is the icon. But I do not need to mount it, it is already mounted after boot and login; I only need to choose what to do with it, like open with Dolphin. But even if I do nothing and try to umount, I get the error message saying it is blocked by another application.

Nope, it is not mounted. It only gets mounted (by HAL) when you choose one of those options. Try the “open with Dolphin” and do the mount again. You will see the difference.

There is no difference:

  1. Boot, login, insert card, unmount card => error message device blocked by another application
  2. Boot, login, insert card, open with dolphin, unmount card => error message device blocked by another application
  3. Boot, login, insert card, open with dolphin, open file with OOo-Writer, close file, unmount card => error message device blocked by another application

As KDE behaviour is still a bit flaky (Bluetooth mouse having to be connected by hand at every boot; screen freezing=> reboot is only way out; corrupted icons etc), I decided to try Gnome.

The SD card problem provides slightly more information under Gnome:
Boot, login, insert card: Nautilus shows 2 different icons in the window ‘computer’:

  1. a blue ‘card’-like icon with the text 4.0 GB File System and 2) a ‘disk’-like icon called ‘sd-mmcblk0p1’

Right click on 1) has a command ‘mount’ in the menu. Selecting it gives error message ‘Internal error: No mount object for mounted volume’
Right click on 2) has a command ‘unmount’ in the menu. Selecting it gives the error ‘Unable to unmount location - umount: /media/sd-mmcblk0p1 is not in the fstab (and you are not root)’. Double-click on 2) opens it and the files are accessible. I assume the file system on the card is now ‘mounted’. A click on the unmount symbol next to the ‘sd-mmcblk0p1’ icon in the left-hand ‘places’ column of the window restores the view described above after boot, login etc. I assume the file system is now unmounted.

On now removing the card from the slot both icons disappear from the window; reinserting it restores both icons.

I guess the kind of behaviour I am expecting is exactly the same as for a USB memory stick, which behaves just as I want when I insert it and remove it (after umount, of course!) (they are both removable memories, so why should they not behave similarly?)

Does anyone know how to set this up for an SD card?