"Safely Remove" a USB frob under SuSE/KDE

In vanila SuSE 10.0, safely removing a USB frob can be a trial for non-root users. It's a shame, but I've found a fix that I'm 95% happy with.

Here's a screen shot showing how easy it is to remove a USB device in KDE (I wish Windows was this easy, instead of having to play "hunt for the Safely Remove icon in the Systray...")

KDE safely remove pop-up menu
"Safely Remove" a USB frob under SuSE/KDE

Unfortunately, it doesn't work. Instead of the icon disappearing (indicating you can pull out the frob safely), you get a nasty error:


Umount - mtab entry missing error

After reading a few man pages and surfing for a bit, I found out that this error is generated by the umount command. The man page for mount actually recommends replacing the /etc/mtab file with a symlink to /proc/mounts under Linux. So I did that and tried again. Here's what I got:


Umount - fstab entry missing error

So, because kio_media_mounthelper has helpfully mounted the frob under a mountpoint with the same name as the VFAT volume label (which is actually pretty cool!), umount can't find this entry in /etc/fstab (not so cool).

/etc/fstab is not supposed to be updated by machines, only people, so the work-around is to manually add entries for all of my USB frobs. I only have two, so it's fairly easy:

#MJL20060731 - the following were added to try to appease umount/kio_media_mounthelper for USB frobs:

/dev/sda1            /media/D_CHIP_00    subfs      noauto,fs=usbfs,users,nosuid 0 0
/dev/sda1            /media/D_CHIP_01    subfs      noauto,fs=usbfs,users,nosuid 0 0

Note:— I've done two things here: added an entry for each of the USB frobs onto the /dev/sda1 device (which is type subfs, because SuSE uses submount to mount removeable devices), and make it so that normal users can unmount. It's also worth adding the users flag to other removeable devices too, such as CD-ROMs, since umount will complain about your not being root without it…

I see three problems with this:

  1. Any new frob I buy (or if I rename a frob volume) will need an entry in /etc/fstab before normal users an safely unmount it. Ugly.
  2. You have to be root to edit /etc/fstab, so only I can add new frobs to the list. Inconvinient.
  3. The way I've edited /etc/fstab to have both frobs on the one device, means I can only use one at a time.

A work-around for the 1st and 2nd gripes is to add a third entry to /etc/fstab with a generic label, and always label my USB frobs that way. Not sure if that is better or not.

So, I've found my first SuSE gripe. It's nothing major, and it was not a big problem to find a solution or work-around that is actually liveable for day-to-day tasks and only becomes an issue occasionally.


2007-03-09T10:42+1100 Update: Works okay in openSUSE 10.2, don't have to do anything with /etc/fstab