Linux USB mounting question

robothouse77

Golden Member
Jan 21, 2005
1,170
1
0
Hello,
I hope this is in the appropriate forum.

My question is: i know when you add a device to the usb hub, it will show up in the /proc/bus/usb/devices "file". In this file it will tell you various things such as what bus it's on and what port it is attached to. however, it won't tell you which device it is ID as, such as /dev/sda or /dev/sdb, etc. what i want to know is, is there a way to look at where it gets ID (/dev/sdX) and what port and bus it is on (as found in proc/bus/usb/devices) thanks for your help. please let me know if this isn't clear.
 

djdrastic

Senior member
Dec 4, 2002
441
0
0
Try This

tail /var/log/messages | grep sda . There Might Be An Easier Way But I'm just posting the way I know :-0
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
tail /var/log/messages | grep sda . There Might Be An Easier Way But I'm just posting the way I know :-0

That will only work if it's assigned sda, if you have more than one USB or SCSI device it could be sdb, sdc, sdc, etc.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
What I do with usb devices is to use the dmesg command.

I plug in the device
I use dmesg
then I unplug it,
then look at the dmesg output again. That will tell you pretty much everything you need to know usually.
 

djdrastic

Senior member
Dec 4, 2002
441
0
0
Yeah You're Right Nothinman , sorry bout that :)

robothouse77 do you know how to make a bash script ?

You can run "tail /var/log/messages | grep sd" as a script so that you dont have to type in all that gobbleish every time you mount a usb thumb drive
 

Zelmo3

Senior member
Dec 24, 2003
772
0
0
I found mine easily by just running "tail /var/log/messages" and watching the output while I plugged in my USB thumb drive. It came up with a few lines about the make/model and what device node was assigned to it.
Then I could add a line for it in /etc/fstab and have easy access to mounting/unmounting the drive via the KwikDisk KDE applet.