# IBM USB DiskOnKey Memory Stick

## blamothe

I have one of those new IBM DiskOnKey 8mb USB memory stick, does anyone know how to enable it in linux.  Because I have this, I opted not to get a floppy drive for my laptop, so I really, really need this to work.  Thanks

----------

## Jimboberella

Your kernel sould have hotplug, usb, usb mass storage, and scsi generic support (compiled in or as modules)

Then when you plug in the usb drive it will show up in your log file something like this

```
hub.c: USB new device connect on bus1/2/1, assigned device number 3

scsi1 : SCSI emulation for USB Mass Storage devices

  Vendor:           Model:                   Rev:

  Type:   Direct-Access                      ANSI SCSI revision: 02

Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0

SCSI device sdb: 254841 512-byte hdwr sectors (130 MB)

sdb: Write Protect is off

 /dev/scsi/host1/bus0/target0/lun0: p1

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 3
```

Then you can manually mount /dev/sdb1 (or whatever yours shows up as) or edit your /etc/fstab. I have this in my fstab

```
/dev/sdb1               /mnt/usbdisk    auto            uid=1000,gid=100,user,noauto           0 0
```

----------

## blamothe

which log file should i be looking in?  do you have any idea what the name of it may be, or where it may be located?  thanks for you help so far though.

----------

## cs-student

do:

```
 dmesg
```

and you should see the above output.

----------

## blamothe

ok, I am not sure if i am reading it right, but i can't tell which device i should mount exactly, when i do dmesg, something similar to your output comes up, but i can't tell what to mount.  Heres the output:

hub.c: USB new device connect on bus1/2, assigned device number 2

scsi0 : SCSI emulation for USB Mass Storage devices

  Vendor: M-Sys     Model: DiskOnKey         Rev: 2.01

  Type:   Direct-Access                      ANSI SCSI revision: 02

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 2

can you tell what I should moutn?  also, I have one of the first 8Mb DiskOnKeys, which is only a FAT12.  I can't think of any kernel that would support this file system, so does anyone know how i could possibly get around that?  thanks.

----------

## cs-student

This is where I am stuck... I get the card recognized but no 'sd*' shows up in /dev. A new directory shows up -> /scsi/host1/target0/lun0/ but there is nothing in there. Hopefully someone has gotten these things working and can help out.

BTW: I have a sony vaio w/ built in memory stick reader

----------

## dook43

Is SCSI Disk support enabled?

----------

## blamothe

yea it is, i have no idea what to do now, but at least i know the kernel recognizes it, so its possible.

----------

## jesterspet

Dude,

I got mine working, See if  this thread helps you diagnose your problem.

If not provide more detail about your issue, and maybe something will come to me.

----------

## cs-student

Hey jesterspet, thanks alot, I finally got my memory stick reader working thanks to your link!!!

Thanks!!

----------

## jesterspet

 :Cool:  No problem, I hoped it would help.  :Cool: 

----------

## blamothe

ok, i think this should help me, but how do i enable nls codepage, nls iso 8859.  if i can enable these two, then i could do all of the other steps. and i could see if it works.

----------

## cs-student

you have to have the nls codepage and iso enabled in your kernel configuragtion ( either built in or as modules ) after you do that, i just put 

usb-uhci

usb-storage

udf 

sd_mod

the nls codepage and iso should load themselves if you have them compiled as modules

into /etc/modules.autoload and reboot

then whenever you want to access the disk, put it in and run

```
mount /mnt/memorystick
```

replace 'memorystick' with whatever the directory you want to mount to is.

this is how i got mine working anyway.

edit: you also will need support for vfat, fat ( i loaded these as modules )

----------

## blamothe

i know that i have to enable them in my kernel, my question is where.  under what heading would nls codepage be, and what is it exactly, i have never heard of it.  thanks alot though

----------

## blamothe

ok, i found where nls codpage and iso was, and i got really close.  the kernel is detecting the memory stick, but when and /proc/usb/devices has it listed here:

```
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0

D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1

P:  Vendor=08ec ProdID=0010 Rev= 2.00

S:  Manufacturer=M-Systems

S:  Product=DiskOnKey

S:  SerialNumber=0302120D0F008554

C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 94mA

I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

```

but when i look for a scsi device in /dev/discs, none shows up.  now i can't find the name of the device i am trying to mount.  how should i get around this?  thanks

----------

## cs-student

try ( as root )

```
cd /dev

grep sd*
```

that or look int /dev/scsi and it should show up in there if you have it configured properly

----------

## blamothe

well, i cd'd to /dev/ and did grep sd* as root, and the system just hung for about ten minutes, so i killed it and looked into /dev/scsi/ and there was just a huge directory path that led to generic, the exact path was 

```
 /dev/scsi/host0/target0/bus0/lun0/generic
```

 and generic was the first, and only, thing i ran into that wasn't a directory.  when i tried to mount it with 

```
mount /dev/scsi/host0/target0/bus0/lun0/generic /mnt/diskonkey/
```

 it spit back an error saying that generic wasn't a block device.  does anyone have any idea what the problem is?

----------

## blamothe

ok, i am pretty sure i mounted it, i had to also enable scsi disc support, but now i can't format it, so i can't use it.  I know that there is a fat12 filesystem on the disk, and i don't even know how to enable that in my kernel.  I tried running: 

```
cfdisk /dev/sda
```

 but it came out with this error:

```
  FATAL ERROR: Cannot read disk drive

       Press any key to exit cfdisk 

```

 i have no idea what to do know, i need to at least put a fat32 on it so it would be readable in both linux and windows.  could anyone please help?  thanks.

----------

## blamothe

ok, now i am able to format it and put both fat32 and ext2 filesystems from cfdisk, but now i can't access the drive, each time i try, it says input/output error and nothing else happens. does anyone have a clue on what i should do?  thanks

----------

## scootersmk

blamothe, 

In the future and if you dont mind doing it on this thread, instead of just telling us your problem and then telling us you fixed it, can you say what you did to fix the problems.  That way users like me who are haveing the same problems can come on here and get some help without having to start a whole new thread.  I'm not trying to be mean or anything.  I am just having some of the same problems you are and i am intrested in how you fixed them. Thanks.

----------

## AgenT

 *blamothe wrote:*   

> ok, now i am able to format it and put both fat32 and ext2 filesystems from cfdisk, but now i can't access the drive, each time i try, it says input/output error and nothing else happens. does anyone have a clue on what i should do?  thanks

 

Might be that you are now trying to mount the wrong device. Sometimes, for whatever reason, my stick will switch devices on me (probably because I have changed some other USB device ala unplugging my mouse). Instead of mounting /dev/sda try mounting /dev/sda1. Also, best way to see your sda list is just type this as root:

```
ls /dev/sda*
```

If nothing shows up, mount /dev/sda.

----------

