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
ADATA 16GB SDHC gets corrupted partition block
I tried an ADATA "Class 6 Turbo" 16GB SDHC.
I didn't catch a dmesg message (if any) while the corruption was happening, but multiple times the first sector (partition) was overwritten with zero's. Restoring said sector seemed to work, but other data may well be corrupted, too. Also, the card appears with a different number after suspend. It looks like the driver and the card disagree about some timings, especially during power up/down. I'd say the driver is wrong by definition, although the card may very well be wrong, too.
In any case, the combination of XO + this card isn't usable, whereas same card seems very usable when used by other computers.
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)
HOW TO FIX Disappearing SD Cards in some windows systems
Do the following reg. hack (numbers are in DECIMAL! hex equiv. is 0x2004): [HKLM\System\StorageManager] "PNPUnloadDelay" = dword:8196 [HKLM\System\StorageManager] "PNPWaitIODelay" = dword:8196
See : A more complete article on how to Fix SD Memory Card Disappearing, Missing Folder or Corrupt in Windows Mobile Device : http://www.mydigitallife.info/2008/06/25/fix-sd-memory-card-disappearing-missing-folder-or-corrupt-in-windows-mobile-device/
Maximum 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)
The Marvell doc for the CaFE chip states "Up to 48MHz for SD". As 66x is 10MHz, it seems the speed of the chip will handle any available SD card rate. Now the next questions are whether it is clocked that fast in the XO and if the driver supports speed determination and runs faster with faster chips. Rmyers 13:30, 26 May 2008 (EDT)
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] )
Some cards do not work during boot with older firmware versions, if you are using a version older than q2d08 and see an error like:
SDHCI: Card didn't power up after 1 second Can't open directory
Try upgrading the firmware like described here http://wiki.laptop.org/go/OLPC_Firmware_q2d14#OLPC_Firmware_Release_q2d14_-_2008-03-13
How-to: 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.
Note: This defect is entered at ticket #6532.
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. Therefore, 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.
comment: this is confusing me. isn't ext2 unsuitable for this kind of device? would it not be better to use jffs? (like Samir comments on his page) unfortunately mkfs.jffs2 only produces disk images making formatting of a partition a non-trivial task.
How_to_Damage_a_FLASH_Storage_Device is interesting in this respect.
- eMBee
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?
I also moved lots of random questions to the talk page, cleaned up grammer, distilled info from the talk page, etc. Really, I was just looking for the command to copy the FS from the XO to the card. :) CharlesMerriam 20:38, 10 March 2008 (EDT)
Multiple cards fail to mount
(moved from the main article)
I Installed (2) different USB sticks on my new XO and also a miniSD (with SD adapter) and none of these (3) items are showing up in the Journal. I'm unable to access any of these and don't understand what I'm doing wrong. The USBs are both U3 Launchpad enable (only one is password protected). How can I make these Items work?
A: Make sure both cards have different Volume labels, as that's how they're assigned a mount point. See [3]
- There's a hidden folder the OLPC puts onto all mounted media, ".olpc.store/". Try removing that, a broken database there may keep the journal from working properly. You should always be able to see the device mounted using "df" in Terminal.
- Also, make sure they are FAT-formatted (most new USB sticks come FAT-formatted)—I think both FAT16 and FAT32 work. Also, I think the sticks/cards need to be writable for Sugar to index them correctly, so if your stick or card comes with a read-only switch, make sure it is in the read/write position and not the read-only position. I don't know much about the U3 system, but you might want to try non-U3, non-password-protected sticks to eliminate the possibility that your hardware is defective. If regular, brand-new sticks are not working, it is possible there is something wrong with the hardware of your machine, in which case you may want to contact the support line to see if it needs to be replaced (within the 30 day warranty period, if possible). —Joe 02:29, 29 December 2007 (EST)
Another thing to try is a quick reboot of the OLPC. I've had some difficulty with hot-swapping cards, but booting with them already attached seems to work much, much better.
Troubles reading block 0
(moved from main article) I get an error about not being able to read block 0 of mmc1 when I turn on my XO. I've tried two cards, and those worked on another person's XO. I can't do anything to mount them AaronPeterson 02:39, 3 January 2008 (EST)
Remounting Issues
(moved from main article)
Some reports of issues, (currently in Ship.2 or pre Update.1 ?)
- USB memory stick is removed after the Journal sees it; after that, the
Journal won't show the stick again until it is rebooted.
- I tried unmounting a USB stick from the journal, and after removal I couldn't get the XO to remount the stick. Resolution: if unmounting doesn't seem to work, be sure to TURN OFF XO BEFORE REMOVING USB STICK or you could LOSE YOUR DATA. Once you've removed the stick after turning off XO, use a PC to remove the .olpc.store folder (rename it to something else if it doesn't let you delete it). The XO should then be able to mount it. For unmounting, you could also try doing so from the terminal's command line (use umount). Just make sure the stick is really unmounted (i.e. you can't see the corresponding folder under /media) before you pull it. Shi 13:36, 24 January 2008 (EST)
- Suspend causes the SD card to come back with a device name one higher than before.
The best way to reboot is to go to the Home screen (with the XO in the middle and a donut of activities around it), hover the mouse over the XO, and click on Reboot.
20 / 30 MB/s?
I'm considering getting an 8GB SDHC card for running Ubuntu on my XO.
I want to know, should I drop the extra money on the Extreme III 30 MB/s (an extra $40), or will it work good enough with 20 MB/s?
Reply: The Fedora on XO project recommends the Extreme III. I've tried getting Fedora up on the XO using this, but don't have enough experience with it yet to say if the speed is required. I've seen the X III 8 for under $40 street price, so your premium sounds questionable. Rmyers 21:17, 25 November 2008 (UTC)
Ownership of removable stores
When plugged, a SD is assigned to root whereas a USB is assigned to olpc.
bash-4.2# ls -ld /run/media/olpc/* drwxr-xr-x 3 root root 4096 Sep 4 16:40 mySD drwxr-xr-x 8 olpc olpc 1024 Aug 23 11:05 myUSB
Likely a consequence of /lib/udev/rules.d/<SomeRules>. This is acceptable for some purposes but inconvenient for others. Has anyone already devised an /etc/udev/rules.d/<AssignSdToOlpc>?
Thanks, ... --Peasthope 01:33, 5 September 2013 (UTC)