# udev ignores ignore, automatically remounts usb hd

## lindegur

I have EHCI for USB2 devices, but I unfortunately need also OHCI to access some simple USB devices.

The result is now the following. If I unmount (gnome icon) my USB harddisk, a couple of seconds later it gets automatically remounted. What happens is the following: After unmounting the EHCI mounted device, OHCI produces kernel events and udev  and its friend remount the drive. When I disable OHCI in the kernel then It works as it should, however I want to access also my other USB devices.

OK, problem found but now a solution is required. I thought udev rules, finally I ended up with something as 

```
KERNEL=="sd*", ATTRS{product}=="OHCI Host Controller", OPTIONS+="ignore_device", SYMLINK+="usbhd%n"
```

 and I played with other options and variations as OPTIONS+="last_rule". The rule executes exactly when I want, this is why put the symlink, so I see simlink created, rule has been executed.

However the drive gets still remounted  :Rolling Eyes:  I also run 

```
udevadm test /sys/block/sdb
```

 and found many other rules dealing with sdb, it looks one of them mounts the drive  :Crying or Very sad:  I found out that 10-local.rules, is not the first rule executed, so I changed it to 09-local.rules and tried OPTIONS+="last_rule", still no success, OHCI and udev (and udisks, dbus, ...) still remount the disk. I do not like to create a mess with the rules under /lib/udev/rules.d, however OPTIONS+="last_rule" should not execute a lot of rules  :Question: 

Therefore the question: Any hint?

----------

## BillWho

lindegur,

I haven't used gnome in quite a long time, but from I remember you should be able to disable auto-mounting of devices with nautilus.

Good luck   :Wink: 

----------

## lindegur

Thank you for the hint, but what I wish is something as having automounting for EHCI devices enabled but having it disabled for OHCI devices.

Maybe I find some options in Gnome  :Question: 

----------

## DaggyStyle

OHCI is AMD's 1.1 usb implementation, ECHI is 2.0 implementation, they co-exists without a problem.

but for the issue, I'd recommend to compile them as modules in the kernel for starters if you haven't done this.

after that, try to see if you can recreate the problem.

----------

## lindegur

I somehow fixed it using and external USB2 hub that deals now with the USB1 devices. 

This way I could disabled OHCI in the kernel. OHCI will no longer taking over when I unmount devices from EHCI. 

The two USB1 devices (Webcam and Bluetooth device) I plugged into the USB2 hub.

At least the Webcam works well like that, Bluetooth I haven't tested so far.   

However I would prefer a software solution  :Rolling Eyes: 

----------

## PaulBredbury

 *lindegur wrote:*   

> ATTRS{product}=="OHCI Host Controller"

 

That's a bad way to match. I recommend matching on ATTRS{serial} instead.

----------

