The patch fixes a problem with laying out partitions in wic. The original code would steal sectors from the last primary partition to accommodate for EBR. This would originally work in mic, but fails with wic (reasons discussed further down this email).
The patch removes the sector stealing from the last primary partition, replacing it with reservation of sectors for EBR before every logical partition. The reservation is done before the partition is aligned so that the fs inside the partition starts at desired alignment. The extended partition is created taking into account the EBR sector reservation. Since the extended partition is described in MBR and requires no additional sectors, the EBR from the first logical partition is accounted for when calculating extended partition size. The root cause is a fundamental difference in the preparation of disk image between the original mic code and wic. In mic, the disk image was created beforehand, mounted via loopback (thus requiring sudo), partitioned and then the file systems were created. For comparison in wic, we first create partition images, followed by preparation of a complete empty disk image file. The partitions (or in fact MBR entries) are created using parted. Only after this step is complete, the original partition image files are copied into the disk image using dd. Discrepancy between the MBR/EBR entries and locations where dd puts the data to is likely to produce either a faulty image or an unmountable partitions. Hopefully this list is the last patch fixing sector stealing. Maciej Borzecki (1): wic: fix extended/logical partition layout scripts/lib/wic/utils/partitionedfs.py | 40 ++++++++++++++++------------------ 1 file changed, 19 insertions(+), 21 deletions(-) -- 1.9.3 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core