Chuckk Hubbard on 6 Jan 2007 00:36:12 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Device ID coolness


Very cool.  I've had this problem between my soundcard, MIDI keyboard,
and USB MIDI controller, where jackd always tries to load a different
one as the soundcard.  I'll check when I get home and see if I can
figure out how to do this.

-Chuckk

On 1/5/07, Walt Mankowski <waltman@pobox.com> wrote:
At Wednesday night's meeting I asked for suggestions on mounting USB
devices like flash drives.  I thought I'd report back on how I made
out.

The problem seemed kind of tricky, because the device name the kernel
uses can vary depending on whether any other USB devices are plugged
in.  I was getting tired of editing /etc/fstab every time I tried to
mount it to change /dev/sdb1 to /dev/sdc1.

Someone at the meeting suggested that I look at device IDs.  That
turned out to be exactly what I was looking for.  I discovered that
under /dev/disk the kernel puts four directories -- by-id/, by-label/,
by-path/, and by-uuid/, each of which contains symlinks with symbolic
names that point back to the raw device names they refer to.

The by-label directory was the most useful for my purposes.  Instead
of /dev/sdb1 or /dev/sdc1, it lets me use the device name
/dev/disk/by-id/usb-SanDisk_U3_Cruzer_Micro_0000060512013154-part1.
That's a mouthful, but it has the big advantage of always being the
same no matter which USB port it's using.

Walt


-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFnua2XfGeK2entYQRApquAJ0TtCofkD/NqoKEchmG9Fxi0TvnOwCfZMtt
DzikCZFwZxPiWsornCyvimE=
=cvRY
-----END PGP SIGNATURE-----


___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug





--
"Far and away the best prize that life has to offer is the chance to
work hard at work worth doing."
-Theodore Roosevelt
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug