SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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 12:45 PM.
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.
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
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.
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:
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.
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.
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.
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
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.