[TriLUG] usbdrive etc.

Andrew Perrin clists at perrin.socsci.unc.edu
Tue Jun 11 12:07:07 EDT 2002


Well here's the story. Real work was going terribly today so I decided to
do this instead.

Kernel 2.2.19pre17 didn't work with the key, which is unsurprising since
as far as I could tell usb-storage didn't work at all with 2.2.x
kernels. So I upgraded to 2.4.18; it's a custom-built kernel under debian
woody. I made sure to include the usb modules as modules, not compiled in.

Everything worked very nicely, with the only glitch being that I forgot to
make sure that sd_mod was loaded. Since the usb-storage driver works by
simulating a scsi disk, you need sd_mod.  Here's how it works:

- Insert the key in either USB port.
- usb module recognizes it:

Jun 11 11:52:01 perrin kernel: hub.c: USB new device connect on bus2/1,
assigned device number 3
Jun 11 11:52:01 perrin kernel: Manufacturer: IBM
Jun 11 11:52:01 perrin kernel: Product: IBM USB Memory Key

- usb module assigns it to a scsi bus and passes it off to sd_mod:

Jun 11 11:56:55 perrin kernel: Attached scsi disk sda at scsi1, channel 0,
id 0, lun 0
Jun 11 11:56:55 perrin kernel: SCSI device sda: 64000 512-byte hdwr
sectors (33 MB)
Jun 11 11:56:55 perrin kernel:  sda:<7>usb-storage: queuecommand() called
Jun 11 11:56:55 perrin kernel:  sda1

- mount it:

mount /dev/sda1 /mnt/tmp

- use it, umount it, disconnect it.

You can mke2fs it too, but then of course you lose portability to windows
machines.

All in all, a very cool gadget.

For the record, hardware is an IBM NetVista A40 running Debian 3.0
(woody) and now kernel 2.4.18.  lspci reports the following for the USB
bus:
00:1f.2 USB Controller: Intel Corp. 82820 820 (Camino 2) Chipset USB (Hub
A) (rev 02)
00:1f.4 USB Controller: Intel Corp. 82820 820 (Camino 2) Chipset USB (Hub
B) (rev 02)


The key is an IBM Memory Key, 32Mb, FRU 22P9057.

----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists at perrin.socsci.unc.edu * andrew_perrin (at) unc.edu


On 9 Jun 2002, Kevin - The Alchemist - Sonney wrote:

> On Sun, 2002-06-09 at 20:38, Andrew Perrin wrote:
> > Has anyone used one of these storage "keys" (e.g., usbdrive,
> > diskonkey) with linux? Effectively they're flash RAM with a USB
> > interface. I've inherited a 32MB one (IBM branded, don't know who actually
> > made it) and am wondering if it's worth the trouble to use it.
> 
> Oooh. I wanted to play with one of those - I thought it woudl be a great
> place to keep my GPG private key rings, since I need to use them on 
> more than 1 machine. Plug it in, mount, and symlinks in $HOME/.gnupg/
> take care of the rest.
> 
> -- 
> --------------------------------------------
> --      Kevin "The Alchemist" Sonney      --
> --  ICQ: 4855069            AIM: ksonney  --
> --------------------------------------------
> 320C 0336 3BC4 13EC 4AEC  6AF2 525F CED7 7BB6 12C9
>  It's not stupid...it's ADVANCED
> 




More information about the TriLUG mailing list