Ubuntu – Prevent specific USB Mass Storage mount with udev on Ubuntu

modemmountUbuntuusb

On Ubuntu 10.04, I have a USB 3G dongle which presents itself initially as a USB Mass Storage device with Windows drivers. usb_modeswitch can be used to get it to present itself as a modem, but the mass storage device still auto-mounts itself every time I plug it in as well. This is just an irritation/ugliness, not a serious problem, but I'm wondering if it's possible to write a udev rule to stop the device mounting, by filesystem name/UUID? I searched around, but couldn't find an example of such a rule.

Best Answer

I got it working by installing the usb-modeswitch package, and disabling autorun/automount in gconf-editor.

If that doesn't work, the only other (very inconvenient) way I saw was to boot with the modem plugged in; it worked then.... Good luck!

Related Topic