Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a problem with a Linux/Ubuntu Desktop machine. The machine is used as a part of a larger setup (a autonomous boat) that relies on four USB-Devices. Three of them are plugged into an USB Hub and one is plugged directly into the machine.

Every time we reconnect the Device or restart the computer the devices may get a different device number. That is a big problem for us because to initialize those devices from our software we need their location.

Is there a solution from the side of the operating system to assign certain numbers to them or use a link or something to make sure they are always accessible in the same way from the software?

If there is only a programmatic solution maybe the question can be moved to stackoverflow.com

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You should write udev rules that assign a persistent symlink to the device when they are connected. See this tutorial for writing udev rules for more information.

share|improve this answer

I don't know about Ubuntu, but Red Hat has a symbolic link: /dev/disk/by-label/ that points to the actual device file.

You might also want to look into udev; that can also do what you're looking to do.

share|improve this answer
    
I don't think the OP said they were disks... –  Joe Jun 19 '09 at 21:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.