| Summary: | Unable to resize extended partition in image created with wic | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Preeti Sachan <preetischn> | ||||
| Component: | Scripts and Tools | Assignee: | Chee Yang <chee.yang.lee> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | Medium+ | CC: | randy.macleod, richard.purdie, ross.burton, tim.orling | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 3.1 M4 | ||||||
| Hardware: | All | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Preeti Sachan
2019-11-26 07:43:09 UTC
Is this simply a case of changing the += 1 to +=2 ? Could someone send a patch please if so? Created attachment 4594 [details]
patch file applicable to poky, sumo and thud branch
I have tested on poky sumo and thud branch and having patch for same.
This patch file is applicable to poky sumo and thud branch.
$ cat fix-parted-unable-to-satisfy-all-constraints.patch
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index 1fa6b91..57f6f4a 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -416,7 +416,7 @@ class PartitionedImage():
# Reserve a sector for EBR for every logical partition
# before alignment is performed.
if self.ptable_format == "msdos":
- self.offset += 1
+ self.offset += 2
if part.align:
# If not first partition and we do have alignment set we need
@@ -517,8 +517,8 @@ class PartitionedImage():
# add a sector at the back, so that there is enough
# room for all logical partitions.
self._create_partition(self.path, "extended",
- None, part.start - 1,
- self.offset - part.start + 1)
+ None, part.start - 2,
+ self.offset - part.start + 2)
if part.fstype == "swap":
parted_fs_type = "linux-swap"
this should work for master branch https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=590555e3b8ccbd94b628aa6778adea7f4538d966 |