Talk:Secure Digital card
Troubles with an SD card
I'm getting frustrated with my XO.. here is the error message:
(the sd card works in my laptop, and an sd card from another guy that worked in his xo didn't work in mine) I did dmsg | grep mmc > errorfile.txt and copied it over to the pc via usb stick
[ 4138.954421] PM: Adding info for mmc:mmc0:e624 [ 4138.956336] mmcblk0: mmc0:e624 SD128 123008KiB (ro) [ 4138.956509] mmcblk0:<3>mmcblk0: error 1 transferring data [ 4139.306260] end_request: I/O error, dev mmcblk0, sector 0 [ 4139.306291] Buffer I/O error on device mmcblk0, logical block 0 [ 4139.655996] mmcblk0: error 1 transferring data [ 4139.656028] end_request: I/O error, dev mmcblk0, sector 0 [ 4139.656054] Buffer I/O error on device mmcblk0, logical block 0 [ 4140.229291] mmcblk0: error 1 transferring data [ 4140.229326] end_request: I/O error, dev mmcblk0, sector 245888 [ 4140.229355] Buffer I/O error on device mmcblk0, logical block 30736 [ 4140.579771] mmcblk0: error 1 transferring data [ 4140.579806] end_request: I/O error, dev mmcblk0, sector 245888 [ 4140.579834] Buffer I/O error on device mmcblk0, logical block 30736 [ 4140.930396] mmcblk0: error 1 transferring data [ 4140.930429] end_request: I/O error, dev mmcblk0, sector 245888 [ 4140.930457] Buffer I/O error on device mmcblk0, logical block 30736 [ 4141.280933] mmcblk0: error 1 transferring data [ 4141.280966] end_request: I/O error, dev mmcblk0, sector 0 [ 4141.280992] Buffer I/O error on device mmcblk0, logical block 0 [ 4141.631323] mmcblk0: error 1 transferring data [ 4141.631355] end_request: I/O error, dev mmcblk0, sector 0 [ 4141.631381] Buffer I/O error on device mmcblk0, logical block 0 [ 4141.981813] mmcblk0: error 1 transferring data [ 4141.981844] end_request: I/O error, dev mmcblk0, sector 0 [ 4141.981869] Buffer I/O error on device mmcblk0, logical block 0 [ 4142.332291] mmcblk0: error 1 transferring data [ 4142.332326] end_request: I/O error, dev mmcblk0, sector 246008 [ 4142.332354] Buffer I/O error on device mmcblk0, logical block 30751 [ 4142.682949] mmcblk0: error 1 transferring data [ 4142.682984] end_request: I/O error, dev mmcblk0, sector 246008 [ 4142.683012] Buffer I/O error on device mmcblk0, logical block 30751 [ 4143.033572] mmcblk0: error 1 transferring data [ 4143.033604] end_request: I/O error, dev mmcblk0, sector 246008 [ 4143.383828] mmcblk0: error 1 transferring data [ 4143.383860] end_request: I/O error, dev mmcblk0, sector 246008 [ 4143.734087] mmcblk0: error 1 transferring data [ 4143.734120] end_request: I/O error, dev mmcblk0, sector 246008 [ 4144.084380] mmcblk0: error 1 transferring data [ 4144.084412] end_request: I/O error, dev mmcblk0, sector 246008 [ 4144.434655] mmcblk0: error 1 transferring data [ 4144.434689] end_request: I/O error, dev mmcblk0, sector 245952 [ 4144.434733] Buffer I/O error on device mmcblk0, logical block 30744 [ 4144.785359] mmcblk0: error 1 transferring data [ 4144.785395] end_request: I/O error, dev mmcblk0, sector 246000 [ 4145.135698] mmcblk0: error 1 transferring data [ 4145.135730] end_request: I/O error, dev mmcblk0, sector 246008 [ 4145.485982] mmcblk0: error 1 transferring data [ 4145.486014] end_request: I/O error, dev mmcblk0, sector 246008 [ 4145.836244] mmcblk0: error 1 transferring data [ 4145.836277] end_request: I/O error, dev mmcblk0, sector 0 [ 4146.186520] mmcblk0: error 1 transferring data [ 4146.186551] end_request: I/O error, dev mmcblk0, sector 0 [ 4146.536808] mmcblk0: error 1 transferring data [ 4146.536839] end_request: I/O error, dev mmcblk0, sector 0 [ 4146.887131] mmcblk0: error 1 transferring data [ 4146.887164] end_request: I/O error, dev mmcblk0, sector 0 [ 4147.237470] mmcblk0: error 1 transferring data [ 4147.237505] end_request: I/O error, dev mmcblk0, sector 0 [ 4147.599824] mmcblk0: error 1 transferring data [ 4147.599858] end_request: I/O error, dev mmcblk0, sector 0 [ 4147.950240] mmcblk0: error 1 transferring data [ 4147.950275] end_request: I/O error, dev mmcblk0, sector 0 [ 4148.300574] mmcblk0: error 1 transferring data [ 4148.300606] end_request: I/O error, dev mmcblk0, sector 0 [ 4148.653739] mmcblk0: error 1 transferring data [ 4148.653772] end_request: I/O error, dev mmcblk0, sector 0 [ 4149.004063] mmcblk0: error 1 transferring data [ 4149.004093] end_request: I/O error, dev mmcblk0, sector 0 [ 4149.354300] mmcblk0: error 1 transferring data [ 4149.354329] end_request: I/O error, dev mmcblk0, sector 0 [ 4149.354371] Buffer I/O error on device mmcblk0, logical block 0 [ 4149.704905] mmcblk0: error 1 transferring data [ 4149.704940] end_request: I/O error, dev mmcblk0, sector 0 [ 4150.055248] mmcblk0: error 1 transferring data [ 4150.055282] end_request: I/O error, dev mmcblk0, sector 0
PQI High capacity 8GB SD card did not work
This was a cheapo card by PQI. It's a long story, but after several days, the results are:
formatted as ext2 (because I was trying to use it for an alternate OS (debian), the XO would initially be able to read the directories, but then lose track and give various error messages. directories unreadable, unwritable, non-existent, card has bad blocks or bad superblock, and so on.
after much messing about, during which I got clever and tried to have 2 partitions, the card's partition table became corrupted, and I suddenly had a 5.6GB card! While trying to troubleshoot this, from what I saw on the web, I was lucky I didn't lose the whole thing. There is, apparently, absolutely no fix, although some manufacturers have ways of reformatting it for you. (Not PQI) Moral: do not mess about.
(Just to be clear, there was nothing initially wrong with the card, either when it had 2 4GB partitions, one ext2, one FAT32, or when it had a single, low-level reformatted 5.6GB partition. My Ubuntu system read and wrote to it repeatedly without problems.)
I hope this gets fixed in a future build. It would be wonderfully elegant to have one's alternate OS, plus any added programs, on a roomy high capacity card. Right now I've had to put everything on the poor XO, which has all of 100MB out of its one gigabyte left. :-(
- If the card has actually lost capacity, then the card is purely to blame. Perhaps it ran out of replacement sectors, then decided you'd prefer a 5.6GB card over an 8GB read-only card. Perhaps the card's built-in software has bugs, likely involving corruption of internal structure when power is unexpectedly lost. (sigh... the crummy manufacturers have created a head crash equivalent for flash media, showing clear disrespect for the integrity of our data)
Intermittent mount
I have inserted an SD card. Sometimes it shows up, sometimes it does not. This goes for both the journal and from the shell.
Also, I don't seem to be able to eject it. I've stopped short of prying it out with a screwdiver or tweezer.
Any tips?
Ericvh 19:07, 8 January 2008 (EST)
- If you need to get the card out, tweezers are probably the way to go. The slot has a flap that keeps out moisture and dust when there is no card present, but it makes it inserting and removing the card difficult; the slot seems to be intended more for a semi-permanent storage upgrade than for removable media. As for the intermittent behavior, perhaps the card is not firmly seated? —Joe 19:49, 8 January 2008 (EST)
Try Pushing it in and release - It has a click-in to load and click-in to eject spring loaded mechanism. Once it is clicked out, it will jut out enough for you to pull it out with just your fingers - UNLESS you are using a non-standard card which is thicker than the slot opening, in which case back to tweezers.
Ram, [Boston, MA] 10 January 2008 (EST)
Transfer Rate
I see that SD cards are being manufactured in different speeds -- 45x, 150x -- for high-pixel cameras and such. What is the maximum transfer rate the OLPC will benefit from? ThatTallGuy 18:41, 11 January 2008 (EST)
Can you boot from an SDHC card?
I've had no luck so far getting even a DIR from the debug console of sd:\ or disk:\
Anyone found a working solution? I'm currently using ext3 with a 4GB card and build 653
I assume you've tried rebooting, reading the card in another linux system, and so on. I've had problems with SD cards (although none with USB pendrives, such as you report). I also see scattered reports of others having SD problems.
I've been using a 2GB (not High Capacity) card to boot Xubuntu, following instructions here: [1]. Sometimes I have to boot a couple of times before the card is recognized. Sometimes I have to remove and reinsert. It's all quite spontaneous, unfortunately. When it checked the card after 27 boots, fsck found so many errors, it died. But the card booted normally on the next try, and my ubuntu laptop doesn't find anything wrong with the card.
Moral: there really do seem to be unresolved "issues" between the XO and SD cards, HC or otherwise. Ext2 / ext3 formatting makes matters worse, it seems. Hopefully, this will all be resolved Real Soon Now. (quixote [2] )
Formatting and using with ext2
Note: I moved this here from the main page because I am having problems with the partition table occasionally disappearing. I still think this is an interesting direction. If anyone cares to experiment and contribute do so. I will continue to try to debug this.
FAT 16 and 32 are very portable formats, and have advantages when used as an 'exchange' device. However, they have major issues when they are used as an extension to the Linux file system, because they do not support symbolic links. As a result many installs break when transferred to a FAT formatted SD card, because symbolic links are lost. On the XO, the SD card is recommended as a semi-permanent mount, as an extension of the file system. The card slot is not meant for exchange device use. Therefor, formatting a SD card with a fully Linux compatible file system has advantages.
The following are instructions on how to format a SD card with the Linux ext2 file system, so that it can be used as a full featured extension to the base flash file system.
Back up anything you don't want to lose from the card.
Change the partition, and format it
su umount /dev/mmcblk0p1 /sbin/ fdisk /dev/mmcblk0 (inside fdisk type the following commands) d (delete old partition) n (create new) p (primary) 1 (partition number) <return> (default first cylinder) <return> (default last cylinder) t (partition type) 83 (Linux) w (write and exit) /sbin/mkfs.ext2 -L YOURLABEL /dev/mmcblk0p1
Shutdown and restart your XO, to mount the changed partition
Transfer and link stuff from the XO flash to the card.
Here's a simple script for copying a diectory using tar:
cd to the source directory replace <target> with your target directory tar cf - . | (cd <target>; tar --same-owner xvkp -)
As a suggestion, set up the SD file tree as a sparse copy of the Flash. That is, if OpenOffice lives at /opt/OpenOffice.org2.3, make a directory on the SD /opt/OpenOffice.org2.3, copy, remove the original, replacing it with a link to the copy on the card.
Here's an example to move OpenOffice to the card:
su -l mkdir /media/int2gsd/opt (int2gsd is the name of the the card, substitute your name) mkdir /media/int2gsd/opt/openoffice.org2.3 cd /opt/openoffice.org2.3 tar cf - . | (cd /media/opt/openoffice.org2.3; tar --same-owner xvkp -) rm -r /opt/openoffice.org2.3 ln -s /media/opt/openoffice.org2.3 /opt/openoffice.org2.3 exit
Use it
I was able to transfer some "first world" applications (like OpenOffice) off the XO flash to the SD card, and establish symbolic links from their old locations to their location on the card. Everything seems ok at this time.
One consequence is that the card is no longer recognized by Sugar as a Journal repository.
Rmyers 10:44, 15 February 2008 (EST)
Removed stub, Cleaned a bit.
I removed the stub icon. It is as detailed as anything else on this wiki. Also, the 'intermittent in first release' never mentioned which release that was. Anyone know?