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

cleanup entries before removing them #30

Open
lnussel opened this issue Nov 29, 2023 · 3 comments
Open

cleanup entries before removing them #30

lnussel opened this issue Nov 29, 2023 · 3 comments

Comments

@lnussel
Copy link
Member

lnussel commented Nov 29, 2023

when calling e.g. add-all-kernels when entries already exist we should rename the old entry to a temporary name and then call bootctl unlink instead of simply overriding the file. Avoids leaving stale files.

@throttlemeister
Copy link

throttlemeister commented Dec 4, 2023

Is there a means of safely removing stale .conf files and kernels? I have noticed old kernels under /boot/efi/opensuse-tumbleweed/ and .conf files under /boot/efi/loader/entries are left and not cleaned up, even when the older kernel versions are removed by an update and when snapper snapshots are being removed.

Due to this, pressing spacebar at boot and entering the bootmenu allows (failing) attempts to boot kernels or snapshots that are not longer there, and makes it hard to see which available entries are valid and bootable entries when you need to roll back for whatever reason.

It also can cause /boot/efi to run out of space, which can cause even more headaches. :)

@lnussel
Copy link
Member Author

lnussel commented Dec 14, 2023

you can run sdbootutil kernels. It checks whether all installed kernels are registered and whether there are kernels registered that are not actually installed.

@throttlemeister
Copy link

That only shows what kernels are installed, which is the same as zypper se -si kernel-default. In my case, currently 6.6.7 and 6.6.10. However, when looking in /boot/efi/opensuse-tumbleweed I have 6.6.3, 6.6.6, 6.6.7 and 6.6.10. The first two should have been removed when the kernels were purged by zypper dup. Same with /boot/efi/loader/entries, which make them show up in the boot menu. But these contain even more, as also the files for snapshots that snapper has pruned are left in place.

This makes the bootmenu, should you need it, unnecessary convoluted and difficult to pick a correct and working entry while the actual bootfile add about 88MB per kernel. This is not a lot, but with a default size of 500MB for /boot/efi it makes it run out of space - and resulting update failure - pretty quick.

I would say systemd-boot should clean up these entries / files as part of the update / post-install scripts?

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

2 participants