Free up /boot space with some GRUB module changes #2456
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Free up /boot space with some GRUB module changes
Secure Boot prevents you from loading additional GRUB modules so remove them from supported targets to save space. These modules could be useful for debugging with Secure Boot disabled, but manually copying the modules with debug symbols is even more useful and not that difficult.
Compress the GRUB modules with xz instead of gzip to save space. Giving the
--best
or-9
option results in a heavier decompression cost with no gain on such small files. Note that this required a Kola test to be dropped.Prevent the developer test GRUB modules from being built. These are normally always installed, even by
grub-install
, but they have no use outside of testing and take up valuable space in /boot. Apologies for the use of awk here, but sed didn't cut it. Kudos to Copilot for the assistance. 😄/boot usage has changed from 62MB to 60MB on amd64. arm64 remains at 62MB, despite the modules previously taking up 940KB. I suspect all these usage figures are actually quite close to 61MB. The unrounded figures would give a better picture.
We still need to be cautious about the kernel size for the time being because older systems being upgraded will not benefit from these savings. It would probably be easy to backport the changes into the updater though, so I'll look into that.
How to use
Just test that the images boot as usual.
Testing done
A Jenkins run passed except for the cl.update.grubnop test, which has since been dropped as mentioned above.
changelog/
directory (user-facing change, bug fix, security fix, update)/boot
and/usr
size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.