-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does partition autoresize work exactly? #282
Comments
By default, genimage does not write areas without content. The partition table should contain partitions that cover the whole 2G, it's just the image that is smaller. Once you write the image to e.g. an SD Card, the partitions are as expected. If you want to use the image directly, use the Note that the size of the resized partition is not propagated to the creation of the ext4 image. So you would still need to resize the filesystem at runtime to match the partition size. |
Thanks @michaelolbrich okay, so
What I observe: If I specify
Understood.
Rather than performing an on-device resize of the filesystem image for the partition, I suppose it could be possible to use Cheers, |
Hi. Very happy genimage user here. I have a question about using the
autoresize
partition option and would like some clarity on its use and why it's not working in my case, particularly when there are implicitfile
rules involved. Consider the following as an example:Here, the resultant image size is defined by the size of both partition images plus additional necessary minimal headroom (eg partition table, padding, etc). I get an image that is approx 551MB. All good.
If I wanted to create a version of this image where the ext4 partition was expanded to fill a larger size, how would I do it? The documentation states:
image
partition
In order to expand (what I think autoresize means) the ext4 partition, genimage needs to know the size of the image I want to create. So I add
size = 2G
inside the top level image section ......and add
autoresize = true
inside the root partition descriptor (the last one):Unfortunately, despite these additions, genimage doesn't generate an image that is 2G in size and doesn't do any resize.
Unsurprisingly, I can't remove the
size
from the root.ext4 image while keeping thesize
in the top level image section:...and I can't use autoresize without size being in the top level section (even though it doesn't seem to do anything):
So my question is, does autoresize work and if so how? I'm able to manually resize root.ext4 simply by doing:
I fully appreciate that some filesystems (eg UBI) can do this, but what I'd like to accomplish is being able to resize my ext4 filesystem to fill the remaining space in the image. The documentation gives the impression that genimage would:
Please could you tell me how this can be accomplished?
Incidentally, the supported image types in the top level readme don't seem to be up to date with what's supported. For example, btrfs is supported but isn't mentioned in the readme. Should it be?
Thanks,
-- Matt
The text was updated successfully, but these errors were encountered: