needrestart icon indicating copy to clipboard operation
needrestart copied to clipboard

Kernel checks fail when more than one kernel is available

Open izaera opened this issue 1 year ago • 0 comments

I'm using Arch Linux and I have two linux kernels available (current and LTS).

This is how my /boot directory listing looks like:

-rwxr-xr-x 1 root root    81920 ago  9 22:33 amd-ucode.img
drwxr-xr-x 4 root root     4096 oct  1  2022 EFI
-rwxr-xr-x 1 root root 75954024 sep  4 16:42 initramfs-linux-fallback.img
-rwxr-xr-x 1 root root 37745668 sep  4 16:42 initramfs-linux.img
-rwxr-xr-x 1 root root 72305024 sep  8 09:19 initramfs-linux-lts-fallback.img
-rwxr-xr-x 1 root root 37227592 sep  8 09:18 initramfs-linux-lts.img
drwxr-xr-x 3 root root     4096 sep 15 07:40 loader
-rwxr-xr-x 1 root root 12673312 ago 26 12:45 vmlinuz-linux
-rwxr-xr-x 1 root root 11455744 sep  8 09:18 vmlinuz-linux-lts

As you can see there are two vmlinuz-... files.

Now, apparently these lines of code check for those files and choose the wrong one. I don't know perl, so I may be wrong, but since I get this output from needrestart I guess that's the cause:

Scanning linux images...                                                                                                                                                                                            

Pending kernel upgrade!

Running kernel version:
  6.1.52-1-lts

Diagnostics:
  The currently running kernel version is not the expected kernel version 6.4.12-arch1-1.

Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting. [Return]

izaera avatar Oct 20 '23 12:10 izaera