[olpc-help] I/O error when writing with built-in SD slot, but not with USB SD adapter

Denver Gingerich denver at ossguy.com
Mon Jan 21 12:02:07 EST 2008


I have installed Ubuntu on an 8GB SDHC card (see
http://www.freelikegnu.org/?p=21).  When I put the SDHC card into the
XO's built-in SD slot, boot it, and use it for an hour, I get about 5
error messages over the course of the hour of the following formats in
the dmesg output:

mmcblk0: error 1 transferring data
end_request: I/O error, dev mmcblk0, sector 3407947

These can result from a variety of operations, with the commonality
being that they all appear to be writing to the disk.  For example:

$ sudo mount -tjffs2 -oro mtd0 /mnt/nand
can't create lock file /etc/mtab~1909: Input/output error (use -n flag
to override)

When I plug the SDHC card into a USB reader, connect that to the XO
and boot from there, it works fine (several hours of use does not
produce any I/O error messages in the dmesg output).

To confirm the problem, I tried the following with the terminal
activity while booted to the regular build 650 in flash (with the 8GB
SD card in the XO's SD slot):

dd if=/dev/zero of=/dev/mmcblk0p1

This produced several errors of the above form ("mmcblk0: error...")
as well as some of the following form (in the dmesg output):

Buffer I/O error on device mmcblk0p1, logical block 99541
lost page write due to I/O error on mmcblk0p1

In all, I found about 100 lines of these errors in dmesg after
performing the dd command above.

When I try the same thing with the USB SD adapter I have (replacing
mmcblk0p1 with sdb1 in the above dd command), I received no such
errors in the dmesg output and dd runs to completion.  So it seems
that writing to the SD card using the
built-in SD slot has problems, but using a USB SD adapter to write
does not have problems.

Reading the SD card using dd with the built-in SD slot or the USB SD
adapter ("dd if=/dev/<device> of=/dev/null") does not produce any
errors in the dmesg output.


To summarize, it appears that the built-in SD slot causes I/O errors
when writing to an SD card even if the SD card is fine (as verified
with the USB SD adapter).


My research on this has shown similar errors reported by other people,
but not necessarily in the same situations or with known-good SD
cards.  See the following URLs:

http://dev.laptop.org/ticket/1802
http://wiki.laptop.org/go/Talk:Secure_Digital_card

It may be important to note that I am using an ext2 partition on my SD
card.  One person has reported that using FAT is part of the SD
standard, which could cause problems, but I have been unable to verify
that.  This seems like a strange requirement, though.  See the
following URL for that comment:

http://lists.laptop.org/pipermail/devel/2006-December/003222.html


Has anyone had similar problems to this?  Is there a way to fix it or
is it most likely a defective SD slot in the XO?

Please CC me in your reply.  I am not on the mailing list.

Denver


More information about the community-support mailing list