SanDisk ImageMate Dual Reader
March 3rd, 2003 by Steve R. Hastings in

My digital camera probably works well with GPhoto, but I've never tried it. I find it more convenient to use a Flash card reader.
The SanDisk ImageMate Dual Readers are a line of external USB Flash card readers with two slots, able to read two different Flash card formats. Three ImageMate Dual Reader models are available: CompactFlash and SD/MMC card, CompactFlash and SmartMedia and CompactFlash and Memory Stick. Only CompactFlash Type 1 is supported.
The ImageMate Dual Readers are compact, with a short USB cable that can be stored completely inside the reader. They also come with a USB extension cable. For typical desktop use, you probably would use the USB extension cable. But the short cable tucked inside the reader might be convenient when traveling with a laptop.
My ImageMate Dual Reader is an SDDR-73, with CompactFlash and SD/MMC card slots. I got it working under Linux, and it's unexciting--it simply works. In the rest of this article I describe how to set up an SDDR-73, but the instructions should work equally well for the other models.
If you use a Linux distribution that provides a precompiled kernel, you already may have a kernel setup that works with the ImageMate. If so, you can skip this section. If not, read on.
You need several modules in your kernel, either compiled in or loaded before you use the card reader. From the SCSI support section:
SCSI Support (CONFIG_SCSI, scsi_mod.o)
SCSI disk support (CONFIG_BLK_DEV_SD, sd_mod.o)
SCSI generic support (CONFIG_CHR_DEV_SG, sg.o)
Probe all LUNs on each SCSI device (CONFIG_SCSI_MULTI_LUN) enabled.
from the Filesystem section:
DOS FAT fs support (CONFIG_FAT_FS, fat.o)
MSDOS fs support (CONFIG_MSDOS_FS, msdos.o)
VFAT (Windows-95) fs support (CONFIG_VFAT_FS, vfat.o)
from the USB support section:
Support for USB (CONFIG_USB, usbcore.o)
USB drivers for your computer; one or more of:
ECHI HCD (CONFIG_USB_EHCI_HCD, ehci-hcd.o)
UHCI (CONFIG_USB_UHCI, usb-uhci.o)
OHCI (CONFIG_USB_OHCI, usb-ohci.o)
USB Mass Storage support (CONFIG_USB_STORAGE, usb-storage.o)
The ImageMate is recognized as a USB storage device. The Linux kernel treats USB storage devices as SCSI devices, so it is assigned a device of /dev/sdx, where x is a letter from a to z. My system has no SCSI devices, so the ImageMate is assigned to the first SCSI drive, /dev/sda. But it's also to /dev/sdb, because the CompactFlash card slot is assigned to one SCSI device, and the SD/MMC card slot is assigned to a second.
For this all to work correctly, your SCSI subsystem must have been compiled with the option to Probe all LUNs on each SCSI device (CONFIG_SCSI_MULTI_LUN) enabled. LUNs, or logical unit numbers, are a way for a single device to be treated as multiple devices. If the Probe all LUNs option is set to false, only the first slot in the reader (the CompactFlash) will actually work.
To tell which SCSI drive your ImageMate is assigned to, simply look at your system log files. The kernel log should have messages about this, and if you boot with the ImageMate attached, the dmesg command also will show the information.
I suggest you create abstract names for the card reader in /dev. You should have a name for each card slot device, for example:
# ln -s /dev/sda1 /dev/cf # ln -s /dev/sdb1 /dev/mmc
You need to state /dev/sda1 rather than /dev/sda; otherwise, the mount command will fail with this message:
mount: wrong fs type, bad option, bad superblock on /dev/sda,
or too many mounted file systems
The actual problem is none of these things; it's simply that you didn't specify which partition to mount. /dev/sda1 specifies the first partition. (On a Flash card, there is probably only a single partition.)
Next add the following lines to your /etc/fstab file:
/dev/cf /mnt/cf vfat rw,user,noauto 0 0 /dev/mmc /mnt/mmc vfat rw,user,noauto 0 0
With these lines in place, you can mount a CompactFlash with:
mount /mnt/cf
Be sure to unmount it before removing the Flash card:
umount /mnt/cf
When you add the mount points to /etc/fstab, you can mount a Flash card easily from a GNOME 2.x desktop. Simply right-click on the desktop, choose Disks from the menu and choose the Flash device you wish to mount.
In KDE, you need to create an icon for each of the Flash readers' slots. Instructions on how to do this are available here.
I paid about $30 for my ImageMate, and I am very satisfied with it. Getting it to work under Linux was easy, and it is working well.
Flash cards don't last forever, but here are a few tips on how to take care of them so they can last longer.
Any given sector on a Flash chip can be written to only a certain number of times. Although this number is quite high (hundreds of thousands of writes, at least), some parts of the Flash card are written to rather frequently, specifically, the file allocation table (FAT).
Most Flash cards are formatted using the FAT filesystem. The FAT itself, where files are allocated, is written to multiple times whenever you write or delete a file. If you delete a hundred files, you must write to the FAT at least a hundred times. For this reason, when I wish to wipe clean my camera's Flash cards, I usually don't delete the files. Instead, I use the camera's Format feature, which gets rid of all the photos with minimal writes to the chip. (Of course, if you want or need to leave some photos in place while deleting others, go ahead.) For the same reason, if you have many small files you wish to save on a Flash card, it is best to bundle them into a tar file first.
If you have a device such as a camera that uses Flash cards, you probably should use that device to format the Flash card. If you want to format under Linux, be quite sure to use the same format the device expects. For example, my camera expects FAT16 on a Flash card; if I were to format it as FAT32, the card would not work in my camera. You can use the minfo command from the MTools package to find out how a Flash card was formatted. This command tells you the exact mformat command line you need to use to format another card in the same manner. If you are formatting a card purely for use with Linux systems, you can use any legal filesystem (such as ext2).
Sometimes the Flash card may develop a bad sector. For example, during my last vacation I discovered that my camera would hang with one particular CompactFlash card when it was three-quarters full. I suspected a bad sector. I formatted it under Windows with Bad Sector Scan enabled, after which it again worked reliably. The Linux equivalent would be to run the mbadblocks program from the MTools package; this finds bad blocks and marks them bad in the FAT. However, in my testing with my ImageMate, I have found that mbadblocks hangs before completing its check of a Flash card. I am going to contact the MTools maintainers and see if mbadblocks can be made to work correctly. For now, assume it doesn't work.
Steve Hastings first used UNIX on actual paper teletypes. He enjoys bicycling, music, petting his cat and making his Linux computers do new things.
Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Subscribe now!
The Latest
Newsletter
Tech Tip Videos
- Jul-01-09
- Jun-29-09
Recently Popular
From the Magazine
July 2009, #183
News Flash: Linux Kernel 3.0 to include an on-the-go Expresso machine interface! Ok, maybe not, but Linux is definitely going mobile, from phones to e-readers. Find out more inside about Android, the Kindle 2, the Western Digital MyBook II, The Bug, and Indamixx (a portable recording studio). And if you've gone mobile and you been wanting more Emacs in your life then check out Conkeror.
To compliment the mobile we've got the stationary: parsing command line options with getopt, checking your Ruby code with metric_fu, and building a secure Squid proxy. How is this stationary you ask? What can we say? It's not. We just wanted to see if anybody actually read this part of the page :) .
All this and more, and all you have to do is get your hot sweaty hands on the latest copy of Linux Journal.
Delicious
Digg
StumbleUpon
Reddit
Facebook








Problem with Usb Driver
On June 20th, 2007 Manoj Verma (not verified) says:
I am using RED HAT 9 Kernel Version 2.4.20.
There are two kernel images in my system: 2.4.20-8 and 2.4.20. The first kernel image is not loading ehci-hcd.o module while boot up. It is getting hang.
Later version is boot up properly with error message while it checks usb drivers ( i.e. ehci-hcd.o) & its storage devices (usb) not working.
While listing the loaded module (lsmod), ehci-hcd is missing. We tried insmod on object file but it shows kernel mismatch error.
Please provide me with solution.
Thank You.
Manoj Verma
INDIA
Re: SanDisk ImageMate Dual Reader
On May 11th, 2004 Anonymous says:
I have the SDDR-73 and have worked with it using numerous kernels. It's led me to make a few discoveries:
I had a similar lockup problem, forcing a kernel reboot, back when I was using the 2.4.18 kernel and a 256mb SD card. The card itself either beceme corrupted or started out that way, and I had to get a warranty replacement.
The most annoying trouble I've had since then is the fact that I need to have the card(s) in the reader at the time I plug it into the usb port, or I would not have a device lun with which to work. This has been the case under both 2.4.22 and 2.6.5.
I also use a keychain drive, I sometimes have to reverse the mountpoints that I normally use (/mnt/cf and /mnt/cruzer) depending which one has been assigned /dev/sda1 or sdb1. (Note that also confounds /dev/cf aliases.) I wish I knew of a consistent way to assign the scsi emulation device numbers based on the usb identification; it would make life much easier.
Debian Sid w/2.6.5 kernel
SanDisk SDDR-73 reader, 128 CF, 256 SD, and 512 Cruzer
Lexar 256 CF
changing mount points
On January 22nd, 2005 Anonymous (not verified) says:
Hi, you can use the LABEL=BLAHBLAH feature of newer mount programs.
Just give the flash parition label when you format it. Here's my
/etc/fstab:
#
/dev/hda3 / ext3 errors=remount-ro 0 1
/dev/hda2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
/dev/hda1 /boot ext3 defaults 0 2
LABEL=USBFLASH /mnt/usbflash ext3 noauto,noexec 0 0
LABEL=USBDISK /mnt/usbdisk ext3 noauto,noexec 0 0
Re: SanDisk ImageMate Dual Reader
On January 2nd, 2004 Anonymous says:
i have the sddr 77 model with windows 98SE. i had to go to the sandisk website and download the drivers. an exec file and a firmware upgrade ( no idea what that is)
when i ran the firmware file i got an driver load error. i know i sound like a complete amateur, which i am, but i have no idea how to make it work.
can anyone help?
Using with some precompiled kernels
On September 7th, 2003 Anonymous says:
Most distributions come with the necessary kernel support, but with the option "Probe all LUNs on each SCSI device (CONFIG_SCSI_MULTI_LUN)" disabled on their precompiled kernels. To avoid having to recompile the kernel just because of this, do one of the following:
- If SCSI support is compiled as a module, add the following line to your /etc/modules.conf:
options scsi_mod max_scsi_luns=2
- If SCSI support is builtin in the kernel, add the following kernel boot parameter:
max_scsi_luns=2
(e.g. use ' append="max_scsi_luns=2" ' to lilo.conf or equivalent in other boot managers)
This way the SCSI disk support will detect both sda and sdb (if you know your device has more logical units, increase from 2 to a higher value).
Make sure any USB modules are loaded in a boot script if you don't have a USB daemon.
Re: SanDisk ImageMate Dual Reader
On August 29th, 2003 Anonymous says:
Great article. I just got an SDDR-93 and it works great by following this article. I had a lot of troubles talking to my Toshiba PDR-3310. However when I bought a 256 SD card for it, it came with a free card reader (via mail in rebate). So now I don't have to launch Windows to grab my picts. Horray!
Re: SanDisk ImageMate Dual Reader
On April 11th, 2003 Anonymous says:
Similar problems here, with MMC cards. It looks like avoiding hard disk activity will help a bit (use NFS or SMB :)) but of course doesn't solve the problem. Perhaps it's a driver-related... I've heard that SDDR-33 works fine. However, it looks like that model is getting very hard to obtain. Suggestions of other working MMC readers are welcomed. :-)
Re: SanDisk ImageMate Dual Reader
On August 21st, 2003 Anonymous says:
I used to have the SDDR-31, which worked quite well under RedHat v.7.2 and v7.3. Nice unit.
Recently moved and lost the CF reader in the move, unfortunately.
However, today I purchased a SanDisk ImageMate SDDR-91-07 USB 2.0 CF reader and followed the instructions listed above (thank you Linux Journal!) and all worked well.
Sorry, but I have not worked with MMC cards, so I am no help there.
I picked mine up at a local Best Buy store. You may find other places sell it cheaper.
http://scm-microsystems.best-buy-electronics-store.com/home.php?c=66&productID=70279
I use Lexar 128mb and 8mb CompactFlash type II cards, and they both read fine using the SDDR-91 under RedHat v.8.0 with kernel 2.4.20-18.8
I set them to mount read only, as I will only format the cards in the camera, and only when full.
I store images at the highest bit rate possible, which for my Nikon CoolPix 950 is approximately ~3 meg per file, so they can get rather large.
My USB port is 1.0 compliant only, but it works for me.
I recommend this card reader to folks out there using Linux, as the packaging does not state that it will work, but it does.
Can't vouch for any other Linux flavor other than RedHat.
Re: SanDisk ImageMate Dual Reader
On July 22nd, 2003 Anonymous says:
Well, same problem for me with SDDR-93 (SD/MMC) : copy from the reader to my harddisk sometimes hangs (especially with big files). I can't find out why and what to do (when it happens, my only solution today is to reboot ! I can't even kill the cp process).
But I don't know where it comes from (usb-storage module, hardware, scsi modules, usb 2.0 ...)
Any help is welcome !
Re: SanDisk ImageMate Dual Reader
On April 9th, 2003 Anonymous says:
I am having trouble with the usb-storage module locking up on redhat 7.3 using the sddr-73 and SD cards. It occurs when I try to move large amounts of information. Has anybody figured out how to deal with this yet?
Re: SanDisk ImageMate Dual Reader
On March 18th, 2003 jmcdougald (not verified) says:
I have a similar SanDisk reader as well. The model number is:
SDDR-77 and is a CF / MS Dual Reader.
I have a problem with files which exceed 100KB in size. Specifically the .jpegs that my camera creates will be "blocky" if the file size exceeds 100KB. If I leave the CF card in the camera and mount the device everything works fine. If I use the CF card in the reader I have problems.
I have compiled the usb-storage.o module with and without built in support for the SanDisk readers and there is no effect.
I'm continuing to work on this as I have used this device in the past (with an older kernel - circa 2.4.16) and have only recently encountered the problem (kernel version 2.4.20).
If anyone has any suggestions, I'd love to hear them.
Re: SanDisk ImageMate Dual Reader
On March 21st, 2003 Anonymous says:
I've been experiencing the same problem with the SDDR-77 producing blocky images. I'm using kernel 2.4.19.
Re: SanDisk ImageMate Dual Reader
On March 7th, 2003 Anonymous says:
I seem to have the same reader as the author (SDDR-73, CF and SD/MMC cards), and set up my kernel the same way. I've had no problems with the flash, but copying a group of not-insignificant files (e.g. a bunch of mp3s) to a 256mb SD card has caused my system to lock up several times. Nothing appears in the system logs that I can trace to this, so I'm reduced to Groucho Marx's medical advice: "Don't do that."
Any good second opinions?
Re: SanDisk ImageMate Dual Reader
On March 13th, 2003 Anonymous says:
Hi there,
I also have the same problem. I have the same reader SDDR-73 and with MMC 128 MB.
When i try to copy files more then 100 MB,It is making my laptop to crash. I did e2fsck. Do you think is the problem with the reader or with usb-uhci module.
Wr
Re: SanDisk ImageMate Dual Reader
On March 7th, 2003 steveha (not verified) says:
I put a Lexar 64MB SD card into my ImageMate and copied a bunch of Ogg files back and forth. No lockups.
Is it possible that your system didn't really lock up, but rather froze for a long time? In other words, did you wait a few minutes to see if it came back from the lockup, or did you reboot right away?
Re: SanDisk ImageMate Dual Reader
On March 3rd, 2003 Anonymous says:
Well written and useful article; thanks. --S.
Re: SanDisk ImageMate Dual Reader
On March 4th, 2003 Anonymous says:
Do you try it in QNX OS ? If do , how ?
Post new comment