On Thursday, Nov 27th 2003 at 23:23 -0000, quoth Andy Wallace: =>On Thu, 2003-11-27 at 16:13, Ross Macintyre wrote: =>> Hi, =>> I hope someone can help. =>> I run a lab of RedHat Linux machines and want to be able to let the =>> students mount their USB pen drives. =>> I got a 512 MB drive, and this worked fine: =>> an entry was made in /etc/fstab, and I mounted it (as the user that was =>> logged in), using 'mount /mnt/diskonkey'. =>> mount shows this: =>> /dev/sdb1 on /mnt/diskonkey type vfat (rw,nosuid,nodev) =>> I gor another USB pen drive (128MB), but when I insert this, no entry is =>> made in /etc/fstab. I am, however, able to mount it as root, by giving the =>> command 'mount -t vfat /dev/sda1(or /dev/sdb1 I can't remember) /mnta' =>> => =>My experiences may be of use to you - I'm responsible for tech support =>for a large number of testers who all have USB pen drives, and who all =>may at some time put them into any one of four dozen PCs running the =>application they're testing... => =>My experience has been that the first pen drive inserted (after boot) is =>assigned /dev/sda, the 2nd, /dev/sdb etc etc, and although =>/proc/bus/usb/devices keeps tabs on what's attached, /proc/scsi/* =>remembers all previous. However, it has a property "Attached" or =>"Unattached" which I use in a script to parse through =>/proc/scsi/usb-storage-n/n (n=0-255), stopping at the first "Attached", =>then translating that into (0=a, 1=b) etc. to detect which device to =>mount. => =>This is using SuSE 8.2, which makes an auto entry in fstab of =>/mnt/<randomlookingstring>, but my script mounts it elsewhere - you =>don't have to use fstab. => =>If you want the code snippet that does this, let me know - I don't have =>it in front of me now or I'd attach it. I'd just like to add one more thing: Read this month's Linux Journal. There's a whole article there on how it works and it goes into a fair amount of detail. Just one thing before you actually get to the article though. When you actually mount don't forget to use -o noatime, otherwise everytime you say ls it will write on the filesystem. And the drive does have a limited number of writes available. -- Time flies like the wind. Fruit flies like a banana. Stranger things have .0. happened but none stranger than this. Does your driver's license say Organ ..0 Donor?Black holes are where God divided by zero. Listen to me! We are all- 000 individuals! What if this weren't a hypothetical question? steveo at syslang.net -- Psyche-list mailing list Psyche-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/psyche-list