Skip to content

Shrinking filesystem after provisioning #168

Open
@sassanh

Description

When I create an image based on rpi-bookworm-lite-arm64 which is ~450MB in xz format and ~2.6GB when uncompressed, the filesystem doesn't have enough room for provisioning commands I run (simple commands like apt install ...)
So I set the target image size to 3.5GB and all goes well, but then the created image is ~1.25GB when gzipped.

Currently I'm thinking maybe I can run apt clean to remove Debian package files and apt caches and then run zerofree on the filesystem and it should help gzip to compress the image much more. Is it ok or is there any official method for dealing with this issue in packer or packer-plugin-arm-image?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions