First I tried to create a rule matching what Martin suggested in comment #2. I added a rule to/lib/udev/rules.d/95-devkit-disks.rules. It looked like this:
ENV{ID_FS_TYPE}=="WD_SmartWare", ENV{DKD_PARTITION_SCHEME}=="apm", ENV{DKD_PRESENTATION_HIDE}="1"
This rule for some reason did not match/work. After restarting udev (is this even necessary?) and plugging in the drive, that rule was ignored and the SmartWare partition mounted as a CD.
Based on the autogenerated entry in /etc/udev/rules.d/70-persistent-cd.rules when the drive is detected, I tried adding this rule to the /lib/udev/rules.d/95-devkit-disks.rules file:
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="WD_Virtual_CD*", ENV{DKD_PRESENTATION_HIDE}="1"
This worked fine, and the drive is hidden. Is this an appropriate and sufficiently generic rule in that it will work across other people's systems? Notice the * expression when specifying ID_SERIAL.
So. Here is what I did...
First I tried to create a rule matching what Martin suggested in comment #2. I added a rule to/lib/ udev/rules. d/95-devkit- disks.rules. It looked like this: ID_FS_TYPE} =="WD_SmartWare ", ENV{DKD_ PARTITION_ SCHEME} =="apm" , ENV{DKD_ PRESENTATION_ HIDE}=" 1"
ENV{
This rule for some reason did not match/work. After restarting udev (is this even necessary?) and plugging in the drive, that rule was ignored and the SmartWare partition mounted as a CD.
Based on the autogenerated entry in /etc/udev/ rules.d/ 70-persistent- cd.rules when the drive is detected, I tried adding this rule to the /lib/udev/ rules.d/ 95-devkit- disks.rules file: ="block" , ENV{ID_ CDROM}= ="?*", ENV{ID_ SERIAL} =="WD_Virtual_ CD*", ENV{DKD_ PRESENTATION_ HIDE}=" 1"
SUBSYSTEM=
This worked fine, and the drive is hidden. Is this an appropriate and sufficiently generic rule in that it will work across other people's systems? Notice the * expression when specifying ID_SERIAL.