Marketplace:

 
Cheap web hosting provider with extensive free web hosting features
Register or buy domain name, include free email and domain forwarding services
Cheap and affordable domain name registration and domain name transfer from $2.95/yr

 

   

Mass Storage Devices

next up previous contents index

The standard Mass Storage Device protocol is used for USB devices such as hard disk drives, flash memory drives, memory card readers, and digital cameras. Such devices have a standard VFAT (MSWindows) file system.

The USB mass storage device is treated as a SCSI device so simply mount the SCSI device:

  # mount -t auto /dev/sda1 /mnt


You should now be able to see and use the device as any other disk. If you already have a SCSI device then the USB device might be /dev/sdb1 or /dev/sdc1, etc. Check the dmesg command to find out (probably mentioned in the last few lines after you plug the USB device in).

The kernel module usb-storage drives USB mass storage devices and should be automatically loaded by hotplug. The kernel module vfat is also required, and if it does not autoload then you will need to:

  # modprobe vfat


A sample setup of four USB devices includes a USB mouse, HP Printer/Scanner/Copier with a card reader, a digital camera, and a flash memory drive (3System USB flash disk). The /etc/fstab includes:

  /dev/sda1       /media/hpcard auto    rw,user,noauto  0 0
  /dev/sdb1       /media/camera auto    rw,user,noauto  0 0
  /dev/sdc1       /media/flash  auto    defaults,user,noauto 0 0


Then any user can mount, for example, /media/hpcard, when a memory card has been inserted into the card reader. A problem is that unless the camera is connected before the flash drive after a reboot, the mappings end up being reversed! A solution is to use udev as described in Chapter 60.

The devices look like any other hard drive device so you can run fdisk on it and reorganise partitions:

  # fdisk /dev/sdc


You can also format the partition(s) on the device, usually with a DOS/FAT filesystem:

  $ mkfs -t vfat /dev/sdc1



Subsections


next up previous contents index


Copyright (c) 1995-2004

 

      

Marketplace:
Facts: " It reminds me of the claim that Americans built the first computer... It depends on what properties are necessary for a device to be classed as a computer: That it's electronic? That it has Randomly Accessible Memory? That it operates on a stored program? I am tempted to suggest that one of the requirements implicit in some people's lists is that it was built in America.   "  

Monday 1 December 2008 21:41:05 1228167665