Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm trying to figure out a way to automatically mount a USB mp3 stick I have. Mandrake seems to detect it OK but won't mount it. Unlike my USB memory stick, which it detects and mounts automatically...
usb 2-1: new full speed USB device using address 4
scsi6 : SCSI emulation for USB Mass Storage devices
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sde: 503521 512-byte hdwr sectors (258 MB)
sde: Write Protect is off
sde: Mode Sense: 00 c0 00 00
sde: assuming drive cache: write through
/dev/scsi/host6/bus0/target0/lun0: unknown partition table
Attached scsi removable disk sde at scsi6, channel 0, id 0, lun 0
USB Mass Storage device found at 4
I did manage to mount it once, but it was a major pain, and one big problem is that the scsi device file created is dynamic (ie it might be sde, or sdf, or sdg, etc) depending on what else is plugged in at the time.
(I notice that /etc/fstab changes dynamically, too, when I plug in my memory stick, but not when I plug in the mp3 player.)
You probably couldn't unmount it manually because a terminal window or file browser was still in (current directory within) that mount. You could try adding an fstab line, like any other, only without a partition number.
That solved my manual mount/unmount problem - Thanks!
But the problem I see with putting a line is /etc/fstab is that it may affect other USB devices, depending on what order they are plugged in.
For example, if I plug in my USB memory stick (which Mandrake automounts fine), it might be assigned to /dev/sde. If I then also plug in my MP3 stick, it will be assigned /dev/sdf.
What I'm in thinking is to find out which scripts Mandrake uses to automount my memory key, and then see how it's done so that I can apply the same scripts (or modify them) to mount the MP3 stick.
this topic have been great help but I still have two questions/problems. how to get icon to desktop automatically and get permissions to mount an umount it.
when I connect mp3 player it will create mp3 and mp31 files to /dev. I have add this line to /etc/fstab:
/dev/mp31 /media/mp3 vfat noauto,noexec,rw,umask=0,user 0 0
icon to desktop is not coming before I type as root mount -t vfat......and when I try to umount it from desktop it will say that you have to be root to do this. so where can I change permission to icon and mounting? I have tried to change that 0660 number but that didn't help but maybe I did something wrong.
how to mount USB devices in the same place every time:
I know I am replying well after the original post, but I know an answer of how to make devices be seen as the same device all the time so am replying for those who read this in the future.
Since you said you have udev,
plug your device in, wait for it to settle (5-10 seconds) then run the following command:
Look in the listing for your device. The unique name it gives in this listing is a way to access that particular device every time you want to mount it.
Here is the end of the listing I get:
this shows the unique name that my 6-in-1 reader built in to my dell monitor can be accessed by.
Note there is 1 device there, but it sees 2 LUNS, 0 and 1, so there is two lines for the reader.
The way you use this manually for one-time use is to enter the following on 1 line in a root terminal:
mount /dev/disk/by-id/usb-Generic_Flash_HS-CF_000022272228-0:0 /media/CFcard
...assuming you have created a directory /media/CFcard beforehand.
to mount this usb device on a regular basis, you would probably make an entry in your file system table for it. That is the file /etc/fstab.
put an entry into it like this (be root first):
# --------- card reader in monitor ----------
auto noauto,users,owner,umask=000 0 0
The above is 2 lines, a comment then the entry line, even though the preview here shows it as 3 -4 lines...
Then when you want to use the device, plug it in, and in a root terminal type:
and your system will look into the fstab, pull the unique name and mount it in the place specified, using the options that are in your fstab entry for that device.
That is one of the neat things about UDEV--it lets you get a unique name for each device, so you can mount it in the same place and you don't have to worry if you had 1 or 10 usb devices plugged in this session--the unique device name is always the same.
I have a bunch of scsi drives and as confusing as it is when you only have usb things using sda, sdb, etc. designations, it is more confusing when you have a bunch of scsi disks as well. When you boot with a usb drive in, it changes the boot order of the scsi disks and that is confusing!
Unless, of course, you mounted your scsi disks with the udev unique device name--then they are the same all the time no matter what else is plugged in!
You can also mount your mp3 player with it's udev unique name and have it mount the same place every time.
You can use this same method to mount your external usb hard drive too.
Need to use a regular tool like fdisk?
works the same way!