Secure Digital card: Difference between revisions
(Farily major clean-up.) |
|||
Line 1: | Line 1: | ||
{{RightTOC}} |
|||
The XO laptop has |
The XO laptop has one slot for a MMC (MultiMediaCard), SD (SecureDigital) or SDHC (SecureDigital High Capacity) card. These cards, like USB flash drives, are automatically mounted and are accessed through the [[Journal Activity]]. The [[Journal]] entry shows you how to access the add-on memory devices. You can move files to and from the storage media by dragging and dropping the file in the Journal view to the USB stick icon at the bottom of the screen or by command line in the [[Terminal Activity]]. |
||
See discussion [[Talk:Secure_Digital_card]] to talk about specific situations. |
|||
== |
== About the Cards == |
||
#insert card (noted below) |
|||
See Wikipedia for a good overview of [http://en.wikipedia.org/wiki/Secure_digital SD and SDHC cards]. There are various incompatibilities between cards from different manufacturers. In general, both SD and SDHD cards work. |
|||
#device will show up in journal if correctly mounted. an error message may briefly flash when booting if it didn't work, but other than that you can do a "df" or "cat /etc/mtab" or "cat /etc/fstab" to see what's up |
|||
#to safely remove the device, click on it in the journal (lower left side most likely), and choose unmount. |
|||
== Quick Start == |
|||
:: if it's currently in use, this will happen :??? |
|||
#Insert card into the slot at the bottom of the screen. See below for more detailed instructions. |
|||
#The card will show up in the lower left side of the journal if correctly mounted. From the console, it will be available in a subdirectory of "/media". If the card is not correctly mounted when booting the XO, an error message may briefly flash. The Linux commands "df","cat /etc/mtab", "cat /etc/fstab", "ls /media" and "dmesg | grep mmc" can help figure out the status. |
|||
#To safely remove the card, click on it in the journal and choose unmount. If you remove the card without this step, pending changes to card may not be written and some files may be left in a corrupted state. Also, remounting the card before rebooting may be difficult. |
|||
#Physically removing the card requires pushing it in slightly and releasing it ("click-in to load, click-in to eject"). The card should then protrude far enough to grab with fingernails. A non-standard card with excessive width may require tweezers. |
|||
== Supported cards == |
== Supported cards == |
||
* File systems FAT16 (usually on SD cards) and FAT32 (usually on SDHD cards) are supported. |
|||
* FAT16, FAT32 formatted |
|||
* |
* Cards of various sizes work. 8-gigabyte SD memory cards work. 16GB cards [http://olpc.osuosl.org/forum/viewtopic.php?t=964&sid=748b62158cc7196a4dbb9ba0b95b52c7 have been reported to work]. While SD & SDHC cards up to 256 GB should be supported, larger cards are tested as they are created. |
||
* Reduced Size MMC cards, like the ones Nokia uses in Nokia 770 work well. |
* Reduced Size MMC cards, like the ones Nokia uses in Nokia 770 work well. PQI 8 GB cards [[Talk:Secure_Digital_card#PQI_High_capacity_8GB_SD_card_did_not_work|do not appear to work]]. |
||
* |
* Straight old MMC cards have not been tested. They should work, but some other hardware platforms do not support MMC cards. |
||
== Implementation == |
== Implementation == |
||
XO uses a custom microchip for SD card access |
XO uses a custom microchip for SD card access: the Camera and Flash Enabler (CaFE). CaFE includes SDHC support, which is hardware level compatible with SD. Pierre Ossman wrote the Linux driver support for SDHC and CaFE is driven by the sdhci driver. SD cards up to about 256 GB should be supported. CaFE follows the standard host controller interface for SD controllers. |
||
== SD standard == |
=== SD standard === |
||
Again, see Wikipedia for a basic overview. SD block addressing works with a 32 bit address. In the CaFe chip, which is compatible with the standard "SDHCI" spec, the address goes in the 32-bit chip register at offset 8. For old SD cards (not the new SDHC cards), the address is a byte address, so the maximum size is 4 Gbytes. For the newer SDHC cards, the address is a block number, assuming 512 byte blocks, so the maximum size is 2 TBytes. In other words, SDHC just shifts the addresses by nine bits, allowing an effective 40 bit address. The 32 GB limit that's often written about is an artificial limit in Window's FAT formatter; Windows will use the generally incompatible NTFS file system instead. Linux can format FAT up to the ~300GB real limit just fine, after that the card will need to use a linux specific filesystem. None of this is CaFe-specific. |
|||
== |
== Insertion== |
||
⚫ | To properly insert the SD/MMC/SDHC card the brass fingers on the card should be facing up and towards the front of the LCD screen. Insert the card until it is flush with the bottom of the screen, you will hear a click when the card is fully seated. It is a "Push to Click in and Push to Click out (Eject)" mechanism. When ejecting, push the card in again and release. It should come out far enough to grab with fingers, Try small tweezers if you have a hard time getting the card come out again. While not required, you can also attach a little piece of scotch tape to the SD card to give an easy handle to pull on the card when it sticks. |
||
=== When they don't mount === |
|||
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? |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
: 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 [[Support_FAQ#What_is_the_warranty_info.3F_RMA_process.3F | contact the support line]] to see if it needs to be replaced (within the 30 day warranty period, if possible). —[[User:Leejc|Joe]] 02:29, 29 December 2007 (EST) |
|||
⚫ | |||
---- |
|||
⚫ | |||
== |
== Troubleshooting == |
||
⚫ | |||
⚫ | |||
⚫ | To properly insert the SD/MMC/SDHC card the brass fingers on the card should be facing up and towards the front of the LCD screen. Insert the card until it is flush with the bottom of the screen, you will hear a click when the card is fully seated. |
||
⚫ | |||
Not required, it is a Push to Click in and Push to Click out (Eject) mechanism. Once inserted push and release and the card will pop-out enough to comfortably remove - No sticky tape required. Ram (Boston, MA) January 8th 2008. |
|||
* Cards and USB sticks may need to be writable for Sugar to index them correctly. Make sure any read-only switch is in the read/write position and not the read-only position. |
|||
⚫ | |||
* Be sure the cards are formatted as a FAT-16 or FAT-32 file system. Most new USB sticks and cards come FAT-formatted. |
|||
* If regular, brand-new cards and USB sticks are not working, it is possible there is something wrong with the hardware of your machine. You may want to [[Support_FAQ#What_is_the_warranty_info.3F_RMA_process.3F | contact the support line]] to see if it needs to be replaced (within the 30 day warranty period, if possible). |
|||
⚫ | |||
⚫ | |||
⚫ | |||
==Error Messages== |
|||
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 [[User:AaronPeterson|AaronPeterson]] 02:39, 3 January 2008 (EST) |
|||
⚫ | |||
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 [http://www.oreillynet.com/linux/cmd/cmd.csp?path=u/umount| umount]). Just make sure the stick is really unmounted (i.e. you can't see the corresponding folder under /media) before you pull it. ''[[User:Shi|Shi]] 13:36, 24 January 2008 (EST)'' |
|||
* Suspend causes the SD card to come back with a device name one higher than before. |
|||
* Many error messages can be found running "dmesg | grep mmc" from the terminal shell. |
|||
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. |
|||
== Formatting (FAT 16 or 32) == |
=== Formatting (FAT 16 or 32) === |
||
(Adapted from support help answers) |
(Adapted from support help answers) |
||
SD cards are pre-formatted by their manufacturers to work best for the |
SD cards are pre-formatted by their manufacturers to work best for the |
||
device |
device. It is not recommended that you reformat unless it really stops working; for example, if a freshly booted Linux refuses to mount it. |
||
(e.g. if a freshly booted Linux refuses to mount it). |
|||
Instructions |
Instructions for the command line in Terminal. |
||
The laptop doesn't come with the tools to format the SD card, so you will need to install them. |
The laptop doesn't come with the tools to format the SD card, so you will need to install them. |
||
Line 99: | Line 90: | ||
Then "mkdosfs -F 32 /dev/mmcblk0p1" should reformat it as a FAT32 file system. (Use -F for FAT16/FAT file system, however 2 GB size limit) |
Then "mkdosfs -F 32 /dev/mmcblk0p1" should reformat it as a FAT32 file system. (Use -F for FAT16/FAT file system, however 2 GB size limit) |
||
== Formatting and using with ext2 == |
=== Formatting and using with ext2 === |
||
See the talk page. |
|||
I moved the discussion of this to 'Talk'. I am having problems with the partition table disappearing. When this is more stable it can be moved back here. |
|||
[[User:Rmyers|Rmyers]] 12:29, 18 February 2008 (EST) |
|||
==Wikipedia== |
==Wikipedia== |
||
* [http://en.wikipedia.org/wiki/Secure_Digital_card Secure Digital card] |
* [http://en.wikipedia.org/wiki/Secure_Digital_card Secure Digital card] is a good overview of the standard. |
||
Revision as of 00:36, 11 March 2008
The XO laptop has one slot for a MMC (MultiMediaCard), SD (SecureDigital) or SDHC (SecureDigital High Capacity) card. These cards, like USB flash drives, are automatically mounted and are accessed through the Journal Activity. The Journal entry shows you how to access the add-on memory devices. You can move files to and from the storage media by dragging and dropping the file in the Journal view to the USB stick icon at the bottom of the screen or by command line in the Terminal Activity.
See discussion Talk:Secure_Digital_card to talk about specific situations.
About the Cards
See Wikipedia for a good overview of SD and SDHC cards. There are various incompatibilities between cards from different manufacturers. In general, both SD and SDHD cards work.
Quick Start
- Insert card into the slot at the bottom of the screen. See below for more detailed instructions.
- The card will show up in the lower left side of the journal if correctly mounted. From the console, it will be available in a subdirectory of "/media". If the card is not correctly mounted when booting the XO, an error message may briefly flash. The Linux commands "df","cat /etc/mtab", "cat /etc/fstab", "ls /media" and "dmesg | grep mmc" can help figure out the status.
- To safely remove the card, click on it in the journal and choose unmount. If you remove the card without this step, pending changes to card may not be written and some files may be left in a corrupted state. Also, remounting the card before rebooting may be difficult.
- Physically removing the card requires pushing it in slightly and releasing it ("click-in to load, click-in to eject"). The card should then protrude far enough to grab with fingernails. A non-standard card with excessive width may require tweezers.
Supported cards
- File systems FAT16 (usually on SD cards) and FAT32 (usually on SDHD cards) are supported.
- Cards of various sizes work. 8-gigabyte SD memory cards work. 16GB cards have been reported to work. While SD & SDHC cards up to 256 GB should be supported, larger cards are tested as they are created.
- Reduced Size MMC cards, like the ones Nokia uses in Nokia 770 work well. PQI 8 GB cards do not appear to work.
- Straight old MMC cards have not been tested. They should work, but some other hardware platforms do not support MMC cards.
Implementation
XO uses a custom microchip for SD card access: the Camera and Flash Enabler (CaFE). CaFE includes SDHC support, which is hardware level compatible with SD. Pierre Ossman wrote the Linux driver support for SDHC and CaFE is driven by the sdhci driver. SD cards up to about 256 GB should be supported. CaFE follows the standard host controller interface for SD controllers.
SD standard
Again, see Wikipedia for a basic overview. SD block addressing works with a 32 bit address. In the CaFe chip, which is compatible with the standard "SDHCI" spec, the address goes in the 32-bit chip register at offset 8. For old SD cards (not the new SDHC cards), the address is a byte address, so the maximum size is 4 Gbytes. For the newer SDHC cards, the address is a block number, assuming 512 byte blocks, so the maximum size is 2 TBytes. In other words, SDHC just shifts the addresses by nine bits, allowing an effective 40 bit address. The 32 GB limit that's often written about is an artificial limit in Window's FAT formatter; Windows will use the generally incompatible NTFS file system instead. Linux can format FAT up to the ~300GB real limit just fine, after that the card will need to use a linux specific filesystem. None of this is CaFe-specific.
Insertion
To properly insert the SD/MMC/SDHC card the brass fingers on the card should be facing up and towards the front of the LCD screen. Insert the card until it is flush with the bottom of the screen, you will hear a click when the card is fully seated. It is a "Push to Click in and Push to Click out (Eject)" mechanism. When ejecting, push the card in again and release. It should come out far enough to grab with fingers, Try small tweezers if you have a hard time getting the card come out again. While not required, you can also attach a little piece of scotch tape to the SD card to give an easy handle to pull on the card when it sticks.
The picture below shows the proper way to insert the SD/MMC/SDHC card:
--KenXo 11:28, 24 December 2007 (EST)
Troubleshooting
- When using multiple cards, make sure they have different Volume labels. The Volume labels are used in assigning a mount point
- There is a hidden folder the OLPC puts onto all mounted media, ".olpc.store/". A broken database there may keep the journal from working properly. Try removing the folder. You should always be able to see the device mounted using "df" in Terminal.
- Cards and USB sticks may need to be writable for Sugar to index them correctly. Make sure any read-only switch is in the read/write position and not the read-only position.
- Be sure the cards are formatted as a FAT-16 or FAT-32 file system. Most new USB sticks and cards come FAT-formatted.
- If regular, brand-new cards and USB sticks are not working, it is possible there is something wrong with the hardware of your machine. You may want to contact the support line to see if it needs to be replaced (within the 30 day warranty period, if possible).
- Another thing to try is a quick reboot of the OLPC. Hot-swapping cards can sometimes cause difficulty when booting with them already attached seems to work.
- The SD/MMC/SDHC memory card will only mount when inserted properly into the XO laptop. Some (older?) slots may allow you to insert the card in either direction.
- Many error messages can be found running "dmesg | grep mmc" from the terminal shell.
Formatting (FAT 16 or 32)
(Adapted from support help answers)
SD cards are pre-formatted by their manufacturers to work best for the device. It is not recommended that you reformat unless it really stops working; for example, if a freshly booted Linux refuses to mount it.
Instructions for the command line in Terminal.
The laptop doesn't come with the tools to format the SD card, so you will need to install them. With access to the Internet, you can install them as root by typing:
$ yum install dosfstools
This may take 5 to 10 minutes, then ask you if it's OK to download 71k of stuff, type "y" to download and install the "mkdosfs" command.
Insert your SD disk, check for current mount point, look for devices mounted in /media or /dev
$ df
or
$ mount
Look for similar devices as "/dev/mmcblk0p1" (meaning the first ("zeroth") MMC/SD card, and the first partition of that card. )
Then unmount any file system from the card, so that "df" doesn't show the card any more.
$ umount /dev/mmcblk0p1
Then "mkdosfs -F 32 /dev/mmcblk0p1" should reformat it as a FAT32 file system. (Use -F for FAT16/FAT file system, however 2 GB size limit)
Formatting and using with ext2
See the talk page.
Wikipedia
- Secure Digital card is a good overview of the standard.