| Summary: | wic write --expand auto fails | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Ross Burton <ross.burton> |
| Component: | Scripts and Tools | Assignee: | Anuj Mittal <anuj.mittal> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | anuj.mittal, ross.burton |
| Version: | 2.5.1 | ||
| Target Milestone: | 2.6 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Ross Burton
2018-07-02 16:01:22 UTC
I took a look at this. According to the spec, the partitions should be assumed to be on a 2048 sector boundary (for a 512 byte sector) and the current logic just divides the free sectors available by the number of partitions that need re-sizing ... which may or may not align and might overshoot the limit as is happening in this case. Since we are just expanding the partitions that are already aligned, I guess it should be okay if we just divide up the free space in multiples of 2048. I tested it and this works. Will test some more and send patch later. From the UEFI spec [1] : To avoid the need to determine the physical block size and the optimal transfer length granularity, software may align GPT partitions at significantly larger boundaries. For example, assuming logical block 0 is aligned, it may use LBAs that are multiples of 2,048 to align to 1,048,576 byte (1 MiB) boundaries, which supports most common physical block sizes and RAID stripe sizes [1] http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf |