[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mounting USB mass storage devices



This solution is not always work. For example if you want mount another usbkey obviously the device will be other than /dev/sda, more over if this device hangs before for some reason again you will need another device. I don't know how work the mount automatically, but this is not the way and taken in mind that not always is just /dev/sdx, sometimes is /dev/sdxn, for 'n' be a number and 'x' a letter 'a', 'b', 'c', etc, the answer below is not exactly right. My way is take a look to the kernel messages (using 'dmesg') and the using a simple script like:
//----------------------------------------------------------------------------------
#|/bin/sh
# This script will mount a usb mass storage in the directory /mnt/usbkey
mount -t vfat -o umask=000 /dev/sd$1 /mnt/usbkey
//----------------------------------------------------------------------------------

For example if I mount a usbkey that support USB2.0 and run 'dmesg' I see the next messg:
   scsi6 : SCSI emulation for USB Mass Storage devices
   usb-storage: device found at 2
   usb-storage: waiting for device to settle before scanning
     Vendor: Generic   Model: USB SD Reader     Rev: 2.00
     Type:   Direct-Access                      ANSI SCSI revision: 00
   SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB)
   sda: Write Protect is off
   sda: Mode Sense: 03 00 00 00
   sda: assuming drive cache: write through
   SCSI device sda: 1984000 512-byte hdwr sectors (1016 MB)
   sda: Write Protect is off
   sda: Mode Sense: 03 00 00 00
   sda: assuming drive cache: write through
    sda: sda1
   sd 6:0:0:0: Attached scsi removable disk sda
   sd 6:0:0:0: Attached scsi generic sg0 type 0
   usb-storage: device scan complete

I will run the script in the next form:
 > script_mount_usbkey a1

 Good luck,
      Gustavo Halperin


Willie Wonka wrote:

Got a  /etc/fstab entry like this?

dev/sda      /media/usbkey   auto    rw,user,noauto  0       0

and have you issued this command from a console, to create it's 'mount'
point, as defined in fstab, as shown above?

$ sudo mkdir -p /media/usbkey

A quick search through the archives yields; <http://tinyurl.com/j7sj8>

Regards

p.s. I accidentally sent the same message to the list, but *without*
the [Subject:] line filled in...disregard that



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com




Reply to: