Most USB keys work on my system: plug one in and
udev will create a device file for the key as a whole (e.g.
/dev/uba), as well as a device file for the partition (e.g.
I have a specific USB key (a Sandisk Cruzer Micro 2Gb) which
udev misbehaves with. The device file for the key is created, but not for the partition.
If I compare the
dmesg output between a working key and my problem key, it is identical except for one line which is missing when using the problem key:
uba: uba1. It would appear from this that
mknod is never creating a node for the disk partition.
The weird thing is that I can do...
sudo sfdisk -R /dev/uba
...to force drive partitions to be re-examined and suddenly the partition will be recognised,
mknod will create a device file it and I can access the key all fine and dandy like. Some kind of timing issue?
Automount USB Rules:
ACTION=="add", KERNEL=="ub[a-z]*[1-9]*", PROGRAM="/sbin/blkid -o values -s TYPE %N", RESULT=="vfat", RUN+="/home/ubuntu/.mount_usb %k %n" ACTION=="remove", KERNEL=="ub[a-z]*", RUN+="/home/ubuntu/.unmount_usb"
The problem key defaults to FAT16 when being reformatted. Forcing it to FAT32 results in
udevadm monitor --property spitting out exactly the same properties for the device and partition as for a working key, but the problem still remains. This leads me to think that it's less likely to be a problem with the device detection rules and perhaps a problem with the device itself? Is this a logical conclusion?