Using a USB Memory Key under Linux
I recently got a USB Memory Key. Essentially it's a very small box
that can literally be put on a keychain that has a USB plug on one end
and some flash memory on the other. Mine has 32MB of flash RAM; they
go from about 8MB to 128MB, as far as I can tell.
These keys are touted to "just work" under newer versions of Windows
(2000 and XP, specifically). I don't have such machines so didn't try
it. This key consistenly crashes my wife's Windows 98 machine, even
with the newest drivers, but works fine on a borrowed Gateway laptop
also running Windows 98.
But now to the good stuff. I have two machines I want to use this
on--one at work, one at home. Specs:
- Home:
- Pentium, 200Mhz, 96MB RAM, lots of disk space, added USB card
- Debian 3.0 (woody) linux, kernel 2.4.18
- Office:
- IBM NetVista A40
- Pentium III, 1Ghz, 512MB RAM, lots of disk space, USB built
in
- Debian 3.0 (woody) linux, kernel 2.4.18
- Key:
- IBM 32MB USB Memory Key
- Option: 22P5296
- FRU: 22P9057
- I had to make sure the usb modules were loaded and available. To
get the thing working, you need quite a few going:
- usbcore
- usb-{o,u}hci (depending on your USB hardware)
- usb-storage
- scsi_mod
- sg
- sd_mod
- The theory of it is this: when the usbcore/usb-*hci modules
notice the key being plugged in, they use usb-storage to simulate a
scsi controller and
pass the response off to the scsi disk driver, sd_mod. sd_mod assigns
it a /dev/sd*1 device, where * is the next available letter in your
scsi drive chain. On my office machine, that's a; at home it's b
because I have a SCSI zip drive.
- Make sure you have a place to mount the key; I use /mnt/usbkey.
- Assuming everything worked right, all you have to do is mount the
key:
mount -tvfat -oumask=0000 /dev/sda1 /mnt/usbkey
- If it didn't work right, make sure you have all the modules
loaded and working, then watch /var/log/messages as you insert and
remove the key.
- In my experience, kernel 2.4.x is required to
make this work. The usb modules under 2.2.x did not support
usb-storage adequately.