"Safely remove" kills SD drive (Maverick, Gnome)

Marius Gedminas marius at pov.lt
Thu Oct 7 11:44:14 UTC 2010


On Thu, Oct 07, 2010 at 12:31:23PM +0200, Thierry de Coulon wrote:
> Once again I'm new both to Ubuntu and Gnome (but not to Linux), and I
> do know maverick is still RC, so I'm not criticizing, just asking.
> 
> I have this (strange) behaviour:
> 
> My Lapotop has an SD slot that is identified as /dev/sdb
> My /etc/fstab has  /dev/sdb1 /media/sd  auto   noauto,users,exec,rw 0 0
> 
> If I boot with an SD card in the slot, it gets mounted on /media/sd (despite 
> the noauto) and an icon appears on the desktop.

I'm pretty sure this is what happens:

  * The laptop boots and doesn't mount your SD card (because of the
    'noauto')

  * When you log in, Nautilus (or whatever piece of the GNOME stack
    that's responsible for removable devices) notices that you have an
    SD card plugged in and automounts it.

So you have no automount on boot, but you have automount on login/card
insertion.  To disable that, play with Nautilus settings, maybe?  An
interesting gconf key is /apps/nautilus/preferences/media_automount,
I'm sure you can find the corresponding checkbox in the Nautilus
preferences box.  I don't know for sure that Nautilus is still
responsible for automounting devices -- it could be udisks, or
gnome-disk-utility, or something else; I don't know if that gconf key is
actually used.

> If I  right-click on the icon and choose "Safely remove", it umounts, but the 
> slot becomes unvailable (if you try to mount or fdisk /dev/sdb, it says it 
> does not exist).

There used to be three separate options (eject, unmount, safely remove),
see e.g. https://bugzilla.gnome.org/show_bug.cgi?id=598690
Have they finally been consolidated into one in Maverick?  Which is
probably a good thing, in most cases...

Safely Remove approximately means "turn off power to the USB device".
This is the right thing to do for USB drives (it turns off their LED,
telling the user it's now safe to remove), but not a good thing for an
integrated SD card reader.  Please file a bug about this.

> However:
> 
> I created two scripts that read:
> 
> mount /media/sd
> umount /media/sd
> 
> I created a drawer in the panel and put the scripts there. If I mount and 
> umount my SD cards with the scripts, everything works very well (i.e. the SD 
> card mounts, an icon appears on the desktop, the sd card umounts, I can mount 
> the next one, etc...)

That's because Safely Remove is not the same thing as unmounting.

Marius Gedminas
-- 
C is quirky, flawed, and an enormous success.
        -- Dennis M. Ritchie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20101007/0ad53af5/attachment.sig>


More information about the ubuntu-users mailing list