Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
I have two different memory sticks from Sandisk (an older 256M and a newer 128M). The 128M works flawlessly, but the 256M only works in newer installations. It could be a timing issue with the usb-storage driver for your particular install, or it could be the device itsself. My 256M would actually hang my laptop until I reformatted it with a windows utility I found from HP. Now it works ~80% of the time. The biggest problem with memory sticks is that they really have a wide range of tolerances to the USB standards. Another thing I think is more directed at the usb-storage driver, I believe Windows uses a far more generic device driver, whereas usb-storage tries to customize it's device init routine for each device (I need to look at this more closely).
One thing that I found helpful is the hotplug scripts. Not all distros have them installed (or even make them available).
My biggest problem is with multicard readers (CF, SD, etc). They will show up as a drive for each slot, even if it is empty. Mine has to be unplugged and plugged back in every time I put the CF card in.
Also, in Windows, when you want to remove a device, Windows will actually shut it down first. I haven't seen this in Linux yet (although I am researching it in my spare time).
Mine is a Sandisk too : a 1024 MB. The automatic shutdown in windoze is not true in W2K : u have to use "unplug or eject hardware" and select the stick. U can realize the same under linux with the command "umount <device name>". If u don't trust it, use "sync" before that. Will try the same USB-port on a digital camera to test the hot-plug. Module "usb-storage" is loaded I checked that...
The "Safely remove device" function under Windows is what I was referring to. It auto-syncs the device, then sends it a suspend command. I has spent a little (very little at this point) time researching how this is done so that I can replicate it. Having to sync, then umount is tedious, and not very "newbie" friendly. Without sync/shutdown, it is too easy to correupt the data on it.
As to hotplug, it is a program or scipt called by the kernel if hotplugging is enabled in the kernel (default is yes). The kernel will make a user level call to the program /sbin/hotplug if it exists. Currently, it is a series of shell scripts that execute based on the device plugged in. Not all distributions have it installed or available, but it is designed to be easily configured. You only need to add your device id to the usb.usermap file to specify a setup script to be called when that device id is detected. The iRiver MP3 player ifp_gui is a good example of this. It includes a script to make the device rw for users. Other scripts automatically create a subdirectory under either /mnt or /media with either the drive label (if you have labeled it) , or as the device type (usbstorage, removable, etc).
What distro are you using? There will be a file somewhere down the /etc/.... tree. In Slackware it is /etc/rc.d/rc.modules. I simply uncomment the appropriate driver and save the file. At boot this file is executed and all of the uncommented modules are loaded.
Mandriva has an rc.modules that loads all modules in /etc/modules.preload. The problem is, there are a lot of devices out there that don't have kernel driver support, and don't need it either. There are a lot of devices that are supported in user land by libusb and other libraries. The hotplug utility just makes it easier to configure and use these (like automounting, etc).
For usb memory sticks that use the UMS (Usb Mass Storage) specification, the usb-storage driver is the correct one to use.
To see if your particular device is supported, check this listing: http://www.qbik.ch/usb/devices/showd...=0&w=t&s=v&d=a
I am having troubles with hotplug. Or the problem is that I don't know how to use it. I am using Debian Sarge and my usb stick works great. I plug it in and mount it, I use the user attribute in fstab and so on. I then added an icon to the desktop (KDE) that points to the usb location. What I want to do now is use the hotplug so I don't need to mount it by hand every time I plug it in. Is it also possible to edit the icon-thing in Desktop so that it changes icon when it is mounted/umounted?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.