[syslinux] [Sugar-devel] Unbootable machine

H. Peter Anvin hpa at zytor.com
Sun Aug 30 10:10:09 PDT 2009


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.
> 

It's typically not.

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.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list