XO Flash Bad Blocks

From OLPC

Jump to: navigation, search
  This page is monitored by the OLPC team.
  english | espaƱol HowTo [ID# 291395]  +/-  

This page is how to fix an XO-1 laptop which is having problems with its main Flash ROM storage. It is part of the XO Troubleshooting Guide.

Contents

Problem Description

The NAND Flash which provides the primary storage for an XO-1 laptop usually has blocks of the chip which don't work. These are identified at the factory (using an extremely sensitive test) and don't change over the life of the device. Occasionally, however, a device develops additional bad storage blocks. If a laptop has had repeated problems where the solution was reinstalling the software, the bad block table may need to be rebuilt.

Diagnostics

Unfortunately the standard mtd_debug tool (from the mtd-utils package) does not provide information about the BBT. You can download an improved mtd_debug from http://dev.laptop.org/~martin/ -- to use

 modprobe mtdchar
 /path/to/mtd_debug info /dev/mtd0

the output will include 'mtd.badblockscount'.

Repair

You can ask Open Firmware to check the NAND Flash and add newly-bad blocks to the "bad block table" that tells the system not to use them. This requires a developer key for the laptop.

 ok test /nandflash::fixbbt

This procedure takes several minutes, because it tests every block on the NAND Flash with several data patterns. The procedure is safe for good NAND Flash, because it saves the previous block data before the test and restores it afterwards, so you won't lose any data on good Flash blocks. There is, however, a small chance of data loss in the event that a block goes bad during (i.e. as a result of) the test, preventing restoration of the previous contents.

Complete Failure

Either this NAND is close to complete failure, or else the bad block 
table has become corrupted.

You could try recreating the bad block table as follows:
ok select /nandflash  scrub!  unselect

See Also

Personal tools
  • Log in
  • Login with OpenID
About OLPC
About the laptop
About the tablet
Projects
OLPC wiki
Toolbox