LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-31-2006, 01:26 PM   #1
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Rep: Reputation: 15
Can't mount my usb devices


Please help
I can't fathom out what I need to do to use/mount my usb devices, at moment they are a 5in1 card reader and a Lexar 1GB jumpdrive. I know the devices are detected but I'm suck as to how to mount and use them. I would appreciate it if somebody could explain to me everything that needs doing or at least point me in the direction of a descriptive guide.
Sorry for asking but I've looked around and seem to be getting nowhere.
Thanks in advance

Code:
root@sl@ckb0x:~# cat /proc/bus/usb/devices

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.13 ohci_hcd
S:  Product=ATI Technologies Inc OHCI USB Controller #2
S:  SerialNumber=0000:00:13.1
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
B:  Alloc= 11/900 us ( 1%), #Int=  1, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.13 ohci_hcd
S:  Product=ATI Technologies Inc OHCI USB Controller #1
S:  SerialNumber=0000:00:13.0
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0458 ProdID=0036 Rev= 1.10
S:  Manufacturer=Genius
S:  Product=NetScroll + Mini Traveler
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=10ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.13 ehci_hcd
S:  Product=ATI Technologies Inc EHCI USB Controller
S:  SerialNumber=0000:00:13.2
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0781 ProdID=9919 Rev=93.12
S:  Manufacturer=SanDisk
S:  Product=ImageMate 5 in 1 Reader/Writer
S:  SerialNumber=0301317541
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=05dc ProdID=0300 Rev= 0.01
S:  Manufacturer=LEXAR MEDIA
S:  Product=JUMPDRIVE GEYSR
S:  SerialNumber=302AC2030410031
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=120mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Code:
root@sl@ckb0x:~# cat /proc/scsi/scsi
Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: Generic  Model: STORAGE DEVICE   Rev: 9312
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 00 Lun: 00
  Vendor: LEXAR    Model: GEYSER JUMPDRIVE Rev: 1.00
  Type:   Direct-Access                    ANSI SCSI revision: 02

Last edited by captain chaos; 03-31-2006 at 01:30 PM.
 
Old 03-31-2006, 01:36 PM   #2
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Here is my fstab with both devices plugged in
Quote:
dev/hda2 swap swap defaults 0 0
/dev/hda5 / xfs defaults 1 1
/dev/hda1 /boot ext2 defaults 1 2
/dev/hda6 /usr xfs defaults 1 2
/dev/hda7 /tmp xfs defaults 1 2
/dev/hda8 /home xfs defaults 1 2
/dev/cdrom /mnt/cdrom auto auto,users 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
/dev/sdb1 /mnt/sdb1 auto auto,users 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
I noticed only 1 device shows up in fstab, don't know which
Maybe it's just me but I'm finding linux awkward to grasp at moment, needless to say I DO NOT want to give up on it.
Thanks all again

Last edited by captain chaos; 03-31-2006 at 01:45 PM.
 
Old 03-31-2006, 01:37 PM   #3
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Run:
mount -t vfat /dev/sda2 (your usb connection point) /mnt/usb (you need to create directory usb in mnt firstly)

Last edited by Alien_Hominid; 03-31-2006 at 01:40 PM.
 
Old 03-31-2006, 03:37 PM   #4
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Thanks Alien_Hominid
This is my new fstab. Please note the " /mnt/reader; /mnt/lexar; /mnt/mju300" entries. Should I have added these entries as 2 of them are /dev/sda1??
I'm confused because if I was to plug in these devices in a different order so, if for example "/mnt/reader" was the first to be plugged in it would then be "/dev/sda1", would this cause problems?? I only have 3 usb ports 1 of which is always occupied by my mouse.
All devices work fine.


Quote:
root@sl@ckb0x:~# cat /etc/fstab
/dev/hda2 swap swap defaults 0 0
/dev/hda5 / xfs defaults 1 1
/dev/hda1 /boot ext2 defaults 1 2
/dev/hda6 /usr xfs defaults 1 2
/dev/hda7 /tmp xfs defaults 1 2
/dev/hda8 /home xfs defaults 1 2
/dev/cdrom /mnt/cdrom auto auto,users 0 0
/dev/sda1 /mnt/lexar auto auto,users 0 0
/dev/sdb1 /mnt/reader auto auto,users 0 0
/dev/sda1 /mnt/mju300 auto auto,users 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
p.s Do I have to use the
Quote:
mount -t vfat /dev/sda2 (your usb connection point) /mnt/usb
command each time to mount device.
Thanks again
 
Old 03-31-2006, 04:22 PM   #5
regis_n_bits
Member
 
Registered: Mar 2006
Distribution: Slackware64-15.0
Posts: 103

Rep: Reputation: Disabled
CC,

You should not have two entries for /dev/sda1 in your fstab. One will be ignored (don't know which one). Just keep the first one, and create the directory /mnt/lexar if it doesn't exist.

For mounting the lexar device, you can just run:
mount /dev/sda1
or
mount /mnt/lexar

And for unmounting:
umount /dev/sda1
or
umount /mnt/lexar
 
Old 04-01-2006, 04:16 PM   #6
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Sussed it now thanks all. Pretty obvious really Thanks again
 
Old 04-01-2006, 04:34 PM   #7
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by captain chaos
Sussed it now thanks all. Pretty obvious really Thanks again
Oops Spoke too soon.
Quick question. My fstab just has /dev/sda1 & /dev/sdb1 listed. I have quite a few usb devices to play with so my question is: can I name each device individually, only 2 usb ports, so when I plug in a device to mount I just type mount /mnt/device_name, or would there be no point to this exercise. Hope it makes sense.
 
Old 04-01-2006, 04:50 PM   #8
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 922

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
You can use udev to creat custom /dev entries. Then you refer to /dev/lexar, which is a symlink to /dev/sda1, or /dev/sdb1, or whatever. I have an external floppy drive and a usb stick that would show up as /dev/sda and /dev/sda1, respectively, or /dev/sdb and /dev/sdb1 if the other one was already plugged in. Here's part of my /etc/udev/rules.d/10-udev.rules file:

Code:
# /etc/udev/rules.d/10-udev.rules
#
# My rules
##########

BUS="usb", KERNEL="sd*", SYSFS{product}="Cruzer Mini", NAME="%k", SYMLINK="usbhd%n", GROUP="disk"
BUS="usb", KERNEL="sd*", SYSFS{product}="USB Floppy Drive", Name="%k", SYMLINK="floppy", GROUP="disk"


#
# udevinfo -q path -n /dev/device
# udevinfo -a -p /sys/path/to/device
# udevstart
#
Now the usb stick is linked to /dev/usbhd1 and the floppy drive is linked to /dev/floppy, every time. The /dev/sd* entries still exist, I just don't directly use them. The commented stuff there at the bottom is a reminder to me on how to find new devices. Try the commands out yourself and see if it makes sense. Good Luck!

Edit: Though I'd add a quick how-to.

I plugged in my usb stick and determined it was /dev/sdb1.

Code:
$ udevinfo -q path -n /dev/sdb1
/block/sdb/sdb1
$ udevinfo -a -p /sys/block/sdb/sdb1

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

device '/sys/block/sdb/sdb1' has major:minor 8:17
  looking at class device '/sys/block/sdb/sdb1':
    SUBSYSTEM=="block"
    SYSFS{dev}=="8:17"
    SYSFS{size}=="501149"
    SYSFS{start}=="99"
    SYSFS{stat}=="       0        0        0        0"

follow the "device"-link to the physical device:
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host1/target1:0:0/1:0:0:0':
    BUS=="scsi"
    ID=="1:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0xa"
    SYSFS{ioerr_cnt}=="0x1"
    SYSFS{iorequest_cnt}=="0xa"
    SYSFS{max_sectors}=="240"
    SYSFS{model}=="Cruzer Mini     "
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{rev}=="0.1 "
    SYSFS{scsi_level}=="3"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}=="SanDisk "

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host1/target1:0:0':
    BUS==""
    ID=="target1:0:0"
    DRIVER=="unknown"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host1':
    BUS==""
    ID=="host1"
    DRIVER=="unknown"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0':
    BUS=="usb"
    ID=="1-4:1.0"
    DRIVER=="usb-storage"
    SYSFS{bAlternateSetting}==" 0"
    SYSFS{bInterfaceClass}=="08"
    SYSFS{bInterfaceNumber}=="00"
    SYSFS{bInterfaceProtocol}=="50"
    SYSFS{bInterfaceSubClass}=="06"
    SYSFS{bNumEndpoints}=="02"
    SYSFS{modalias}=="usb:v0781p5150d0010dc00dsc00dp00ic08isc06ip50"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4':
    BUS=="usb"
    ID=="1-4"
    DRIVER=="usb"
    SYSFS{bConfigurationValue}=="1"
    SYSFS{bDeviceClass}=="00"
    SYSFS{bDeviceProtocol}=="00"
    SYSFS{bDeviceSubClass}=="00"
    SYSFS{bMaxPacketSize0}=="64"
    SYSFS{bMaxPower}=="200mA"
    SYSFS{bNumConfigurations}=="1"
    SYSFS{bNumInterfaces}==" 1"
    SYSFS{bcdDevice}=="0010"
    SYSFS{bmAttributes}=="80"
    SYSFS{configuration}==""
    SYSFS{devnum}=="4"
    SYSFS{idProduct}=="5150"
    SYSFS{idVendor}=="0781"
    SYSFS{manufacturer}=="SanDisk Corporation"
    SYSFS{maxchild}=="0"
    SYSFS{product}=="Cruzer Mini"
    SYSFS{serial}=="SNDK8ABBA4272BE07003"
    SYSFS{speed}=="480"
    SYSFS{version}==" 2.00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1':
    BUS=="usb"
    ID=="usb1"
    DRIVER=="usb"
    SYSFS{bConfigurationValue}=="1"
    SYSFS{bDeviceClass}=="09"
    SYSFS{bDeviceProtocol}=="01"
    SYSFS{bDeviceSubClass}=="00"
    SYSFS{bMaxPacketSize0}=="64"
    SYSFS{bMaxPower}=="  0mA"
    SYSFS{bNumConfigurations}=="1"
    SYSFS{bNumInterfaces}==" 1"
    SYSFS{bcdDevice}=="0206"
    SYSFS{bmAttributes}=="c0"
    SYSFS{configuration}==""
    SYSFS{devnum}=="1"
    SYSFS{idProduct}=="0000"
    SYSFS{idVendor}=="0000"
    SYSFS{manufacturer}=="Linux 2.6.15.4 ehci_hcd"
    SYSFS{maxchild}=="6"
    SYSFS{product}=="EHCI Host Controller"
    SYSFS{serial}=="0000:00:1d.7"
    SYSFS{speed}=="480"
    SYSFS{version}==" 2.00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7':
    BUS=="pci"
    ID=="0000:00:1d.7"
    DRIVER=="ehci_hcd"
    SYSFS{class}=="0x0c0320"
    SYSFS{device}=="0x24cd"
    SYSFS{irq}=="11"
    SYSFS{local_cpus}=="1"
    SYSFS{modalias}=="pci:v00008086d000024CDsv00001028sd0000014Ebc0Csc03i20"
    SYSFS{subsystem_device}=="0x014e"
    SYSFS{subsystem_vendor}=="0x1028"
    SYSFS{vendor}=="0x8086"

  looking at the device chain at '/sys/devices/pci0000:00':
    BUS==""
    ID=="pci0000:00"
    DRIVER=="unknown"

From the "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4" I got the info I needed and added that to the rules line. Just modify that for your needs and should work.

Last edited by drumz; 04-01-2006 at 05:06 PM.
 
Old 04-02-2006, 01:16 AM   #9
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Plug in the devices and show me how you get their mount points and post them here.
Each usb connector has his own address. Create entries in fstab for them. For example,
/dev/sdx1 goes to /mnt/usb1
/dev/sdx2 goes to /mnt/usb2.
So if you plug in your lexar into sdx1, he will go to usb1, if into sdx2,he will go to usb2.
 
Old 04-02-2006, 05:05 PM   #10
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Thanx, Drumz and Alien_Hominid. Will have a look at Udev etc on my days off.
 
Old 04-02-2006, 05:41 PM   #11
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Please explain
Quote:
Plug in the devices and show me how you get their mount points and post them here.
I can mount the devices no problems, mount /mnt/usb/sd*1. I have 2 entries in my fstab, namely sda1 & sdb1, whatever device I have plugged in first the mount /mnt/usb/sda1 or right click and use the mount option in kde. Data accessible okay. Can't post fstab at mo Laptop playing up so on windows pc for now.
 
Old 04-22-2006, 07:18 AM   #12
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Usb hub

Don't know how to phrase this question.
I have 2 spare usb ports. My question is will a 4 port hub create 4 new usb addresses, ie:sdc1,sdd1,sde1,sdf1. So I could in effect have 5 usb devices mounted at same time.
Which command will tell me the mount point for each device sda1,sdb1 etc.
Hope this makes sense to somebody
 
Old 04-22-2006, 12:52 PM   #13
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 922

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
I think the only way to find out is to plug stuff in and see what gets assigned to it. I would imagine that if you plugged in 5 storage devices they would get assigned to sda thru sde. If you're going to be plugging them in and out more than once a week it would probably be best to write some udev rules so you can reference a device by the same name every time.
 
Old 04-22-2006, 03:06 PM   #14
captain chaos
Member
 
Registered: Feb 2006
Location: North England
Distribution: Slackware 10.2 (kernel 2.6.13)
Posts: 74

Original Poster
Rep: Reputation: 15
Thanx Drumz. Just after I wrote post I did just that. Plugged in hub mounted each item 1 at a time. All's fine for mo.
Still trying to get my head round udev though.
@ Drumz. In your above post about udev you mention /etc/udev/rules.d/10-udev.rules file, what's with the '10-' part please
 
Old 04-22-2006, 03:13 PM   #15
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 922

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
You can prefix the rules files by numbers and udev looks through them in numerical order. I have 10-udev.rules and 50-udev.rules. The second one was already there (I might have renamed it from udev.rules to 50-udev.rules), and I my custom rules go in 10-udev.rules. If a device doesn't match anything in 10-, then it looks in 50-. I either learned that from a website or the man pages, can't remember.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB storage devices difficult to mount and use jaakkop Slackware 4 11-16-2005 05:03 PM
Mount usb devices suse 9.2 live Nawas111 SUSE / openSUSE 1 05-30-2005 09:51 AM
Problem mount USB devices. jonostew Linux - Hardware 4 08-20-2004 01:39 PM
How to mount several USB devices (camera + handy-drive)? eneko Linux - Newbie 4 11-05-2003 08:50 PM
How do you mount usb devices on RH9 barrys Red Hat 2 10-19-2003 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration