Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] wic: fix extended/logical partition layout
@ 2015-01-09 13:24 Maciej Borzecki
  2015-01-09 13:24 ` [PATCH 1/1] " Maciej Borzecki
  0 siblings, 1 reply; 9+ messages in thread
From: Maciej Borzecki @ 2015-01-09 13:24 UTC (permalink / raw)
  To: openembedded-core, Tom Zanussi; +Cc: Maciek Borzecki

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-02-06 11:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09 13:24 [PATCH 0/1] wic: fix extended/logical partition layout Maciej Borzecki
2015-01-09 13:24 ` [PATCH 1/1] " Maciej Borzecki
2015-02-02  7:37   ` Maciej Borzecki
2015-02-02 14:29     ` Tom Zanussi
2015-02-03 10:05       ` Maciej Borzecki
2015-02-03 12:49         ` Tom Zanussi
2015-02-06  2:27           ` Alexandre Belloni
2015-02-06  3:02             ` Tom Zanussi
2015-02-06 11:43               ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox