You might want to take this to the linux-hotplug list, as this is
less about usb functionality than it is about hotplug re-configuration.

Matt

On Thu, Jun 10, 2004 at 04:39:07PM -0600, Rita Gibson wrote:
> Hello everyone:
> 
> I am fairly new to this list, just subscribed a few days ago.
> 
> I work at a school and we run k12ltsp. Most of our equipment is old most 
> don't even have usb ports.. Currently kids carry their work back and 
> forth via floppy or send it to themselves via email. Floppies are very 
> unreliable, and sometimes the kids have powerpoint or multimedia 
> projects that are too big for a floppy. I do have a stand-alone linux 
> machine with front-access usb ports and we'd like for kids next year to 
> be able to copy their homework from a usb pen drive to their home 
> directories by logging into this stand-alone machine, and inserting 
> their usbstick/usb pen drive and copying their updated work.. The 
> challenge to this, if I understand this correctly, is that every pen 
> drive is configured as a different scsi device. The first one is sda, 
> the next sdb. This is what works so far: 
> 
> I added this line to the fstab file:
> 
> /dev/sda1   /mnt/flash         vfat            noauto,users,rw      0 0
> 
> And it allows me to mount the pen drive as root or as my user name, and 
> I wrote a little script that copies the contents of the pen drive to the 
> "flash" folder in my home directory, then unmounts the pen drive and 
> tells me to go ahead and exit. I take out that pen drive, log out, log 
> in as a different user with a different pen drive and the script no 
> longer works because the next pen drive is not identified as sda, it is 
> now sdb, and my script no longer works. If you restart the computer, it 
> works the first time with whichever pen drive you start out with, which 
> then becomes sda, however, I think it is impractical to have the kids 
> restart the machine when they come in to copy their homework to their 
> home directories..
> 
> My users are kindergarten through 12th grade. Obviously kindergarten 
> kids are not carrying work back and forth on usb pen drives, but the 4th 
> and 5th graders are. Some kids are more adept than others, and I'd like 
> to automate this as much as possible. Using the command line to mount a 
> floppy is too much to ask the kids to learn, let alone teach them how to 
> determine what Linux decided to call their usb device. I believe mtools 
> is being used at the terminals to access floppies, and supposedly can be 
> configured to access a usb device, but I am trying to learn and conquer 
> one thing at a time. If I can get one "station" set up for copying files 
> to and from USB devices, then maybe I can get the terminals to mount the 
> usb on a remote box.
> 
> I found this below posting about using mutliple USB mass storage devices 
> with one linux system.
> 
> 
> http://www.webservertalk.com/archive235-2004-4-193597.html
> 
> I tried his instructions but don't really understand them, so I don't 
> know why it is not working:
> 
> <snip>
> Problem: multiple USB pen drives register as separate device names
> (starting with /dev/sda1, next one is /dev/sdb1, etc). There seems to
> be no consistent way of figuring out automatically what device is
> mounted under what letter.
> 
> Solution: the updfstab utility automatically updates the /etc/fstab as
> long as it knows what device is being plugged in. problem is, since
> linux uses a generic driver for mass storage devices, updfstab doesn't
> always know that the device is flash memory. so, to fix this problem,
> the updfstab configuration file's (/etc/updfstab.conf.default) flash
> memory section should look like this:
> 
> device flash {
> partition 1
> match hd CompactFlash
> match hd ImageMate
> match hd "USB Drive"
> match hd "Flash Drive 2.0"
> }
> 
> this will match any device that has any of these descriptions (the
> ones in quotes are the descriptions of the pen drives I am using). you
> can find the description of your brand of pen drives by using the
> output from dmesg.
> 
> so once updfstab is recognizing your usb pen drives as flash memory,
> it will automatically add /dev/flash to the /etc/fstab file, allowing
> you to simply
> mount /mnt/flash
> 
> and not worry about whether it's /dev/sda1 or whatever. voila!
> <end snip>
> 
> When I type the command dmesg when you have a pen drive inserted I get 
> more information than I know what to do with, sometimes. Sometimes the 
> output is very small and concise. Suffice it to say I am confused about 
> this. However I can determine that one device is getting called sda, 
> then next is sdb. I added the "Attache 2.0" and "Compact Flash" to the 
> section that was already there in the updfstab.conf.default file.
> 
> device flash {
>    match   hd CompactFlash
>    match   hd ImageMate
>    match   hd "Attache 2.0"
>    match   hd "Compact Flash"
> }
> 
> (A copy of the entire updfstab.conf.default file is pasted at the bottom 
> of this, I only added those two lines, the rest probably is just as it 
> was when originally installed). This did not work,  the assignment  is 
> still the same depending on what order I insert the pen drives after a 
> reboot.
> 
> I have looked at what ever I could find on google about mounting USB pen 
> drives keychain drives, etc. to see if I could get some tips. I'm 
> stumped.After I solve this, then I need to figure out how I can call the 
> virus agent to check the contents for viruses before copying them to the 
> student's home directory.  But one thing at a time.....
> 
> Thanks for any help you can give me. 
> 
> Rita Gibson
> 
> 
> (updfstab.conf.default)
> 
> symlink            false
> partition   0
> 
> device cdrom {
>    symlink true
>    match   cdrom
> }
> 
> device cdwriter {
>    symlink true
>    nofstab true
>    match   cdwriter
> }
> 
> device jaz {
>    partition 4
>    match   hd jaz
> }
> 
> device zip {
>    partition 4
>    match   floppy zip
>    match   hd zip
>    match   floppy clik
>    match   hd clik
> }
> 
> device ls120. {
>    match   floppy ls120
>    match   floppy ls-120
> }
> 
> device camera {
>    partition 1
>    match   hd DSC
>    match   hd CAMERA
> }
> 
> device memstick {
>    partition 1
>    match   hd MSC
> }
> 
> device flash {
>    partition 1
>    match   hd CompactFlash
>    match   hd ImageMate
>    match   hd "Attache 2.0"
>    match   hd "Compact Flash"
> }
> 
> device floppy {
>    match   hd USB-FDU
>    match   floppy USB-FDU
>    match   floppy FD
>    match   floppy "floppy drive"
> }
> 
> device diskonkey {
>    partition 0
>    match   hd diskOnKey
> }
> 
> device microdrive {
>    partition 1
>    match   hd IBM-DMDM
> }
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the new InstallShield X.
> >From Windows to Linux, servers to mobile, InstallShield X is the
> one installation-authoring solution that does it all. Learn more and
> evaluate today! http://www.installshield.com/Dev2Dev/0504
> _______________________________________________
> [EMAIL PROTECTED]
> To unsubscribe, use the last form field at:
> https://lists.sourceforge.net/lists/listinfo/linux-usb-users

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Sir, for the hundreth time, we do NOT carry 600-round boxes of belt-fed 
suction darts!
                                        -- Salesperson to Greg
User Friendly, 12/30/1997

Attachment: pgpm9JjVZv69q.pgp
Description: PGP signature

Reply via email to