file: linux_cardread-789.html
16 Jul 2003

Linux FLASH Card Reading Instructions for RedHat 9


Setup:

Note 1: You should NOT need to be root to do this stuff! 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:

Either do these steps the first time:

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

  2. Hopefully you heard a couple of "happy" (higher pitch) beeps as the PCMCIA cardmgr messages went by on the screen.

  3. Login and do a: to see which slot the card is in; on my Dell, the top slot is 1, so I'll use 1 in the rest of this write-up;

Or

  1. If Linux is already running, put the PCMCIA card into the slot (use this same slot consistently) and listen for a couple of beeps. If you just get an error message and no beeps, try:

  2. If still nothing:

    1. Did you plug the card in???

    2. Did you set up RedHat 9 for reading PCMCIA memory cards per Setting up RedHat 9 for PCMCIA memory card reading ?

    3. If you did, and it's not recognized, try rebooting as above

    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	memory_cs	0	mem0	126	0
        1	ftl	ftl_cs	0	ftl0c0	127	0
or:
        Socket 0: 3Com 3c589D Ethernet
        0	network	3c589_cs	0	eth0
        Socket 1: Memory Card
        1	memory	memory_cs	0	mem0	126	0

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:
geek note:

For completeness, here's how to get at the CIS in attribute memory (I'll assume a 4k CIS - probably way too big):