file: linux_cardread-fc2.html
28 Sep 2004

Linux FLASH Card Reading Instructions for Fedora Core 2


Setup:

Note 1: You should NOT need to be root to do read FLASH cards! It's safer to work as a regular user!

Note 2: To avoid any confusion among cards, only install the PCMCIA FLASH card. Leave the other PCMCIA slot empty.


Procedure:

Do these steps (as root) the first time just to confirm all is working:

  1. Put the PCMCIA card into the top slot and boot to Linux.

    Or

  2. If Linux is already running, put the PCMCIA card into the slot now.

  3. Login as root and do a:

  4. If none of these commands shows you info about the FLASH card and slot:

    1. Did you plug the card in???

    2. Did you set up Fedora Core 2 for reading PCMCIA memory cards per Setting up Fedora Core 2 for PCMCIA memory card reading ?

    3. If you did, and it's not recognized, try rebooting and go through it all one more time.

    4. And if that doesn't work, but other PCMCIA cards (modem, ethernet, SCSI or whatever) do work (you DID try this, right?)

      - I'm stuck......

      Oh, well.....


All the useful incantations:

Primary assumption: the card is recognized and something appears in /var/lib/pcmcia/stab, such as:

        Socket 0: 3Com 3c589D Ethernet
        0	network	3c589_cs	0	eth0
        Socket 1: Intel Series 2+ 20MB Flash
        1	memory	pcmciamtd	0	mtd0
or:
        Socket 0: 3Com 3c589D Ethernet
        0	network	3c589_cs	0	eth0
        Socket 1: Memory Card
        1	memory	pcmciamtd	0	mtd0

To read a PCMCIA memory card
To remove a PCMCIA memory card
To see if the card is recognized in the slot:
To see if the cardmgr recognizes the card:
To copy the entire card to a file:

NOTE: This is the preferred way to read a FLASH card to a file!

To copy part of the card to a file, where blocksize=1024 bytes and count=number of blocks to copy (in this example, to copy 2 MB of a 20 MB card) and skip bypasses the first 128K reserved space in the FLASH card:
To view the binary as hex:
For more command info, see the man pages for: