Hints for ext3 filesystems on flash...
Mitch Bradley
wmb at laptop.org
Fri Apr 10 11:10:48 EDT 2009
Martin Langhoff wrote:
> Hi Mitch,
>
> I'm working on getting bootable ext3 images to put on SD cards to use
> on the XO, to run the XS distro.
>
> While I am not expecting the SD card to deal with a heavy write
> workload (the recommended strategy is to use an external disk for
> /var/lib and /library ), I am still keen on avoiding early SD card
> death...
>
> Do we have any good rule of thumb on any partition alignment +
> blocksize that is likely to work well on current SD cards in the
> market?
>
A 1 MB granularity for partitions is likely to be adequate for now and
the next couple of years.
Ideally, it would be nice to work within the parameters of the factory
partition map. Instead of just blasting on a new map with arbitrary
layout, change only the partition type field, then dd the image into
that partition. The image, of course, must be just the partition
contents, not the whole disk.
The partition-change thing could be scripted using fdisk or cfdisk.
For the filesystem, I recommend a 4K blocksize. 2K was okay for the
previous generation of NAND chips, but the new generation often uses 4K
pages.
> I've read your notes, and Tytso's blogposts about it; but maybe I'm
> not cultured enough to come up with a confident rule of thumb, and
> definitely have no idea whether it's possible to write a script to run
> on current linuxen that probes an SD card and Does The Right Thing.
>
> cheers,
>
>
> m
>
More information about the Devel
mailing list