Comment 21 for bug 626907

Revision history for this message
Dave Martin (dave-martin-arm) wrote : RE: [Bug 626907] Re: partitions and file system data need erase block alignment

> On Fri, Feb 11, 2011, Dave Martin wrote:
> > We may care about specific partitions being aligned in a certain
> > specific way (i.e., the boot partition on OMAP) but that's really a
> > separate problem -- I view that as bootloader
> bug-compatibility rather
> > than a general alignment requirement. Such a requirement should be
> > addressed by putting the partition in the right place at sector
> > granularity directly -- partitioners shouldn't be expected
> to do this
> > magically without complaining, since they are in no way designed to
> > come with this kind of situation.
>
> Will it cause issues with e.g. accessing the vfat from windows?

Good question-- try it and see?

In any case, I think we need to cylinder-align the FAT partition at least for OMAP ... and this partition is rarely read and even more rarely written, so performance is not much of an issue. So maybe there's no problem with this.

Note that when when the partition type field is 0xC this anyway warns the OS that the partition needs LBA and the CHS fields are/may be junk. So really, any non-broken OS ought to cope... (no guarantees though!)

>
>
> My understanding is that even if modern tools and Linux look
> at LBA offsets, they still have to write something in the
> CHS fields and follow constraints of these fields. I always

Well, in principle you have to write the CHS fields with "sensible" values in case some software tries to interpret them. But it seems that little or no software tries to interpret them nowadays, with the possible exception of partitioning tools. And with sectors past the 1024-cylinder limit, you can't write sensible values anyway. Some old tools used to simply mask off the high bits instead of setting the cylinder field to 1023, which would have led to catastrophe if OSes actually used that information when mounting