How to read PCMCIA CompactFlash card? - Portable

This is a discussion on How to read PCMCIA CompactFlash card? - Portable ; Hello, I have 2.6.11-kanotix-7 which is a Debian derivative usually running KDE. I just bought a PCMCIA Compact Flash adapter for the first time. Does anyone know how to read the card under Linux? Are there any existing tools I ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: How to read PCMCIA CompactFlash card?

  1. How to read PCMCIA CompactFlash card?

    Hello,

    I have 2.6.11-kanotix-7 which is a Debian derivative usually running KDE. I
    just bought a PCMCIA Compact Flash adapter for the first time.

    Does anyone know how to read the card under Linux? Are there any existing
    tools I should look at?

    It appears I have a couple of PCMCIA tools on the system already, such as
    pcmcia-cs (version 3.2.5-11).

    And if I run the following commmand without the card in the slot: ..

    cat /var/run/stab

    ... I get the following output:

    Socket 0: empty
    Socket 1: empty

    While if I run the same command with the card inserted I get the output: ..

    Socket 0: empty
    Socket 1: ATA/IDE Fixed Disk
    1 ide ide-cs 0 hde 33 0

    .... so something is working and the system is recognising its existance.

    Only how and where can I access the contents of the Flash card? Any clues?

    Many thanks for the advise.

  2. Re: How to read PCMCIA CompactFlash card?

    On Fri, 11 Nov 2005 15:02:36 +0000, Tuxedo staggered into the Black Sun
    and said:
    > I have 2.6.11-kanotix-7 which is a Debian derivative. I just bought a
    > PCMCIA Compact Flash adapter for the first time
    > cat /var/run/stab
    > with the card inserted I get
    > Socket 1: ATA/IDE Fixed Disk
    >
    > Only how and where can I access the contents of the Flash card?


    Plug PCMCIA storage device in. You should hear 2 high beeps, which
    means the PCMCIA subsystem has recognized the card and modprobed an
    appropriate module for it. If you hear a high beep and a low beep,
    something has gone wrong, and you need to look through the logfiles to
    find out what.

    PCMCIA storage devices like the one you have are always recognized as
    IDE devices. It should show up as /dev/hde , and most CF cards are
    partitioned, so you should try "mount /dev/hde1 /mnt/somewhere" first.
    HTH,

    --
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
    Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
    http://www.brainbench.com / "He is a rhythmic movement of the
    -----------------------------/ penguins, is Tux." --MegaHAL

  3. Re: How to read PCMCIA CompactFlash card?

    Tuxedo wrote:

    > Hello,
    >
    > I have 2.6.11-kanotix-7 which is a Debian derivative usually running KDE.
    > I just bought a PCMCIA Compact Flash adapter for the first time.
    >
    > Does anyone know how to read the card under Linux? Are there any existing
    > tools I should look at?
    >
    > It appears I have a couple of PCMCIA tools on the system already, such as
    > pcmcia-cs (version 3.2.5-11).
    >
    > And if I run the following commmand without the card in the slot: ..
    >
    > cat /var/run/stab
    >
    > .. I get the following output:
    >
    > Socket 0: empty
    > Socket 1: empty
    >
    > While if I run the same command with the card inserted I get the output:
    > ..
    >
    > Socket 0: empty
    > Socket 1: ATA/IDE Fixed Disk
    > 1 ide ide-cs 0 hde 33 0
    >
    > ... so something is working and the system is recognising its existance.
    >
    > Only how and where can I access the contents of the Flash card? Any clues?


    After the card is inserted you will have a new hard drive device (hint: hde)

    Then mount it in the usual way, for example;
    mount -t vfat /dev/hde1 /mnt/this/device/here


    --
    "They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety." -- B. Franklin, 1759

  4. Re: How to read PCMCIA CompactFlash card?

    > Plug PCMCIA storage device in. You should hear 2 high beeps, which

    I get no beeps on my system.

    > partitioned, so you should try "mount /dev/hde1 /mnt/somewhere" first.


    Sorry but I'm a bit of a beginner here, in trying to create the "somewhere"
    location by "mount /dev/hde1 /mnt/somewhere" I get the following error:

    mount point /mnt/somewhere does not exist

    Any ideas?

  5. Re: How to read PCMCIA CompactFlash card?

    On Fri, 11 Nov 2005 15:53:29 +0000, Tuxedo staggered into the Black Sun
    and said:
    >> Plug PCMCIA storage device in. You should hear 2 high beeps, which

    > I get no beeps on my system.


    Hm. Either you've got the PC Speaker muted, or you've set up the
    pcmcia-cs stuff so that it doesn't beep. Oh well, if it shows up in the
    stab output, it's been recognized.

    >> partitioned, so you should try "mount /dev/hde1 /mnt/somewhere" first.

    > Sorry but I'm a bit of a beginner here, in trying to create the
    > "somewhere" location by "mount /dev/hde1 /mnt/somewhere" I get
    > mount point /mnt/somewhere does not exist


    Then you need to "mkdir /mnt/somewhere" first. Typically, you create
    directories under /mnt for things you want to mount, like /mnt/cdrom ,
    /mnt/dvd , /mnt/pcmcia , etcetera. Then once you've made a mountpoint
    and mounted something manually, you add a line like so to your
    /etc/fstab :

    /dev/hde1 /mnt/pcmcia vfat noauto,user,umask=000 0 0

    ....which will allow any user to mount device /dev/hde1 on /mnt/pcmcia ,
    and allows any user full access to all the files/dirs on that device.
    HTH,

    --
    Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
    Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
    http://www.brainbench.com / "He is a rhythmic movement of the
    -----------------------------/ penguins, is Tux." --MegaHAL

  6. Re: How to read PCMCIA CompactFlash card?

    > pcmcia-cs stuff so that it doesn't beep. Oh well, if it shows up in the

    That must be the right diagnosis to my particular configuration.

    >>> partitioned, so you should try "mount /dev/hde1 /mnt/somewhere" first.


    Yes "somewhere" is now mounted and I can access my photos on the FlashCard
    without a problem, and just as easily umount the card after.

    > Then you need to "mkdir /mnt/somewhere" first. Typically, you create
    > directories under /mnt for things you want to mount, like /mnt/cdrom ,
    > /mnt/dvd , /mnt/pcmcia , etcetera. Then once you've made a mountpoint
    > and mounted something manually, you add a line like so to your
    > /etc/fstab :
    >
    > /dev/hde1 /mnt/pcmcia vfat noauto,user,umask=000 0 0
    >
    > ...which will allow any user to mount device /dev/hde1 on /mnt/pcmcia ,
    > and allows any user full access to all the files/dirs on that device.
    > HTH,


    Thanks for the advise. I will set something like that up. All is working
    thanks to the fanatical 24x7 support of this Linux group!

  7. Re: How to read PCMCIA CompactFlash card?

    Tuxedo wrote:
    >>pcmcia-cs stuff so that it doesn't beep. Oh well, if it shows up in the

    >
    >
    > That must be the right diagnosis to my particular configuration.
    >
    >
    >>>>partitioned, so you should try "mount /dev/hde1 /mnt/somewhere" first.

    >
    >
    > Yes "somewhere" is now mounted and I can access my photos on the FlashCard
    > without a problem, and just as easily umount the card after.
    >
    >
    >>Then you need to "mkdir /mnt/somewhere" first. Typically, you create
    >>directories under /mnt for things you want to mount, like /mnt/cdrom ,
    >>/mnt/dvd , /mnt/pcmcia , etcetera. Then once you've made a mountpoint
    >>and mounted something manually, you add a line like so to your
    >>/etc/fstab :
    >>
    >>/dev/hde1 /mnt/pcmcia vfat noauto,user,umask=000 0 0
    >>
    >>...which will allow any user to mount device /dev/hde1 on /mnt/pcmcia ,
    >>and allows any user full access to all the files/dirs on that device.
    >>HTH,

    >
    >
    > Thanks for the advise. I will set something like that up. All is working
    > thanks to the fanatical 24x7 support of this Linux group!


    Also make sure you run the command:

    umount /mnt/pcmcia

    before you unplug the card when you are done. This ensures all pending
    file writing is done before it's unplugged.

    mark

  8. Re: How to read PCMCIA CompactFlash card?

    > umount /mnt/pcmcia

    Thanks again for all the tips. I have another, perhaps a bit off-topic
    question for this group, but anyway:

    I added the line in /etc/fstab:

    /dev/hde1 /mnt/pcmcia vfat noauto,user,umask=000 0 0

    And a two-liner script named "/usr/local/bin/flashcard" (which is now a KDE
    button) so I can easily run:

    #!/bin/sh

    mount /mnt/pcmcia
    konqueror /mnt/pcmcia

    ---

    The above of course mounts the card and opens it in Konqueror.

    I then have a one-line script named "/usr/local/bin/noflashcard":

    #!/bin/sh

    umount /mnt/pcmcia

    ---

    But the umount will naturally return "/mnt/pcmcia: device is busy" in case
    Konqueror is still open.

    Does anyone know how to first close Konqueror, being the session that was
    previously opened with "flashcard", and therafter unmount?

    I'm not sure how to assign a job (pid?) in the first script and then kill it
    in the second? Or how the best way around this procedure could be?




  9. Re: How to read PCMCIA CompactFlash card?

    Tuxedo wrote:

    > And a two-liner script named "/usr/local/bin/flashcard" (which is now a
    > KDE button) so I can easily run:


    No need for scripts, create a new device on the KDE desktop. Start by
    right-clicking on an empty spot on the screen, then for example;

    Create New-->Link to Device-->Hard Disk Device (or any other disk device)


    --
    "They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety." -- B. Franklin, 1759

  10. Re: How to read PCMCIA CompactFlash card?

    > Create New-->Link to Device-->Hard Disk Device (or any other disk device)

    I tried and it works as far as mounting it. I did Create New -->Link to
    Device-->Hard Disc Device etc. But it does not open or browse the card with
    Konqueror or any other filebrowser.


  11. Re: How to read PCMCIA CompactFlash card?

    Tuxedo writes:

    > > partitioned, so you should try "mount /dev/hde1 /mnt/somewhere" first.

    >
    > Sorry but I'm a bit of a beginner here, in trying to create the "somewhere"
    > location by "mount /dev/hde1 /mnt/somewhere" I get the following error:
    >
    > mount point /mnt/somewhere does not exist
    >
    > Any ideas?


    I know someone already answered this question, but I think just that you
    asked it shows you're running the wrong Debian derivative. I suggest
    Ubuntu Linux. It installs ready to automatically mount media as you
    connect it, and is generally very nice to beginners.

    I have been using Debian for some time, but just installed Ubuntu on my
    new T43. I couldn't be happier with it.

    http://www.ubuntulinux.org/

+ Reply to Thread