[Sugar-devel] Unbootable machine

Jonas Smedegaard dr at jones.dk
Sun Aug 30 14:12:16 EDT 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090830/a75f22c7/attachment-0001.pgp 


More information about the Sugar-devel mailing list