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

[RFC] base-files: add kernel hook for /boot freespace #44137

Merged
merged 1 commit into from
Jul 30, 2023

Conversation

abenson
Copy link
Contributor

@abenson abenson commented May 29, 2023

<leah2> we should make a kernel install hook check that prints a big
        warning if /boot is full after running it...

Thoughts:

  1. Change the threshold size? Make it configurable?
  2. Change the threshold to a percentage? I think that's less useful.
  3. Change what package this is shipped with? I'm not sure if it applies to all configurations we support/consider.
  4. Wording of the message?

Copy link
Member

@classabbyamp classabbyamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for the concept

  1. Change the threshold size? Make it configurable?

100MB might be a little bit big? In my /boot each kernel + initramfs + config is ~30MB (zfs and mkinitcpio so that might be different from the usual). maybe 50 or 60 MB?

  1. Change the threshold to a percentage? I think that's less useful.

agree that it's less useful because it should be the size of 1-2 kernels, IMO

  1. Change what package this is shipped with? I'm not sure if it applies to all configurations we support/consider.

Only the generic kernels keep old ones around, right? so maybe it could go in linux-base, which linux{,-lts,-mainline} all depend on.

  1. Wording of the message?

lgtm

@abenson
Copy link
Contributor Author

abenson commented May 29, 2023

100MB might be a little bit big? In my /boot each kernel + initramfs + config is ~30MB (zfs and mkinitcpio so that might be different from the usual). maybe 50 or 60 MB?

I based it on dracut default, which looking at my systems have each kernel+initrd pair at about 90M.

% ls /boot/vmlinuz* | while read ver; do
  du -csh /boot/*$(xbps-uhelper getpkgversion $ver)* | grep total; done
91M	total
91M	total
91M	total
92M	total

maybe it could go in linux-base

That sounds much more appropriate than base-files.

srcpkgs/linux-base/template Outdated Show resolved Hide resolved
@triallax
Copy link
Contributor

triallax commented May 30, 2023

I based it on dracut default, which looking at my systems have each kernel+initrd pair at about 90M.

That number is sure to increase in the future, how can we ensure the limit is updated in a timely manner?

@0x5c
Copy link
Contributor

0x5c commented May 31, 2023

I based it on dracut default, which looking at my systems have each kernel+initrd pair at about 90M.

That number is sure to increase in the future, how can we ensure the limit is updated in a timely manner?

Considering a move to mkinitcpio seems inevitable, the only update for a long while might be a lowering of the value

Copy link
Contributor

@0x5c 0x5c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like that approach, should help prevent silly systems breakage

srcpkgs/linux-base/files/50-bootsize.postinst Show resolved Hide resolved
@ahesford
Copy link
Member

The threshold need not be configurable. Just make it 2x (the size of the largest kernel plus the size of the largest initramfs).

@abenson abenson force-pushed the kernel_bootsize_hook branch 2 times, most recently from bcd14e6 to b7f83ad Compare July 3, 2023 23:25
Co-authored-by: classabbyamp <5366828+classabbyamp@users.noreply.github.com>
@classabbyamp classabbyamp merged commit e4bf243 into void-linux:master Jul 30, 2023
8 checks passed
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

Successfully merging this pull request may close these issues.

5 participants