Images partitioned right? Good USB drives? (Re: Woodhouse on flash storage)

Martin Dengler martin at
Fri Oct 9 21:46:17 EDT 2009

On Fri, Oct 09, 2009 at 04:23:17PM -0700, S Page wrote:
> On Tue, Oct 6, 2009 at 3:10 AM, Mitch Bradley <wmb at> wrote:
> > b) If you must construct a fixed partition layout for use on multiple
> > different devices, align each partition on at least a 4MiB boundary.
> > That means that you "waste" 4M for the partition map (one 512-byte
> > sector padded out to a 4 MiB boundary, but oh well).
> > [...]
> 1.
> Do the F11 / SoaS "overwrite your USB/SD device" XO images follow this
> guideline?
>    cat soas??xo.2gremovable.tar.lzma | lzma -dc - | tar xf - -O >
> /dev/sdX

Nope (SoaS) - that'll waste your partition table in favour of whatever
I copied from my dsd-inspired "make-fake-device" partition table
script[1].  I'd love patches.

Actually, I even had a try[2] at getting it right a while ago, based
on what I understood from T'so's post[3] and Mitch's warning page[4]:

     Do this for ext3 (omit -j for ext2):

     fdisk -H 224 -S 56 /dev/sdb
     [partition as normal]
     mke2fs -j -E stripe-width=32,resize=500G /dev/sdb1

     ...or this for ext4:

     fdisk -H 224 -S 56 /dev/sdb
     [partition as normal]
     mke2fs -t ext4 -E stripe-width=32,resize=500G /dev/sdb1

...but if anyone can correct / enlighten me as to The True

> (The way a boot image is created and distributed as multiple
> monolithic 379+ MB files seems crazy -- surely it's just a collection
> of files, tweaks to the existing MBR, and some disk partitioning and
> FS layout requirements.  But that's a different discussion. ;-) )

Err, I call Q.E.D. on why that's the easiest way to distribute a
workable image :).  But we burn a lot of disk space distributing
.ISOs, NAND-ready JFFS2 images, tar'ed directory trees, and even
xdeltas of the tar'ed directory trees (or something), so hopefully
anyone who can write a better set of instructions than that cat
pipeline you quoted won't be stopped by the lack of a set of bytes to
kick the process off.

> (I have a cheap USB flash drive that has "gone crazy" after two
> /dev/sdb reblastings; often usb-creator leaves it in a bizarre state
> and dosfsck reports hundreds of errors it can't repair.  Weird.)

Indeed...sorry to hear it.  I have a cheap 4GB USB drive that's been
"re-blasted" a hundred or so times and is still going.

> =S Page



2. , scroll down to "2009-03-07 :
Formatting SD cards as ext2, ext3, or ext4"



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the Devel mailing list