Joined: 22 Aug 2002
Location: Cambridge, UK
|Posted: Mon Sep 16, 2002 9:37 am Post subject: usb hotplugging and changing device names
|I've finally got USB all set up and working, my Zip 250 is recognised and my various other usb-storage devices can all be mounted and read.
The only remaining problem is the shifting device names. For example, if my Zip drive is plugged in at boot it will be /dev/sda (/dev/sda4 for the partition). If I then plug in my MP3 player it will be /dev/sdb, however if I had plugged in my digital camera before the MP3 player the camera gets /dev/sdb and the camera will be /dev/sdc.
How can I get consistent device names for my USB devices? At present my /etc/fstab entries don't work half the time because I didn't plug the devices in in the same order.
I've been thinking about a solution involving a script that gets run by hotplug, to find out what device the new USB device has been given and create a link to it. Has anyone out there already done something like this or is there a really simple solution I've missed?
I've got a reasonable amount of Unix/Linux experience but I'm new to devfs so I may have missed something everyone else knows about already.