I am trying to create a custom udev rule that will handle a bootable partition on a USB drive in a special way.

When running udevadm I can see the following is set for a bootable partition:

E: UDISKS_PARTITION_FLAGS=boot

I created a rule as follows:

ENV{UDISKS_PARTITION_FLAGS}=="boot", GOTO="some_special_stuff"

But this is not working. In addition as part of my testing I also tried the following:

ENV{UDISKS_PARTITION_NUMBER}=="1", GOTO="some_special_stuff"

and this did not work either.

As a final test I tried

ENV{DEVNAME}=="sdb1", GOTO="some_special_stuff"

and this worked fine.

Is there something special about the UDISKS_PARTITION_ values that mean I can't perform this kind of test? Is there an alternative way to determine if a partition is bootable in a udev rule.

Many thanks for any hints!

link|improve this question
GOTO? Are you sure that's a udev symbol? You might want to use RUN or PROGRAM if "some_special_stuff" is an executable. I'm not too familiar with udev, but GOTO sound suspicious. – new123456 Feb 19 '11 at 0:13
Yes, GOTO is a valid keyword in udev rules – fpmurphy Aug 13 '11 at 13:41
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.