Hello.
I've found rather critical bug that caused my server malfunction for several hours (time needed to recompile a kernel).
Steps to reproduce:
1) Compile a kernel with genkernel.
2) Recompile the same kernel version with genkernel again (for example, I decided to recompile the kernel with different config).
3) Run eclean-kernel -n 1
After the second compilation you have the following layout:
lily ~ # eclean-kernel -p -n 1
Legend:
[-] file being removed
[+] file being kept (used by other kernels)
These are the kernels which would be removed:
- 5.17.9-gentoo-x86_64.old: not referenced by bootloader (grub2)
[-] /boot/vmlinuz-5.17.9-gentoo-x86_64.old
[+] /usr/src/linux-5.17.9-gentoo
[+] /lib/modules/5.17.9-gentoo-x86_64
[-] /boot/System.map-5.17.9-gentoo-x86_64.old
[-] /boot/initramfs-5.17.9-gentoo-x86_64.img.old
kernel-install will be called to perform prerm tasks.
Bootloader grub2 config will be updated.
lily ~ # eclean-kernel -n 1
Legend:
[-] file being removed
[x] file does not exist (anymore)
[+] file being kept (used by other kernels)
* Removing kernel 5.17.9-gentoo-x86_64.old (not referenced by bootloader (grub2))
[-] /boot/vmlinuz-5.17.9-gentoo-x86_64.old
[+] /usr/src/linux-5.17.9-gentoo
[+] /lib/modules/5.17.9-gentoo-x86_64
[-] /boot/System.map-5.17.9-gentoo-x86_64.old
[-] /boot/initramfs-5.17.9-gentoo-x86_64.img.old
Removed 1 kernels
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.17.9-gentoo-x86_64
Found initrd image: /boot/intel-uc.img /boot/initramfs-5.17.9-gentoo-x86_64.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
For some reason, eclean-kernel removed most of the /lib/modules/5.17.9-gentoo-x86_64/modules.* files, leaving only modules.builtin, modules.builtin.modinfo and modules.order.
This makes the system unable to load any modules. I've accidentally found this after a reboot - hardware attached to my server wasn't working because the modules were not loaded.
Hello. I've found rather critical bug that caused my server malfunction for several hours (time needed to recompile a kernel).
Steps to reproduce:
1) Compile a kernel with genkernel. 2) Recompile the same kernel version with genkernel again (for example, I decided to recompile the kernel with different config). 3) Run eclean-kernel -n 1
After the second compilation you have the following layout:
Now run eclean-kernel:
And you end up with this:
For some reason, eclean-kernel removed most of the /lib/modules/5.17.9-gentoo-x86_64/modules.* files, leaving only modules.builtin, modules.builtin.modinfo and modules.order.
This makes the system unable to load any modules. I've accidentally found this after a reboot - hardware attached to my server wasn't working because the modules were not loaded.