Skip to content
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

Reduce vmlinuz size #688

Open
pothos opened this issue Mar 23, 2022 · 7 comments
Open

Reduce vmlinuz size #688

pothos opened this issue Mar 23, 2022 · 7 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@pothos
Copy link
Member

pothos commented Mar 23, 2022

Description

The boot partition has to fit both kernels on update. If both are > 60 MiB they won't fit. Therefore, we always have to ensure that the vmlinuz file is < 60 MiB. On arm64 we are closely approaching the limit (new Alpha has a ~57 MiB vmlinuz).

Impact

To avoid hitting the size limit we may have to block a security update.
And of course updates will break for users if we release with a too large vmlinuz file.

Environment and steps to reproduce

See end of the console output of the image-matrix job

Expected behavior

Have some MiBs wiggle room, on amd64 we have a ~54 MiB vmlinuz - while not perfect it's still double the margin

Additional information

Compression was adjusted last time, and we couldn't enable it more at that time. This time it's worth to check if we can throw binaries/kernel modules out of the initramfs (planned is torcx for example, but I don't think the impact on the initramfs will be that large?).

@pothos
Copy link
Member Author

pothos commented Mar 24, 2022

First small size reduction in flatcar-archive/coreos-overlay#1750

@pothos
Copy link
Member Author

pothos commented Jun 2, 2022

Current situation: 58 MiB (must be < 60 MiB or updates will break)

@pothos
Copy link
Member Author

pothos commented Sep 1, 2022

This may be a blocker for Clevis integration for LUKS setup from Ignition with TPM unlocking

@pothos
Copy link
Member Author

pothos commented Sep 26, 2022

When CONFIG_EFI_ZBOOT is available we will gain kernel compression for arm64. Not sure if we can/should also switch amd64 over to it.

@pothos pothos self-assigned this Jan 11, 2023
@pothos
Copy link
Member Author

pothos commented Jan 16, 2023

By moving Ignition and afterburn/coreos-metadata out and use it from the /usr partition I was able to reduce the /boot size from 58 MiB to 52 MiB for arm64 (from 55 MiB to 49 MiB for amd64). Am still testing the changes but this will likely "solve" the growth issue for the next years and once we hit the limit again we can search for more binaries or even kernel modules to move out to the /usr partition.

@pothos
Copy link
Member Author

pothos commented Jan 20, 2023

PR in flatcar/bootengine#52

We can leave this open to use CONFIG_EFI_ZBOOT as final improvement for arm64.

@pothos pothos changed the title Reduce arm64 vmlinuz size to avoid breaking updates Reduce arm64 vmlinuz size Jan 26, 2023
@pothos pothos changed the title Reduce arm64 vmlinuz size Reduce vmlinuz size May 23, 2023
@pothos
Copy link
Member Author

pothos commented May 23, 2023

Now with the 6.1 update the amd64 kernel is quite large, even larger than the arm64 kernel. Some configs got changed unexpectedly, this could have caused it, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Development

No branches or pull requests

1 participant