Author Topic: Mounting Cf Storage Card  (Read 2973 times)

malcolmxavier

  • Newbie
  • *
  • Posts: 25
    • View Profile
Mounting Cf Storage Card
« on: June 14, 2005, 11:33:32 am »
I have a SimpleTech 256M storage card (which I used to install OZ and Opie) and now I can't seem to mount it.  If I put it in the Zaurus sees it as aATA/IDE Fixed Disk.

If I do a mount it doesn't show up, so I tried to self mount it using:
mount /dev/hda1 /medai/cf

With the following error:
mount: Mounting /dev/hda1 on /media/cf failed: Invalid argument

If I look at the /etc/fstab I see:
/dev/hda1       /media/cf       auto    defaults,sync,noauto,noatime,user,exec,suid,gid=100,umask=0002  0  0

I tried it using the -t fat option with teh same results.  

What am I doing wrong?  It's a FAT16 formatted card (I tried reformatting it as FAT32 with the same results)

-John
-John
-----------------------------------
Zaurus SL5500
1 Gig Lexar SD card
Ambicom WiFi WL1100C-CF
OpenZaurus 3.5.3 with Opie 1.2.0

malcolmxavier

  • Newbie
  • *
  • Posts: 25
    • View Profile
Mounting Cf Storage Card
« Reply #1 on: June 16, 2005, 08:34:23 am »
Quote
What am I doing wrong?  It's a FAT16 formatted card (I tried reformatting it as FAT32 with the same results)

[div align=\"right\"][a href=\"index.php?act=findpost&pid=84224\"][{POST_SNAPBACK}][/a][/div]


I figured it out (sort of).

If I hand mount it using
mount -t vfat /dev/hda /mnt/cf
it seems to work. I can't seem to get it to work by editing anything in ftab and auto mounting when I insert the card.  This is good enough for now, but if anyone has any suggestions on getting it to automount, I am hear to listen.


Thanks in advance!
-John
« Last Edit: June 16, 2005, 10:49:02 am by malcolmxavier »
-John
-----------------------------------
Zaurus SL5500
1 Gig Lexar SD card
Ambicom WiFi WL1100C-CF
OpenZaurus 3.5.3 with Opie 1.2.0

davr

  • Newbie
  • *
  • Posts: 1
    • View Profile
Mounting Cf Storage Card
« Reply #2 on: June 24, 2005, 02:22:35 pm »
Quote
Quote
What am I doing wrong?  It's a FAT16 formatted card (I tried reformatting it as FAT32 with the same results)

[div align=\"right\"][a href=\"index.php?act=findpost&pid=84224\"][{POST_SNAPBACK}][/a][/div]


I figured it out (sort of).

If I hand mount it using
mount -t vfat /dev/hda /mnt/cf
it seems to work. I can't seem to get it to work by editing anything in ftab and auto mounting when I insert the card.  This is good enough for now, but if anyone has any suggestions on getting it to automount, I am hear to listen.


Thanks in advance!
-John
[div align=\"right\"][a href=\"index.php?act=findpost&pid=84514\"][{POST_SNAPBACK}][/a][/div]

i have the same exact problem
i have oz 3.5.3 on a sl5500 and using a 1gb kingston card
only difference is i formatted as ext2

but it doesnt automount, and if i just try
mount /media/cf
i get the same Invalid Argument error.
i can do
mount /dev/hda1 /media/cf
and it works, but its a bit of a pain, because it gets unmounted on every suspend (dont get me started on the suspend/hang bug)

markj541

  • Newbie
  • *
  • Posts: 5
    • View Profile
Mounting Cf Storage Card
« Reply #3 on: August 28, 2005, 02:55:58 pm »
Quote
Quote
Quote
What am I doing wrong?  It's a FAT16 formatted card (I tried reformatting it as FAT32 with the same results)

[div align=\"right\"][a href=\"index.php?act=findpost&pid=84224\"][{POST_SNAPBACK}][/a][/div]

I figured it out (sort of).

If I hand mount it using
mount -t vfat /dev/hda /mnt/cf
it seems to work. I can't seem to get it to work by editing anything in ftab and auto mounting when I insert the card.  This is good enough for now, but if anyone has any suggestions on getting it to automount, I am hear to listen.

Thanks in advance!
-John
[div align=\"right\"][a href=\"index.php?act=findpost&pid=84514\"][{POST_SNAPBACK}][/a][/div]

i have the same exact problem
i have oz 3.5.3 on a sl5500 and using a 1gb kingston card
only difference is i formatted as ext2

but it doesnt automount, and if i just try
mount /media/cf
i get the same Invalid Argument error.
i can do
mount /dev/hda1 /media/cf
and it works, but its a bit of a pain, because it gets unmounted on every suspend (dont get me started on the suspend/hang bug)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=85679\"][{POST_SNAPBACK}][/a][/div]

I think the answer is in the file "/etc/pcmcia/ide_automount". If you have a version of "tail" (located in /usr/bin) instead of using the one built-in busybox, then I may have the answer. I found that the version in busybox supports the syntax "tail -2", where it means output the last 2 lines. A different version of tail (which I think is part of coreutils), only supports a syntax such as "tail -n 2". In the ide_automount file, there is a line where it is trying to get the partition from dmesg. The line looks like this:
 PARTS="`dmesg | tail -2 | grep $DEVICE | grep -v ide-cs | tail -1 | sed s/^.*\:\ //`"
I made a backup of this file, then changed it to look like this:
 PARTS="`dmesg | tail -n 2 | grep $DEVICE | grep -v ide-cs | tail -n 1 | sed s/^.*\:\ //`"
Once I did, the CF card would automount correctly. When it works correctly, the command will set the variable PARTS with the partition value for the CF card, such as "hda1".

I'm not sure which package installs the "/etc/pcmcia/ide_automount" file, but it should probably use the "tail -n 2" type format, since that seems to work for all versions of tail.

Let me know if that solves your problem.
Mark