Bug 11278 - wic: create an option to use entire disk
Summary: wic: create an option to use entire disk
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 2.4 M3
Assignee: Ed Bartosh
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 11291
  Show dependency tree
 
Reported: 2017-03-31 17:52 UTC by Stephano Cetola
Modified: 2017-08-28 09:58 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephano Cetola 2017-03-31 17:52:22 UTC
We would like to have wic provide functionality similar to mkefidisk. 

Essentially, use as much of the disk space as is available:
ROOTFS_SIZE = (DEVICE_SIZE - BOOT_SIZE - POSSIBLE_OTHER_THINGS)

Ideally there would be 2 options:
 1. pass in --disk-size 
 2. pass in --usb-dev=/dev/sde
Comment 1 Ross Burton 2017-06-14 13:27:09 UTC
So I'm wondering if a useful and workable way to do this would be to have wic handle the writing of the image to the target device.  This way it could read the partition table in the image, manipulate it to fill the target device, write that new partition table and the file systems, and finally expand each of the file systems to fill the space.

Ideally, as simple as:

$ wic write --expand my-image.wic /dev/sdc
Comment 2 Ross Burton 2017-06-14 15:04:02 UTC
One of our users would like the ability to say eg "give me a 100MB /boot, and expand / to fill the disk", so we'd ideally like quite some flexibility when expanding.
Comment 3 Ed Bartosh 2017-06-14 15:08:35 UTC
would it be enough to keep first partition as is and split remaining media space between the rest of partitions?

if someone wants to have 100Mb /boot may be better option would be to use --size 100M in .wks?
Comment 4 Ross Burton 2017-06-14 15:38:48 UTC
I expect so yes.
Comment 5 Ed Bartosh 2017-07-10 09:21:09 UTC
Agreed on implementing wic write --expand my-image.wic /dev/sdX in such a way that it will keep first partition unmodified and expand the rest of partitions to fill the media.
Comment 6 Ed Bartosh 2017-07-24 07:36:01 UTC
Shifted to M3
Comment 7 Saul Wold 2017-08-11 21:53:02 UTC
Staying with Ed to finish up for M3
Comment 8 Ed Bartosh 2017-08-25 13:53:28 UTC
Sent patchset for review: http://lists.openembedded.org/pipermail/openembedded-core/2017-August/141419.html
Comment 10 Ed Bartosh 2017-08-28 09:58:52 UTC
merged into poky master. commit id: 390dcbf2e14f212d81a8fe252cf3ae801b82ffa9