# Error unmounting SD card

## sall

Whenever I right click on my SD card device icon and select safely remove. I get this error:

```

Unfortunately, the device system:/media/mmcblk0p1 (/dev/mmcblk0p1) named 'SD64' and currently mounted at /media/mmcblk0p1 could not be unmounted. 

Unmounting failed due to the following error:

Cannot open /media/.hal-mtab

```

Anyone have any idea whats going wrong here? This error does not happen with any other removable media. Thanks for help in advance!

----------

## mamac

Hi,

Could you post your 'emerge --info' so we know a bit about your system?

Can you post the output of 'grep -i mmc /usr/src/linux/.config', I'd like to know how you compiled your sd module.

Here's mine:

```

FRPC285 ~ # grep -i mmc /usr/src/linux/.config

# CONFIG_PCI_GOMMCONFIG is not set

CONFIG_PCI_MMCONFIG=y

CONFIG_MMC=m

# CONFIG_MMC_DEBUG is not set

# CONFIG_MMC_UNSAFE_RESUME is not set

# MMC/SD Card Drivers

CONFIG_MMC_BLOCK=m

CONFIG_MMC_BLOCK_BOUNCE=y

# MMC/SD Host Controller Drivers

CONFIG_MMC_SDHCI=m

# CONFIG_MMC_RICOH_MMC is not set

# CONFIG_MMC_WBSD is not set

# CONFIG_MMC_TIFM_SD is not set

```

Can you tell us as well in which groups your user is, mine is in:

```

tty disk wheel mail uucp audio cdrom video usb users cron plugdev games jean-marc

```

And finaly please post the output of 'ls -la /media'

Thanks

----------

## sall

```

craig@V2570nr ~ $ emerge --info

Portage 2.1.4.4 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 x86_64)

=================================================================

System uname: 2.6.24-gentoo-r8 x86_64 AMD Turion(tm) 64 Mobile Technology ML-32

Timestamp of tree: Mon, 23 Jun 2008 20:45:01 +0000

app-shells/bash:     3.2_p17-r1

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.4.4-r6

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.61-r1

sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.23-r3

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://mirror.datapipe.net/gentoo "

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

USE="1dap X a52 aac acl acpi alsa amd64 ammb apm arts berkdb bzip2 cdr cli cracklib crypt cups debug dri dts dvd fortran gdbm gpm gtk hal iconv isdnlog kde kerberos live lm_sensors mad midi mmx mp2 mp3 mudflap multilib musepack ncurses nls nptl nptlonly nsplugin openmp oss pam pcre perl pmu pppd python qt3 qt4 readline reflection samba session spl sse sse2 ssl tcpd theora unicode vorbis winbind xanim xorg xvid zlib" ALSA_CARDS="atiixp" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

```

craig@V2570nr ~ $ grep -i mmc /usr/src/linux/.config

CONFIG_PCI_MMCONFIG=y

CONFIG_MMC=m

# CONFIG_MMC_DEBUG is not set

# CONFIG_MMC_UNSAFE_RESUME is not set

# MMC/SD Card Drivers

CONFIG_MMC_BLOCK=m

CONFIG_MMC_BLOCK_BOUNCE=y

# MMC/SD Host Controller Drivers

CONFIG_MMC_SDHCI=m

# CONFIG_MMC_RICOH_MMC is not set

CONFIG_MMC_WBSD=m

# CONFIG_MMC_TIFM_SD is not set

craig@V2570nr ~ $

```

```

craig@V2570nr ~ $ groups

wheel floppy uucp audio cdrom usb portage craig plugdev

```

Also, here a few pages I had up on the forum to get my card reader working

https://forums.gentoo.org/viewtopic-t-696685-highlight-.html         How I got card recognized and working

https://forums.gentoo.org/viewtopic-t-697392-highlight-.html         How I got kde daemon to recognize card insert, unmount

https://forums.gentoo.org/viewtopic-t-697271-highlight-.html         Troubles w/ mmc_block

----------

## mamac

Good, because I also use kde, we could compare our systems.

Can you try to add your user to the disk group? You'll have to close the session and log in again, make sure your in the group with the groups command.

Post the output of 'ls -la /media'.

----------

## sall

For some reason it started working correctly today. Although, it mounts my drives in various places. Such as sda1 or sdc1

----------

## mamac

Do you have something in your /etc/fstab?

----------

## sall

sorry took so long, busy day.. Any way here is my fstab:

```

#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pa                                                                                                                                ss>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda1               /boot           ext2            noauto,noatime  1 2

/dev/hda3               /               ext3            noatime         0 1

/dev/hda2               none            swap            sw              0 0

/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0

#/dev/fd0               /mnt/floppy     auto            noauto          0 0

/dev/sda1               /mnt/usbstick   vfat            noauto,user,rw,umask=000                                                                                                                                0 0

/dev/sdb1               /mnt/gpx        vfat            noauto,user,rw,umask=000                                                                                                                                0 0

#/dev/mmcblk0p1          /media/mmcblk0p1        vfat            auto,user,rw,syn                                                                                                                                c,umask=000     0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec    0                                                                                                                                 0

```

[/code]

----------

## mamac

Good that the line for the mmc is commented, you don't need anything in there regarding your SD card.

Is there any particular reason why you have a line for your USB stick? I doubt there could be any interference with mmc reader but...

----------

## sall

I just commented out all those lines pertaining to my mp3 player and my flash drive. As well, as you noticed before SD card fstab line is commented out. This seemed to do the trick, if I have anymore prblems I'll be sure to let ya know. Thanks!

----------

