Out of date


This page discusses the method used in Fedora Core 1 and 2, but does not cover Fedora Core 3 (HAL/udev).


 USB mass storage devices


Many USB devices, from digital cameras to disk-on-key units, provide "mass storage" capabilities, which allow you to use them just like a filesystem on a hard disk. To access the files on one of these:

  1. plug it into the computer
  2. wait a second or two
  3. right-click on the desktop background in GNOME
  4. select the device in the "Disks" menu -- an icon should appear on the desktop
  5. double-click on the new icon

Once you have finished using the device, make sure to right-click on the icon and select "Unmount Volume".


 ..but that didn't work!


If the above did not work, it will be for one of two reasons. Either the device does not advertise itself as being in the USB mass storage class of devices, or the USB model description it provided did not give enough of a clue about how to access it.

First, an explanation of how it is intended to work. The method used to make these devices visible to the user is as follows:

  1. the USB device is plugged in
  2. the kernel calls hotplug
  3. hotplug checks /etc/hotplug/usb.distmap to see whether it needs to load a special driver (if, for example, the class of the device is not "mass storage" but it provides mass storage capabilities, hotplug needs to know about the device specifically)
  4. hotplug calls updfstab (part of the kudzu package)
  5. updfstab will check the name of the device (its USB description field) against the /etc/updfstab.conf.default file and will create an entry for the device in the /etc/fstab partition table, if it finds a match
  6. the user can now mount the device by right-clicking on the desktop and choosing "Disks" in the GNOME desktop

So, if it did not work as intended, there are two steps to suspect: the hotplug step, and the upfstab step. Here is how to diagnose the problem, and let the right people know how to fix it:

  1. Remove the usb-storage modules:
    rmmod usb-storage
  2. Plug your device in and check whether usb-storage is loaded automatically:
  3. If the usb-storage driver didn't load automatically, you'll need to modify /etc/hotplug/usb.distmap. The lines are very long, and it would be a good idea to copy an existing line and then edit that. The first field is the name of the driver to be loaded (usb-storage in our case), and the rest you can get from the output of lsusb. This takes some working out -- refer to the first line of usb.distmap to see what each field represents:
    # usb module         match_flags idVendor idProduct \
      bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass \
      bDeviceProtocol bInterfaceClass bInterfaceSubClass \
      bInterfaceProtocol driver_info
    Once /etc/hotplug/usb.distmap is modified, unplug the device, and repeat from step 1. File a bug against hotplug in Bugzilla to add this entry, and remember to include the entire line that you added to the usb.distmap file.
  4. Hopefully, the usb-storage loaded successfully in the previous step. Now launch "updfstab -t" as root, and it should show you the contents of /etc/fstab with a new entry added for your device. If it says:
    (nothing to do)
    you will need to teach updfstab about your device. The USB description that the device provided did not match anything that upfstab knows about. To do this:
    1. Launch kudzu, so it updates /etc/sysconfig/hwconf:
      service kudzu start
    2. Find the name of the device in /etc/sysconfig/hwconf. You are looking for an entry for the "HD" class, not the "USB" class. Here is an example, with the important line emphasised:
      class: HD
      bus: USB
      detached: 0
      driver: usb-storage
      desc: "Hewlett-Packard PSC 2200 Series"
      usbclass: 8
      usbsubclass: 6
      usbprotocol: 50
      usbbus: 1
      usblevel: 1
      usbport: 1
      usbdev: 15
      vendorId: 03f0
      deviceId: 2911
      usbmfr: Hewlett-Packard
      usbprod: PSC 2200 Series
    3. In /etc/updfstab.conf.default, add a match for the device now that you know the name. See the updfstab man page for the details about how to do this. In the above example, I added the line:
      match hd PSC
      to the "device camera" section of /etc/updfstab.conf.default, "PSC" being part of the "desc:" line in hwconf and knowing that printer/scanner/copier devices providing USB mass storage facilities are likely to be CF card readers. This means that the mount point
      will be created and will refer to that class of devices.
    4. Go back to step 4 once you're done.
    5. File a bug against kudzu if you needed to add an entry.

 Small print


Last updated: 16th Aug 2004

Many thanks to Bastien Nocera for providing insight into how this all works.

Tim Waugh <tim@cyberelk.net>
Bytemark HostingValid XHTML 1.0!Valid CSS!Privacy policyProblem viewing this site?