Kernel versions differ


I looked at some similar topics:

If I do:
pacman -Q linux && uname -r:

I get:

linux510 5.10.36-2

I’m using EFI boot so as far as I learned is that I’m not able to see the GRUB menu (to select the proper kernel version) at boot.
Update: I just figured out I can get the GRUB menu with holding the SHIFT key during boot, but it only shows 2 identical entries for 5.4.112-1.

I tried switching to a different kernel, but always ended up booting into 5.4.112-1.
What I don’t understand is where does this version come from if I don’t even have it installed on my machine?

Things I tried:

  • booted numerous times
  • booted into Live USB and tried to switch kernel versions, update-grub
  • I removed the pacman cache for the .112 version.
  • I looked at the /etc/default/grub and since I had GRUB_DEFAULT=saved and GRUB_SAVEDEFAULT=true I wondered if the version was somehow saved/cached somewhere so I changed GRUB_DEFAULT=0 and commented out the other

grep -E -i '(vmlinuz|menuentry )' /boot/grub/grub.cfg gives me:

menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-aca5a27a-5b1c-4fe3-a56f-d1185bde7517' {
	linux	/vmlinuz-5.10-x86_64 root=UUID=aca5a27a-5b1c-4fe3-a56f-d1185bde7517 rw  quiet udev.log_priority=3
	menuentry 'Manjaro Linux (Kernel: 5.10.36-2-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.36-2-MANJARO x64-advanced-aca5a27a-5b1c-4fe3-a56f-d1185bde7517' {
		linux	/vmlinuz-5.10-x86_64 root=UUID=aca5a27a-5b1c-4fe3-a56f-d1185bde7517 rw  quiet udev.log_priority=3
	menuentry 'Manjaro Linux (Kernel: 5.10.36-2-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.36-2-MANJARO x64-fallback-aca5a27a-5b1c-4fe3-a56f-d1185bde7517' {
		linux	/vmlinuz-5.10-x86_64 root=UUID=aca5a27a-5b1c-4fe3-a56f-d1185bde7517 rw  quiet udev.log_priority=3
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {

mhwd-kernel -li:

Currently running: 5.4.112-1-MANJARO (linux54)
The following kernels are installed in your system:
   * linux510

Can someone help me, please?

boot on USB iso manjaro ( live)

sudo manjaro-chroot -a
pacman -Syyu
mkinitcpio -P
exit ( end-chroot)
pacman -Fl linux54
linux54 boot/
linux54 boot/linux54-x86_64.kver
linux54 usr/
linux54 usr/lib/
linux54 usr/lib/modules/
linux54 usr/lib/modules/5.4.122-1-MANJARO/

/boot/grub/grub.cfg does not match (belong to) the grub booting your system.
Check the partition mounted there

mount | grep boot

and check if your BIOS/UEFI is actually set to boot from that drive/partition.

Thank you all for the replies!

Replying to @stephane
All the commands finished successfully, no errors were thrown.

Replying to @philm
Had to do sudo pacman -Fy linux54 before, but then got a long list of files for example:

linux54 usr/lib/modules/5.4.118-1-MANJARO/vmlinuz

Replying to @freggel.doe

/dev/sdb1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)

And UEFI is set to boot from that drive.

So I’ve come a little bit further. Turns out that I maybe messed up some things in /boot/EFI folder. I removed a couple of things and I’m left with:

├── EFI
│   ├── EFI
│   │   ├── manjaro
│   │   │   ├── grub.cfg
│   │   │   └── grubx64.efi
├── grub
│   ├── fonts
│   ├── grub.cfg
│   ├── grubenv
│   ├── locale
│   ├── themes
│   └── x86_64-efi
├── initramfs-5.10-x86_64-fallback.img
├── initramfs-5.10-x86_64.img
├── linux510-x86_64.kver
└── vmlinuz-5.10-x86_64

I’m still not sure if this is correct (the double EFI/EFI folder - or it doesn’t matter or the grub.cfg being in 2 different folders).

Currently I cannot boot into my system: “No active partitions found.”
If I boot from my Live USB and on the first screen choose “Detect EFI bootloaders” I get the correct kernel version 5.10.36-2 and if I enter I then boot into my system normally.

Can you help me fix my bootloader to start normally (without the use of Live USB)?

Ok, I managed to fix it. The command efibootmgr -v was pointing to the worng file:


where in fact I had that EFI/EFI double folder structure :smile:
I had to update my efi boot loader with efibootmgr -c -d /dev/sdb -p 1 -L "Manjaro" -l "\EFI\EFI\Manjaro\grubx64.efi"

I did a sudo update-grub just for good measure.

The following links helped:

I’m still not sure what caused this out-of-sync of kernel versions but at least my machine lives to see another day :slight_smile:

Thank you all for your input!
Have a great day

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.