# Cannot mount compact flash using SanDisk ImageMate SDDR-31

## red2

I am having problems mounting media in my usb compact flash reader.

the entry in /etc/ftab looks like this:

/dev/sda /mnt/flash vfat user,iocharset=iso8859-1 0 0

When I try to mount the media I get the following in /var/log/messages:

Jun  2 09:47:44 matt kernel: MSDOS FS: IO charset iso8859-1

Jun  2 09:47:44 matt kernel: FAT: bogus logical sector size 7950

Jun  2 09:47:44 matt kernel: VFS: Can't find a valid FAT filesystem on dev 08:00.

Jun  2 09:47:44 matt kernel: FAT: freeing iocharset=iso8859-1

I have usb-storage compiled into the kernel, it IS NOT a module.

Should this make a difference?

Does anyone have any other hints?

thanks

----------

## SirronD

You list "/dev/sda" as your fstab device. I think it should be "/dev/sda1"

----------

## red2

Thanks,

I meant to say in my previous post that I have tried /dev/sda1 as well and got the same result....

It doesn't work...

----------

## red2

It works with the following entry in /etc/fstab!

/dev/sda1 /mnt/flash vfat user,ro 0 0

----------

## FINITE

I would be interested to here more on how you got this working. I have a compact flash card reader (usb). Its recognized a CF media shuttle. Mainly I was wondering if vfat is the defualt/standard file system that is used for flash memory? The card/s are used in my Nikon degital camera and I realy need to get this damn reader working so that I can load images to my hard driver to be posted via ftp for family members. Thanks for any help  :Very Happy: 

----------

## red2

I'm since changed kernels (using r7) and have usb-storage as a module.

Now, it seems that if usb-storage is loaded and there is no disk

in the reader then it won't let me mount the disk (because I have no

/dev/sda1). I have to rmmod and modprobe usb-storage

again and then I have a /dev/sda1 device.

Make sure you have a mount point (mkdir /mnt/flash). 

Then I have a created a floppy device on my desktop

from kde and mount it from there.  You can also do

mount /mnt/flash.

Let me know if this works.  I've had problems before not

having the correct languages compiled into the kernel.  Doing

tail /var/log/messages after trying to mount helped me to 

debug that....

----------

## FINITE

Ya I got it working fine. All I needed to do was to compile support for VFAT in to the kernel and it worked. I had already added the needed line to /etc/fstab set it to not automount too. Otherwise I'd get an error about not being able to mount due to no media being in the reader sometimes when I reboot. Thanks for helping out.

----------

## red2

Hey, how did you resolve that boot error?

When I'm booting up a get an error because there is no /dev/sda1

(I don't keep my flash cards in the reader during a bootup).

I would rather not have to rmmod usb-storage;modprobe usb-storage

on every reboot.

thanks

----------

## FINITE

In fstab (the line for your flash card reader) add noauto to the mount options so that its not mounted automatically when you boot up.  Mine looks something like this: /dev/sda1  /mnt /Flash   vfat     users,ro,noauto    00". Should take care of your problem unless its something else causing it.

----------

## mellofone

I have a scandisk CF reader as well, and am having problems with it seeing any /dev/sda.

I have the correct USB drivers compiled into the kernel, as well as usb-storage. I can see through dmesg that it detects the reader, but am stuck from here. As soon as I plug a card into the unit, no /dev/sda(x) is created.

Do you have better results when usb-storage is a module? Are there other things/modules I am missing?

Update: I tried the module, and still no /dev/sda1

----------

## red2

1.type: rmmod usb-storage

2.plug in compact flash card

3. type:modprobe usb-storage

4. You should have a /dev/sda1 now.  If not, post the output of tail /var/log/messages

----------

## rommel

i am not having any luck either but i may be causing the problem...does the sandisk have to be sda1?....the reason i ask is that i have an sda1...scsi drive...sda1 is /boot...also have sdb1 and sdc1...they are swap....i have appended fstab to have the sandisk as /dev/sdd1 ...but will that not work?...i am going to recompile and change the usb-storage to a module rather then compiled into the kernel

----------

## mellofone

 *red2 wrote:*   

> 1.type: rmmod usb-storage
> 
> 2.plug in compact flash card
> 
> 3. type:modprobe usb-storage
> ...

 

Does it have to be an SDDR-31 reader? I just noticed mine isn't   :Embarassed: 

----------

## rommel

hey mellofone it apparently has to be a 31 or 33...looks like the one i have sddr-55 is sol under linux...good new is the 31 is only 18 bucks at newegg

----------

## mellofone

 *rommel wrote:*   

> hey mellofone it apparently has to be a 31 or 33...looks like the one i have sddr-55 is sol under linux...good new is the 31 is only 18 bucks at newegg

 

Doh! At least that explains the problem and I wasn't crazy.

Thanks.

----------

## cbrese

I'm also having problems trying to get my Sandisk ImageMate II working.

There is no sda1 in /dev.  I've tried creating it with 

```
mknod /dev/sda1 b 8 1
```

but when I try:

```
mount -t vfat /dev/sda1 /mnt/flash
```

I get:

```
mount: /dev/sda1 is not a valid block device
```

if I do a dmesg I get (I turned on USB Mass Storage verbose debug)

```

Initializing USB Mass Storage driver...

usb.c: registered new driver usb-storage

usb-storage: act_altsettting is 0

usb-storage: id_index calculated to be: 39

usb-storage: Array length appears to be: 68

usb-storage: Vendor: Sandisk

usb-storage: Product: ImageMate SDDR-31

usb-storage: USB Mass Storage device detected

usb-storage: Endpoints: In: 0xc17fb3a0 Out: 0xc17fb3b4 Int: 0x00000000 (Period 0)

usb-storage: New GUID 078100020000000000000000

usb-storage: GetMaxLUN command result is -32, data is 223

usb-storage: clearing endpoint halt for pipe 0x80000680

usb-storage: Transport: Bulk

usb-storage: Protocol: Transparent SCSI

usb-storage: *** thread sleeping.

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Command INQUIRY (6 bytes)

usb-storage: 12 00 00 00 ff 00 6c c1 00 6c e5 df

usb-storage: Bulk command S 0x43425355 T 0x11 Trg 0 LUN 0 L 255 F 128 CL 6

usb-storage: Bulk command transfer result=0

usb-storage: usb_stor_transfer_partial(): xfer 255 bytes

usb-storage: usb_stor_bulk_msg() returned 0 xferred 56/255

usb-storage: Bulk data transfer result 0x1

usb-storage: Attempting to get CSW...

usb-storage: Bulk status result = 0

usb-storage: Bulk status Sig 0x53425355 T 0x11 R 199 Stat 0x0

usb-storage: Fixing INQUIRY data to show SCSI rev 2

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

  Vendor: SanDisk   Model: ImageMate II      Rev: 1.30

  Type:   Direct-Access                      ANSI SCSI revision: 02

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Bad target number (1/0)

usb-storage: *** thread sleeping.

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Bad target number (2/0)

usb-storage: *** thread sleeping.

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Bad target number (3/0)

usb-storage: *** thread sleeping.

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Bad target number (4/0)

usb-storage: *** thread sleeping.

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Bad target number (5/0)

usb-storage: *** thread sleeping.

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Bad target number (6/0)

usb-storage: *** thread sleeping.

usb-storage: queuecommand() called

usb-storage: *** thread awakened.

usb-storage: Bad target number (7/0)

usb-storage: *** thread sleeping.

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 6

USB Mass Storage support registered.

```

I can see the Sandisk with usbview and worked great under Red Hat.

Should /dev/sda1 be created automaticaly?  Should I create it with mknod?  If I need to create it what should the major/minor be?

----------

## cbrese

I fixed my problem.

I forgot to make sd_mod (SCSI Disk Support) when I build my kernel.

Once I built sd_mod and put it in /etc/modules.autoload (before usb-storage) I was able to mount my flash card.

Hope this helps someone else.

----------

## squareroot

I read this thread before trying my CF reader, even though it's a microtech reader sold under the Dazzle Zio! name, and it helped.   :Smile: 

There was some weirdness I got around.  

Trying to boot with a CF in the reader produced a strange problem, the BIOS would hang even before I got to GRUB, or anything else.  Changing BIOS settings to halt on anything, except disk or keyboard, showed the off board controller only detected one disk.  

I have four IDE drives on separate channels: hda, hdc, hde, hdg.  

(Also, a cd-writer as hdd.) The BIOS, and GRUB, only count installed drives.  

This acts like a BIOS problem with combinations of SCSI and IDE drives.  

Even if your BIOS settings allow you to boot I would guess there could be 

strange behavior if your devices move when you plug in a CF card.  

I solved my problem by hotplugging the CF reader after boot.  

Anyone else have this happen?  

---

BIOS is set for non-pnp OS.  

In case it matters:  current system EPOX 8KTA3 with 1 GHz. Athlon and 1 GB. RAM.,  Maxtor Drives, 2x80 GB., 2x40 GB., Promise ATA 100 controller (sold under Maxtor label.), using on board sound (Via686b), Lite-On NIC installed, but not used or connected during test.  

---

To save others from posting warnings, yes, I have flashed the BIOS and compiled kernels with workarounds for Via controller and sound

problems.

----------

## pilla

I have a Vivitar digital camera, model 3725. Previous model is known to work with Linux.  Windoze uses a USB Mass Storage driver to mount it, and it has a 16 MB FAT file system. 

As it is a kind of a compact card reader, I thought this was a good thread for it.

USB works correctly (my mouse works), but I cannot mount /dev/sda -- I know, it should be sda1,  but devfsd doesn't create it.

These are my log messages

```

Sep  1 21:52:21 mate /etc/hotplug/usb.agent: Setup usb-storage for USB product 784/3460/1

Sep  1 21:52:21 mate kernel: Initializing USB Mass Storage driver...

Sep  1 21:52:21 mate kernel: usb.c: registered new driver usb-storage

Sep  1 21:52:21 mate kernel: scsi1 : SCSI emulation for USB Mass Storage devices

Sep  1 21:52:21 mate kernel:   Vendor: 3MP_DSC   Model:                   Rev:

Sep  1 21:52:21 mate kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02

Sep  1 21:52:21 mate kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0

Sep  1 21:52:21 mate kernel: SCSI device sda: 31264 512-byte hdwr sectors (16 MB)

Sep  1 21:52:21 mate kernel: sda: Write Protect is off

Sep  1 21:52:21 mate kernel:  /dev/scsi/host1/bus0/target0/lun0:<7>usb-storage: queuecommand() called

Sep  1 21:52:21 mate kernel:  p1

Sep  1 21:52:21 mate kernel: USB Mass Storage support registered.

Sep  1 21:53:25 mate kernel: usb.c: USB disconnect on device 3

Sep  1 21:53:26 mate kernel: Device not ready.  Make sure there is a disc in the drive.

Sep  1 21:53:26 mate kernel: sda : READ CAPACITY failed.

Sep  1 21:53:26 mate kernel: sda : status = 1, message = 00, host = 0, driver = 08

Sep  1 21:53:26 mate kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready

Sep  1 21:53:26 mate kernel: sda : block size assumed to be 512 bytes, disk size 1GB.

Sep  1 21:53:26 mate kernel:  /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0

Sep  1 21:53:26 mate kernel:  I/O error: dev 08:00, sector 0

Sep  1 21:53:26 mate kernel: Device not ready.  Make sure there is a disc in the drive.

Sep  1 21:53:26 mate kernel: sda : READ CAPACITY failed.

Sep  1 21:53:26 mate kernel: sda : status = 1, message = 00, host = 0, driver = 08

Sep  1 21:53:26 mate kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready

Sep  1 21:53:26 mate kernel: sda : block size assumed to be 512 bytes, disk size 1GB.

Sep  1 21:53:26 mate kernel:  /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0

Sep  1 21:53:26 mate kernel:  I/O error: dev 08:00, sector 0

Sep  1 21:53:28 mate kernel: Device not ready.  Make sure there is a disc in the drive.

Sep  1 21:53:28 mate kernel: sda : READ CAPACITY failed.

Sep  1 21:53:28 mate kernel: sda : status = 1, message = 00, host = 0, driver = 08

Sep  1 21:53:28 mate kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready

Sep  1 21:53:28 mate kernel: sda : block size assumed to be 512 bytes, disk size 1GB.

Sep  1 21:53:28 mate kernel:  /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0

Sep  1 21:53:28 mate kernel:  I/O error: dev 08:00, sector 0

Sep  1 21:53:54 mate kernel: hub.c: USB new device connect on bus2/2, assigned device number 4

Sep  1 21:53:58 mate /etc/hotplug/usb.agent: Setup usb-storage for USB product 784/3460/1

Sep  1 21:54:48 mate kernel: usb.c: USB disconnect on device 4

Sep  1 21:54:48 mate kernel: sda : READ CAPACITY failed.

Sep  1 21:54:48 mate kernel: sda : status = 1, message = 00, host = 0, driver = 08

Sep  1 21:54:48 mate kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready

Sep  1 21:54:48 mate kernel: sda : block size assumed to be 512 bytes, disk size 1GB.

Sep  1 21:54:48 mate kernel: sda: test WP failed, assume Write Enabled

Sep  1 21:54:48 mate kernel:  /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0

Sep  1 21:54:48 mate kernel:  I/O error: dev 08:00, sector 0

Sep  1 21:54:48 mate kernel:  unable to read partition table

Sep  1 21:54:48 mate kernel: Device not ready.  Make sure there is a disc in the drive.

Sep  1 21:54:48 mate kernel: Device not ready.  Make sure there is a disc in the drive.

Sep  1 21:54:48 mate kernel: Device busy for revalidation (usage=1)

Sep  1 21:54:48 mate kernel:  I/O error: dev 08:00, sector 0

Sep  1 21:54:48 mate kernel: FAT: unable to read boot sector

Sep  1 21:54:48 mate kernel: Device not ready.  Make sure there is a disc in the drive.

Sep  1 21:54:48 mate kernel: Device not ready.  Make sure there is a disc in the drive.

Sep  1 21:54:48 mate kernel: sda : READ CAPACITY failed.

Sep  1 21:54:48 mate kernel: sda : status = 1, message = 00, host = 0, driver = 08

Sep  1 21:54:48 mate kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready

Sep  1 21:54:48 mate kernel: sda : block size assumed to be 512 bytes, disk size 1GB.

Sep  1 21:54:48 mate kernel:  /dev/scsi/host1/bus0/target0/lun0: I/O error: dev 08:00, sector 0

```

As you can see, it cannot get correct partition information nor anything else from the USB. usbview reports the correct stuff.

```

MP_DSC        

Manufacturer:                          

Speed: 12Mb/s (full)

USB Version:  1.00

Device Class: 00(>ifc )

Device Subclass: 00

Device Protocol: 00

Maximum Default Endpoint Size: 8

Number of Configurations: 1

Vendor Id: 0784

Product Id: 3460

Revision Number:  0.01

Config Number: 1

   Number of Interfaces: 1

   Attributes: 40

   MaxPower Needed:   0mA

   Interface Number: 0

      Name: usb-storage

      Alternate Number: 0

      Class: 08(stor.) 

      Sub Class: 6

      Protocol: 50

      Number of Endpoints: 2

         Endpoint Address: 03

         Direction: out

         Attribute: 2

         Type: Bulk

         Max Packet Size: 16

         Interval: 0ms

         Endpoint Address: 84

         Direction: in

         Attribute: 2

         Type: Bulk

         Max Packet Size: 16

         Interval: 0ms

```

any suggestions?

----------

## Rebes

 *cbrese wrote:*   

> I fixed my problem.
> 
> I forgot to make sd_mod (SCSI Disk Support) when I build my kernel.
> 
> Once I built sd_mod and put it in /etc/modules.autoload (before usb-storage) I was able to mount my flash card.
> ...

 

That's what did it for me!  Actually, I built it right in, but same difference.  Works great!

Thanks!

Rebes

----------

