Re: Partition layout of ARM SD card images

From: John Kennedy <warlock_at_phouka.net>
Date: Sun, 10 Jul 2022 20:05:54 UTC
On Sun, Jul 10, 2022 at 04:26:02PM -0300, Dr. Rolf Jansen wrote:
> ... The start of the fat32 boot slice s1 (containing the u-boot) stuff is neither aligned to 1M nor to 4k, it starts on an odd base. The start of the BSD payload slice s2 and its size are odd as well. The padding of 57 blocks within s2 lets the UFS partition start on a globally even base, namely 104391+57 = 104448, which as a matter of fact is 4k aligned (104448*512/4096 = 13056) and 1M aligned as well (104448*512/1024/1024 = 51), however all this keeps looking strange.
> 
> Are there reasons for this partition layout besides making it look more interesting? If yes, some insights would be good.

  I think there are historical reasons, probably more with not "wasting"
space on small SD cards (~512 byte blocks).  I haven't had it bite me
recently, at least, but I imagine the FreeBSD folks are trying (perhaps
vainly) to keep image count to a minimum.  I think I was tweaking my
images from RPI2 and later to 4K and 1M like you are to line up with the
storage I had them stored on and the filesystems inside the partitions.