Accessing Digital Photography Storage Cards with GNU/Linux

Storage Cards and Reader

Storage cards are used in a variety of electronic devices, including computers and digital cameras. In the world of digital photography, storage cards can be regarded as a kind of digital film. Just like analog film, the storage card is loaded into your camera, and used as a medium to hold images. Like film cartridges, storage cards hold different numbers of pictures, and come in several sizes that fit particular cameras. But unlike film cartridges, storage cards are temporar and reusable.

Each digital camera model is designed to work with a specific kind of storage card. It's important to determine whether the camera accepts a Type I & II, Type III, or Compact Flash card, before you buy a specific card. To find out which type of card works with the camera, check the owner's manual. (Note that some older and/or less expensive digital cameras do not accept storage cards.)


2003-03-28: Two articles on the SanDisk ImageMate CF USB storage card reader: Using a Compact Flash Card Reader in Linux and Mounting a USB flash card reader in NetBSD.

2003-03-27: Split this page into three sections: USB Mass Storage Card Readers, IDE Storage Cards and RFC on Digital Film Mount Point.

USB Mass Storage Card readers

  1. Make sure VFAT file system support, USB support, generic SCSI (sg.o) and SCSI disk (sd_mod.o and scsi_mod.o) support is available in your running kernel or loadable through the following modules:
    1. VFAT file system drivers:
      # modprobe vfat
    2. SCSI generic and disk drivers:
      # modprobe sg sd_mod scsi_mod
    3. USB Mass Storage Driver:
      # modprobe usb-storage
    4. To make the usb-storage module load permantly, add this in /etc/modules.conf:
      alias scsi_hostadapter usb-storage
  2. Create a mountpoint:
    # mkdir /mnt/film
  3. Attach the card reader and read the device name (usually /dev/sda1) from dmesg and mount it:
    # mount -t vfat /dev/sda1 /mnt/film
  4. If it does not work, you may already have a SCSI disk installed and assigned to /dev/sda1, so try /dev/sda2, /dev/sdb1, etc.
  5. Access the mountpoint /mnt/film from the shell or an application of your choice.

See Using a USB Compact Flash Reader in Linux by Greg Baker for more complete instructions.

Supported USB Storage Card Readers

SanDisk ImageMate Compact Flash USB (Mullikin)

Visit the at Linux USB Device Overview database for a list of (un)supported USB mass-storage readers.

Visit Using Digital Still Photography Devices with GNU/Linux for details on how to configure USB Mass Storage based digital still photo devices.

IDE Storage Cards

To date, at least three types of PC Cards have been defined by the PCMCIA (Personal Computer Memory Card International Association): Type I & II, Type III, and Compact Flash.

Type I & II, and Type III cards all look like credit cards from the top, with the same length and width, but with different thickness. All have a 3.3-mm thick guide rail around their edges and connector ends, but Type II and III cards are 5 mm and 10.5 mm thick, respectively. In a computer, the guide rails allow the thinner cards to be installed in thicker slots. For example, you can fit two Type I & II cards into a standard PCMCIA slot on a laptop (one card on top of the other); but the same slot will hold only one Type III card.

Type III cards tend to be more fragile than other removable media, because of the rotating heads of their built-in disk drives. However, they can store more data than Type I & II, or Compact Flash cards, which all use solid-state memory. Compact Flash cards are much smaller than the others, and even more durable. That's why they are becoming the standard for many newer digital cameras. You can also use a Compact Flash card on a camera with a Type I & II slot, by first placing the Compact Flash card into an adapter.

The CompactFlash standard for IDE storage cards is maintained and promoted by the Compact Flash Association. According to the web site ( there are more than 225 digital still camera models shipping with CF compatible slots (of Type I or Type II).

Some operating systems and cameras require appropriate drivers to be able to read the cards. GNU/Linux systems, however, should not require any special drivers to read standard PCMCIA cards.

First of all, the mount point /mnt/film/ should be available either as a directory or symbolic link, owned by 'root' and a 'film' group.

The mount point should be available to the desktop user that owns /dev/console or just readable to all users on the system.

On GNU systems using the Linux kernel, the syntax in /etc/pcmcia/ide.opts is something like

case "$ADDRESS" in
    INFO="Compact Flash IDE setup"
    DO_FSTAB="y" ; DO_FSCK="n" ; DO_MOUNT="y"
    # Card eject policy options

Supported IDE Storage Cards

According to

Most cards should work fine, including adapters for external IDE devices. Both Flash-ATA cards and rotating-media cards are supported, including "Smartmedia" flash and Compact flash cards.

The very old Western Digital 40MB drives are not supported, because they do not conform to the PCMCIA ATA specification.

RFC on Digital Film Mount Point

In June 2002 I encouraged vendors (on the Free Desktop mailing list) to support auto-mounting of Storage Cards (also called PC Cards) (or more specifically PCMCIA and USB adaptors holding CF cards) and USB mass storage devices that contain digital photography files at /mnt/film/ - the most obvious mount point. This is a simple, unique solution that easily could be implemented coherently by the distributors of free desktop systems, so the desktop application that I'm working on now could access these cards just out of the box.

Mounting Compact Flash USB Card adaptors and USB mass storage devices should be implemented with USB hotplug on Linux-based systems. The following could be in /etc/fstab

/dev/film /mnt/film auto noauto,users,kudzu,rw 0 0

where /dev/film is a symbolic link to the right device (usually /dev/hdc for Compact Flash card readers and /dev/sda1 for USB CF readers and Mass storage devices) set at the point that a user is prompted upon the configuration of "Digital Film".

I want to see a standard way to be implemented everywhere, so application developers don't have to deal with the mess.


Randall J. Parr on valhalla-list
Ken Neighbors on debian-user
Uncle Fruities Blob: RedHat 8.0
Justin Ribeiro


DCF - Design rule for Camera File System
PCMCIA HOWTO -- ATA/IDE fixed-disk device parameters
Mass Storage Devices
Linux 2.4 and USB -- Until Linux USB drivers ship with desktop products, Linux will not rule the desktop
Zaurus: Compact Flash On the Desktop
Linux, Compact Flash Readers, and the HP PhotoSmart 215
SIIG Compact Flash USB Card Reader US2256
External Card Reader for Linux
Using the ImageMate with Linux
Mounting a USB flash card reader

Please notify me, if you are aware of specific storage types or articles.


I'd like to thank Simon N Goodwin <>, rupe (from The Yak's Frequently Questioned Answers (mod.2002-02-26)), David M. Burley <> for input, and Richard M. Stallman <> for his idea of creating this page.

Valid XHTML 1.0 Strict

Last modified: Thu Jan 12 11:24:41 CET 2012
Ole Aamot <ole AT aamot DOT org>