XO-1.5 users: need your SD card data

James Cameron quozl at laptop.org
Thu Apr 14 22:10:19 EDT 2011


G'day Daniel,

As an alternative, consider identifying the unused blocks in the
filesystem, and avoid including them in the .zd file.  This would make
it unnecessary to know whether the bits will be set or cleared by the
card.  ext2, ext3, and ext4 care nothing for the bits in unused blocks.

zerofree [1] demonstrates how to identify the unused blocks.  The
attached patch to zerofree-1.0.1 lets me dump the block numbers of the
unused blocks without changing the filesystem:

	zerofree -nd filesystem.img > filesystem-free-blocks

The block numbers might then be used by a modified zhashfs, or zhashfs
might make the same block bitmap test calls that zerofree makes.

It is said by the author [1] and in various places that zerofree can
work with ext4 ... I've run it against the ext4 partition of an SD card
that contains os14 ...  with no apparent ill-effects.

However, Richard Jones suggests [2] that files with extents may not be
handled.  I'm not sure if that is a concern for olpc-os-builder images.

References:

1.  http://intgat.tigress.co.uk/rmy/uml/
2.  http://www.redhat.com/archives/libguestfs/2010-June/msg00019.html

-- 
James Cameron
http://quozl.linux.org.au/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zerofree-dump.patch
Type: text/x-diff
Size: 706 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20110415/cc4d5261/attachment.patch>


More information about the Devel mailing list