On Sun, Aug 30, 2009 at 10:10:09AM -0700, H. Peter Anvin wrote:
On 08/30/2009 10:05 AM, Dan Krejsa wrote:

Well, to begin with, neither the makebootfat documentation nor the source code seem to make any mention of aligning disk and filesystem data structures consistent with the erase block size for the flash on a particular USB disk.

Now, perhaps this is _usually_ an implicit result of the FAT cluster sizes, the geometry chosen, and makefatboot's default layout, but it is certainly not explicit.

Oh - that's bad :-(

I wrongly assumed that makebootfat was capable of setting cluster sizes.



To do proper alignment, you want to align ALL of these on a multiple of
the cluster size:

- The partition start
- The first FAT
- The length of each FAT
- The size of the root directory (for FAT16)

Neither of these are usually aligned unless special effort is taken to
that effect.  The other thing that might be worthwhile is to not use FAT
at all, but use ext2/3/4, which means only the partition start becomes
an alignment issue.  It should still work to have the fake-FAT-in-MBR, I
suspect.

Yes, the name of the tool is misleading: It works with other fs types too - its main purpose it partitioning, not fs formatting. I succesfully booted USB sticks formatted as ext2 (as far as I recall - I last worked with it a year ago).


 - Jonas

--
* Jonas Smedegaard - idealist & Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to