# SOLVED yet another breakage of udev rules

## gw

Newly installed  *Quote:*   

> sys-fs/udev-149

 

So upon booting I read:

 *Quote:*   

>  BUS= will be removed in a future udev version, please use SUBSYSTEM=
> 
> SYSFS{}= will be removed in a future udev version, please use ATTR{}=

 

To get the ATTR value right I check udev's messages via

```
udevadm monitor --property
```

This tells me that my usb stick is a

 *Quote:*   

> ID_SERIAL=OCZ_RALLY2_AA04012700792711-0:0

 

So in an ideal rational world one would take this info an construct the following udev rule:

 *Quote:*   

> SUBSYSTEM=="block", ATTR{ID_SERIAL}=="OCZ_RALLY2_AA04012700792711-0:0", KERNEL=="sd?1", SYMLINK="stick"

 

Of course it doesn't work.

But why??

Thanks for your help

gwLast edited by gw on Sun Dec 13, 2009 9:22 am; edited 1 time in total

----------

## turtles

How about:

```
SUBSYSTEMS=="usb", ATTR{ID_SERIAL}=="OCZ_RALLY2_AA04012700792711-0:0", SYMLINK="stick%n"
```

----------

## d2_racing

```

SUBSYSTEM=="block" ID_SERIAL=="OCZ_RALLY2_AA04012700792711-0:0" SYMLINK+="stick"

```

Or

```

SUBSYSTEM=="block" ID_SERIAL=="OCZ_RALLY2_AA04012700792711-0:0" SYMLINK+="stick%n"

```

----------

## gw

 *d2_racing wrote:*   

> 
> 
> ```
> 
> SUBSYSTEM=="block" ID_SERIAL=="OCZ_RALLY2_AA04012700792711-0:0" SYMLINK+="stick"
> ...

 

Thanks! without the ATTR it actually seems to work, although I sometimes get

 *Quote:*   

> udevd[21610]:  *Quote:*   unknown key 'ID_SERIAL'  in /etc/udev/rules.d/10-local.rules:4

 

Strange also that udev would recommend sth that wouldn't work.

But anyway, it does now,

gw

===========

It seems kind of a hack though, as I get this error message also on rebooting the machine.

@d2_racing: is your udev also complaining about "unknown key 'ID_SERIAL'"?

----------

## d2_racing

I will test it on monday, because I have a USB Stick OCZ like yours.

----------

