Author Topic: Formatting a 1GB SD card  (Read 4119 times)

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« on: July 29, 2004, 03:06:23 am »
I've just had a 1GB ATP SD card, which I reformatted to ext2, but I quickly had I/O errors. I'd like to reformat it to vfat to test it, but I get the following error:

Code: [Select]
# mkfs.vfat /dev/mmcda1
mkfs.vfat 2.8 (28 Feb 2001)
mkfs.vfat: Attempting to create a too large file system

I can't use the -F 32 option either (error mkfs.vfat: unable to allocate space for FAT image in memory).

Any idea?
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #1 on: July 29, 2004, 02:46:48 pm »
After running fsck.ext2 (well, I don't know if this is the cause), I managed to reformat the partition to vfat. But anyway, I also got I/O errors.

I did some tests in the train: I noticed that I could create files and read them, but a "ls" showed nothing... until I unmounted and remounted the SD card. The card was sometimes automatically remounted as read-only (ro). With fsck.vfat (IIRC), I also had an error concerning the partitions.

Now I'm back home, and I no longer noticed the above problems, but during a recursive (remote) copy to the SD card, it was remounted as read-only.
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

stupkid

  • Hero Member
  • *****
  • Posts: 578
    • View Profile
    • http://
Formatting a 1GB SD card
« Reply #2 on: July 29, 2004, 05:59:03 pm »
If you repartion the card remove it from your Z after you write the partition.  Then reinsert the card and run your mkfs.  When the partition of a device changes you usually have to reload the module for the device to recognize the changes.  I've run into the same problems by not reloading the driver.

Hope this helps.

Zaurus SL-C3200 pdaXii13v2 5.5 / Ambicom WC1100C-CF / Socket Bluetooth Rev G


OpenMoko FreeRunner - Running Tweaked OM2008.x Image

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #3 on: July 29, 2004, 07:55:47 pm »
Quote
When the partition of a device changes you usually have to reload the module for the device to recognize the changes.
Does this mean that I need to reboot?

Also note that I've just tried the card (vfat formatted) on my PowerBook via a PCMCIA-SD adapter, and I have no problem with it. So, it seems that the partitioning is correct after all and there are some compatibility problems with the Zaurus.
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #4 on: July 30, 2004, 06:33:47 am »
Quote
Also note that I've just tried the card (vfat formatted) on my PowerBook via a PCMCIA-SD adapter, and I have no problem with it.
Well, in fact, I had lots of errors reported in my kern.log file (on the PowerBook):

Code: [Select]
[...]
Jul 30 01:30:57 ay kernel: hde: read_intr: status=0x51 { DriveReady SeekComplete Error }
Jul 30 01:30:57 ay kernel: hde: read_intr: error=0x10 { SectorIdNotFound }, LBAsect=1998847, sector=1998847
Jul 30 01:30:57 ay kernel: hde: read_intr: status=0x51 { DriveReady SeekComplete Error }
Jul 30 01:30:57 ay kernel: hde: read_intr: error=0x10 { SectorIdNotFound }, LBAsect=1998847, sector=1998847
Jul 30 01:30:57 ay kernel: ide2: reset: success
Jul 30 01:30:57 ay kernel: hde: read_intr: status=0x51 { DriveReady SeekComplete Error }
Jul 30 01:30:57 ay kernel: hde: read_intr: error=0x10 { SectorIdNotFound }, LBAsect=1998847, sector=1998847
Jul 30 01:30:57 ay kernel: end_request: I/O error, dev hde, sector 1998847
Jul 30 01:30:57 ay kernel: Buffer I/O error on device hde1, logical block 1998600
Jul 30 01:30:57 ay kernel: hde: read_intr: status=0x51 { DriveReady SeekComplete Error }
Jul 30 01:30:57 ay kernel: hde: read_intr: error=0x10 { SectorIdNotFound }, LBAsect=1998839, sector=1998839
[...]

with several reset per second... Could this be the same errors as in my Zaurus, except that the Zaurus linux kernel doesn't try to go round them?
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

stupkid

  • Hero Member
  • *****
  • Posts: 578
    • View Profile
    • http://
Formatting a 1GB SD card
« Reply #5 on: July 30, 2004, 02:37:24 pm »
Try doing this:

  1.  Run fdisk and delete and recreate the partiions specifying the correct partition type (4=FAT16, 83=ext2).  Save the partitions to the device, eject  the card via the applet, and then reinsert the device.

  2.  Run mkfs to create your file system on the card.

The key point is to remove the device after you make partition changes.  On some devices I have had to remove all partitions, remove / reload the card, partition the drive, remove / reload the card,  and run mkfs.

Hope this helps!

Zaurus SL-C3200 pdaXii13v2 5.5 / Ambicom WC1100C-CF / Socket Bluetooth Rev G


OpenMoko FreeRunner - Running Tweaked OM2008.x Image

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #6 on: July 30, 2004, 04:39:54 pm »
I partitionned the card with fdisk on my PowerBook and can use it from my PowerBook (I no longer get the errors in the log file). But I can no longer mount it on my Zaurus. I tried both /dev/mmcda2 (as mmcda1 is the partition map) /dev/mmcda1 (in case the Zaurus does a translation), but I get:

mount: Mounting /dev/mmcda2 on /mnt/card failed: Invalid argument

This may be because the Debian/ppc fdisk created an Apple partition map (strange...). Where can I get fdisk for the Zaurus to try that instead? The link on http://www.killefiz.de/zaurus/showdetail.php?app=205 is no longer valid.
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

Xumbi

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Formatting a 1GB SD card
« Reply #7 on: July 30, 2004, 05:00:12 pm »

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #8 on: July 30, 2004, 05:23:03 pm »
In fact, I did the wget on the wrong machine (I forgot that my Zaurus was connected via USB instead of my LAN card).

I did what stupkid said, but I get the same Input/output errors as before.
But the card is still mounted as rw (whereas before, it was remounted as ro).

Code: [Select]
zaurus:~> dmesg|tail -40
[SD]-W 7e00 1000 ERROR!
EXT2-fs error (device mmcd(60,1)): ext2_write_inode: unable to read inode block
- inode=93697, block=196612
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-R 3000be00 1000 ERROR!
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-W 7e00 1000 ERROR!
EXT2-fs error (device mmcd(60,1)): ext2_write_inode: unable to read inode block
- inode=93697, block=196612
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-R 3000be00 1000 ERROR!
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-W 7e00 1000 ERROR!
EXT2-fs error (device mmcd(60,1)): ext2_write_inode: unable to read inode block
- inode=93697, block=196612
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-R 1f3e00 1000 ERROR!
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-R 1f3e00 1000 ERROR!
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-R 1f3e00 1000 ERROR!
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-R 1f3e00 1000 ERROR!
pxa_sd_wait_response: responce time out (cmd=07 MMC_STAT=0x2142)
sd_write_multiple(242536) : select error
sd flush : ERROR adr = 289099264 (0x113b4e00) , len = 12288 (0x3000)
[SD]-R 1f3e00 1000 ERROR!
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #9 on: July 30, 2004, 05:41:53 pm »
I've done the same things except that I've chosen the vfat file system instead of ext2, and I get very similar errors, and /dev/mmcda1 is remounted as ro.
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

stupkid

  • Hero Member
  • *****
  • Posts: 578
    • View Profile
    • http://
Formatting a 1GB SD card
« Reply #10 on: July 30, 2004, 05:59:50 pm »
Do you have a known good card to test against?  It looks like you may have a hardware problem.

Zaurus SL-C3200 pdaXii13v2 5.5 / Ambicom WC1100C-CF / Socket Bluetooth Rev G


OpenMoko FreeRunner - Running Tweaked OM2008.x Image

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #11 on: July 31, 2004, 07:01:00 am »
I've just purchased a 1GB Sandisk SD card (much more expensive, though), and I don't have any problem with it: large scp (ogg files) to the card work OK (with the LAN card only, as with USB, the network randomly freezes after a few copies -- but I don't think this is related to the SD card). However, I haven't tried ext2, since I think I'll stick to vfat.

So, it really seems that the ATP SD card isn't compatible with the Zaurus.
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.

TheHeretic

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • http://www.fd19.net
Formatting a 1GB SD card
« Reply #12 on: July 31, 2004, 07:25:11 am »
Just been reading through this thread, I've had very similar experiences with some MMC/SD cards, I got some cheap off ebay but as soon as I formatted them with a different FS, all manner of I/O problems arose, even when reformatting as FAT. I can't remember the brands though but PQI or PNY do sound familiar.  Anyway we have a camera shop chain here in the UK called Jessops, I've found their branded cards (I only buy MMC now) work very well, especially as I use the MMC for ext2 and my $HOME directory.  I thought Sandisk was bad though, I'm sure I read something here about it. You can get away with using cheap brands, as long as you find the right one.

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Formatting a 1GB SD card
« Reply #13 on: July 31, 2004, 07:33:54 am »
Have you noticed any significant performance increase when using ext2 instead of VFAT ?

I know that you get the option of installing to SD card if it's  ext2 but I don't really intend to do this. I just want to have the ability to bulk transfer large quantities of data.

Currently I'm not using my cards for anything majorly serious - Wiki and ScummVM - but I would be interested if bulk reads of large files (like video on ScummVM) improve with ext2.

Regards,

Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

vinc17

  • Newbie
  • *
  • Posts: 38
    • View Profile
    • http://www.vinc17.org/
Formatting a 1GB SD card
« Reply #14 on: July 31, 2004, 10:37:38 am »
Quote
[...] as soon as I formatted them with a different FS, all manner of I/O problems arose, even when reformatting as FAT.
Does this mean that once the file system gets badly corrupted and fsck can't fix it, you can no longer use the card?
SL-C860 with Sharp ROM 1.40 JP, WLI2-CF-S11 wireless LAN, CF-10T LAN, 1GB Sandisk SD, 128MB PQI CF.