New Node Name Niceties

Tip for the day: Restarting ‘udev’ on a running system is a really, really bad idea if you ever want to see any of your pseudo-ttys again. I couldn’t log in via SSH or even start another xterm until I rebooted.

Otherwise though, it seems like it works fairly well so far under Slackware 10. The entries in /dev are minimized to those actually relevant to the system, and I can assign node names based on things like vendor strings, so my camera always appears as /dev/camera instead of varying between /dev/sda1 or /dev/sdb1 depending on what order I plugged things in.

As always, there are quirks. My USB multi-card reader only shows up as the basic whole-device node (e.g., /dev/sda) if no cards are actually in it at boot time, as is usually the case. In order to actually get at the files though, you need the partition nodes (e.g., /dev/sda1, /dev/sda2, etc.), and they don’t show up. Unfortunately, with these kinds of devices, inserting a card doesn’t actually cause a USB event, so the kernel and udev don’t know that there’s now a card there on which it should go scan the partitions.

Fortunately there’s a workaround; you can force udev to always create the partition nodes with something like the following in udev.rules:

BUS="usb", SYSFS{product}="Multi-Card Reader", NAME{all_partitions}="usbcard"

Then I can access my SD card in the reader with /dev/usbcard1.

And, of course, the above pseudo-tty problem…

One thought on “New Node Name Niceties”

  1. *I* caused a USB event once… I don’t think the stain will ever come out. :-)

    You know, even tho I can’t afford a multi-card reader yet (tho this little beauty would be perfect;especially since the PCMCIA slot in this ‘Book is pretty much fallow), I’m starting to feel relieved at not having to fight with it under Linux… You’re not the first I’ve heard to have difficulties. Well, perhaps annoyances more than difficulties… Whatever, Same thing, some days. :-)

Leave a Reply

Your email address will not be published. Required fields are marked *