Closed raulillo82 closed 3 weeks ago
@raulillo82 purge-kernels
determines the kernel and associated packages to be deleted.
The packages themselves are responsible for removing their disk content.
So the first question is which packages own the directories and the content within?
find /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.2-1-default | rpm -qf
can help answering this.
Files associated with a package are removed when the package gets removed. Files not owned by any package would stay on disk, so they need to be removed by some packages uninstall script, if the content is no longer needed. Ideally the package clams to own
the directory then. Unlike files, directories can be associated with multiple packages. If the last package owning a directory is removed and the directory is empty, rpm removes it together with the package.
Once we know which packages claim to own the content, we can judge whether the package should have been removed too, or some package fails to clean up it's content.
There was a kernel update and I had already manually removed the oldest directory, but anyway, I can still show that info:
mordor:~ # rpm -qf /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10*
file /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.3-1-default is not owned by any package
file /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.4-1-default is not owned by any package
file /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.5-1-default is not owned by any package
mordor:~ # rpm -qa|grep -i kernel-default
kernel-default-6.10.4-1.1.x86_64
kernel-default-6.10.5-1.1.x86_64
(So the one that does not belong any more is the related to 6.10.3-1 version).
Edit: also adding the output of the package ownership for the files in the directory:
mordor:~ # rpm -qf /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.3-1-default/*
file /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.3-1-default/initrd-1301f6c454e0b7afe7cf087cd47264e311eec231 is not owned by any package
file /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.3-1-default/initrd-275e7a8032f3e95eca949f85fe21169fc9cb0d9a is not owned by any package
file /boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.3-1-default/linux-f431a68473f70f7db938d56c1a4f039aa439998e is not owned by any package
So maybe this should be reported at https://bugzilla.suse.com for component kernel or bootloader. Whatever creates the files should take care they get removed when they are no longer needed.
https://bugzilla.opensuse.org/show_bug.cgi?id=1229396 I guess you can close this issue then. Thanks a lot!
Problem as explained in description.
/boot/efi/bad01a2647cb4fef8827293b9d389245
(obviously the last directory has some random string related to systemd boot). There's a kernel directory for each installed version there, containing the kernel itself and at least one initrd (more if dracut has been called several times).I'm attaching some output to illustrate it. Let me know if you need anything else. Please also let me know if this is not
zypper purge-kernels
's fault (and if possible, point me to where to report this).In the output above, the directory
/boot/efi/bad01a2647cb4fef8827293b9d389245/6.10.2-1-default
should get deleted (I believe that byzypper purge-kernels
, but not 100% sure).P.S.: Completely unrelated, but I'm happy to have seen that my FDE encryption with TPM chip as decryption key now survives kernel updates, this was also broken and got fixed recently, even before I could report this.