eclean-kernel2
eclean-kernel2 copied to clipboard
Do not clean new active version
Hi, After upgrading and before rebooting to the newly built kernel, eclean-kernel is detecting the new installed kernel as a candidate for renewal, even if using the -n option. For example, while running kernel 4.14.8-gentoo-r1, after installing and compiling 4.14.10-gentoo-r1, this version is considered as "old" on my system, even if it's select through eselect-kernel :
gateway boot # eselect-kernel list Available kernel symlink targets: [1] linux-4.14.8-gentoo-r1 [2] linux-4.14.10-gentoo-r1 * gateway boot # eclean-kernel -p The following kernels would be removed:
== [4.14.6-gentoo] == Rationale: [-] stale files (no matching kernel) Files:
- /usr/src/linux-4.14.6-gentoo
- /lib/modules/4.14.6-gentoo
== [4.14.7-gentoo] == Rationale: [-] stale files (no matching kernel) Files:
- /usr/src/linux-4.14.7-gentoo
- /lib/modules/4.14.7-gentoo
== [4.14.10-gentoo] == Rationale: [-] stale files (no matching kernel) Files:
- /usr/src/linux-4.14.10-gentoo
- /lib/modules/4.14.10-gentoo
== genkernel-x86_64-4.14.10-gentoo-r1 == Rationale: [-] old Files:
- /boot/System.map-genkernel-x86_64-4.14.10-gentoo-r1
- /boot/initramfs-genkernel-x86_64-4.14.10-gentoo-r1
- /boot/kernel-genkernel-x86_64-4.14.10-gentoo-r1
- /usr/src/linux-4.14.10-gentoo-r1
- /lib/modules/4.14.10-gentoo-r1
The following command would be run: grub-mkconfig -o /boot/grub/grub.cfg
gateway boot # uname -a Linux gateway 4.14.8-gentoo-r1 #1 SMP Thu Dec 21 11:12:28 CET 2017 x86_64 Intel(R) Atom(TM) CPU C2550 @ 2.40GHz GenuineIntel GNU/Linux
You have to first reboot to newer kernel before using the cleaner. In older version, this was not an issue.
Would it be possible to fix this ?
Also having the same issue. Below, 4.17.6 should not be considered for deletion since that would leave me with no kernel. -n 1
doesn't have any effect here like I would expect it to, even if I am not booted into that kernel.
# uname -a
Linux limelight 4.17.3-gentoo-limelight #1 SMP Mon Jul 2 10:18:54 EDT 2018 x86_64 Intel(R) Core(TM) i7-5930K CPU @ 3.50GHz GenuineIntel GNU/Linux
# eclean-kernel -p -n 1
The following kernels would be removed:
== [4.16.8-gentoo-limelight] ==
Rationale:
[-] stale files (no matching kernel)
Files:
! /usr/src/linux-4.16.8-gentoo (does not exist)
- /lib/modules/4.16.8-gentoo-limelight
== [4.17.4-gentoo-limelight] ==
Rationale:
[-] stale files (no matching kernel)
Files:
! /usr/src/linux-4.17.4-gentoo (does not exist)
- /lib/modules/4.17.4-gentoo-limelight
== 4.17.6-gentoo-limelight ==
Rationale:
[-] old
Files:
- /boot/vmlinuz-4.17.6-gentoo-limelight
- /usr/src/linux-4.17.6-gentoo
- /lib/modules/4.17.6-gentoo-limelight
- /boot/System.map-4.17.6-gentoo-limelight
- /boot/config-4.17.6-gentoo-limelight
- /boot/initramfs-4.17.6-gentoo-limelight.img