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

Change initramfs compression mode from zstd to xz to save space on ESP #168

Closed
leviport opened this issue Mar 30, 2023 · 5 comments
Closed

Comments

@leviport
Copy link
Member

leviport commented Mar 30, 2023

Older installs that still have a 512mb (which includes all HP Dev Ones) ESP are getting "low space" warnings. Resizing the ESP on existing installs cannot be done automatically, and if the installation is encrypted, doing it manually is a pain.

A quick way to free up a little space is to change initramfs compression to xz. This can be done manually by changing COMPRESS=zstd to COMPRESS=xz in /etc/initramfs-tools/initramfs.conf and regenerating initramfs (sudo update-initramfs -c -k all). I propose we make this the default automatically.

We may need to take more drastic steps later, but this seems like a good quick improvement.

@peelos
Copy link

peelos commented Oct 30, 2023

Thanks, this helped me gain crucially enough space to allow firmware updates.. with no noticeable difference in boot speed

@JonnesBezerra
Copy link

Wow, I changed it and it works. Now the laptop is updated! Thank you

@gabriele2000
Copy link

gabriele2000 commented Jul 11, 2024

Why not zstd --ultra -22?

I feel that changing it to xz would mean "going backwards" since zstd is more advanced and faster.
The improved size compared to xz is trivial at level 22, you may gain 1% or 2% of the total size.

with no noticeable difference in boot speed

I feel like you aren't thinking about the fact that generating an initramfs image takes more time than updating something like 100 packages on a fast SSD.
It's a bottleneck.

A good solution would be to make the user choose the level of the ZSTD compression (with level 10 as default)

@leviport
Copy link
Member Author

The user is free to set whatever option they want in /etc/initramfs-tools/initramfs.conf

We've freed up space elsewhere, so I don't think this issue is valid any longer.

@kenricashe
Copy link

The user is free to set whatever option they want

Okay but which option is ideal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants