[sclug] How to find which /dev/xxx a usb device is on?
John Stumbles
sclug at yaph.org.uk
Sat Jun 21 15:37:43 UTC 2008
[re-sent to sclugR as first message to sclug at sclug.org.uk didn't appear]
[trying again with my originally-subscribed address, which I'd changed
before sending]
[ok, just re-subscribed to the sclug list (which I seem to have been
unsubbed from when I joined sclugr) with my new address - here goes again]
I'm trying to script mounting usb devices such as digicam memory cards
and a USB external HDD. The digicam card script has a horrible kludge of
code like: 'try /dev/sdc1 ... sdd1? ... sde1? ...' etc until it finds
where the card has popped up on.
I've now got an external hdd for backup which needs to be mounted
(ideally on bootup but it's encrypted so couldn't go in fstab anyway (or
could it?)).
Before I redo the 'try this/try that' code can anyone suggest a better way?
lsusb tells me where the device (Maxtor) is in usb space:
Bus 002 Device 012: ID 0d49:3200 Maxtor
Bus 002 Device 004: ID 058f:6362 Alcor Micro Corp.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 005: ID 04e8:3242 Samsung Electronics Co., Ltd
Bus 001 Device 004: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20
Bus 001 Device 003: ID 05e3:0604 Genesys Logic, Inc. USB 1.1 Hub
Bus 001 Device 002: ID 11c5:0521
Bus 001 Device 001: ID 0000:0000
and lshal tells me more than I really want to know about the damn' thing
except where to find it in /dev :-(
clues?
--
John Stumbles http://yaph.org.uk
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
More information about the Sclug
mailing list