Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel returns the wrong version number
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
MadNoah
n00b
n00b


Joined: 16 May 2018
Posts: 21

PostPosted: Thu May 17, 2018 12:08 pm    Post subject: kernel returns the wrong version number Reply with quote

I use the standard Gentoo kernel and the Efistub bootloader.
Recently I upgraded the kernel to version 4.16.5 as shown in this wiki article:
https://wiki.gentoo.org/wiki/Kernel/Upgrade
Although I uninstalled the old kernel sources and installed the new kernel,
the command uname -a still gives me the old kernel version.
However, if you edit the configuration file and reinstall the kernel, the desired effects will occur.
Can someone explain this strange behavior?

Code:
# ls /usr/src/       
linux-4.16.5-gentoo/  linux@


Code:
# ls /usr/src/linux/
Documentation/  arch/   certs/   distro/   firmware/  include/  ipc/     lib/  net/      scripts/   sound/  usr/   COPYING  Kbuild   MAINTAINERS  Module.symvers  System.map  linux-4.16.5-gentoo@  modules.order  vmlinux.o
LICENSES/       block/  crypto/  drivers/  fs/        init/     kernel/  mm/   samples/  security/  tools/  virt/  CREDITS  Kconfig  Makefile     README          built-in.o  modules.builtin       vmlinux*


Code:
# ls /boot/
efi/  System.map-4.16.5-gentoo  config-4.16.5-gentoo  vmlinuz-4.16.5-gentoo


Code:
# uname -a
 Linux homunculus 4.9.95-gentoo #1 SMP Wed Apr 25 23:47:39 CEST 2018 x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel GNU/Linux


Code:
# dmesg                                       
[    0.000000] Linux version 4.9.95-gentoo (root@livecd) (gcc version 6.4.0 (Gentoo 6.4.0-r1 p1.3) ) #1 SMP Wed Apr 25 23:47:39 CEST 2018
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21757
Location: here

PostPosted: Thu May 17, 2018 12:11 pm    Post subject: Reply with quote

You tried to mount boot before ls?
Code:
# mount /boot
# ls /boot

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
MadNoah
n00b
n00b


Joined: 16 May 2018
Posts: 21

PostPosted: Thu May 17, 2018 12:24 pm    Post subject: Reply with quote

yes

Code:
# mount /boot
mount: /boot: /dev/sda1 already mounted on /boot.


Code:
# ls /boot   
efi/  System.map-4.16.5-gentoo*  config-4.16.5-gentoo*  vmlinuz-4.16.5-gentoo*
Back to top
View user's profile Send private message
MadNoah
n00b
n00b


Joined: 16 May 2018
Posts: 21

PostPosted: Thu May 17, 2018 12:30 pm    Post subject: Reply with quote

that was the first thing i was thinking of, because of the dmesg output saying something strange about "root@livecd"
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21757
Location: here

PostPosted: Thu May 17, 2018 12:32 pm    Post subject: Reply with quote

And output of command
Code:
$ strings /boot/vmlinuz-4.16.5-gentoo |grep -E "^[1-4]\.[0-9][0-9]*\.[0-9][0-9]*" |awk '{print $1}' |head -1

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
MadNoah
n00b
n00b


Joined: 16 May 2018
Posts: 21

PostPosted: Thu May 17, 2018 1:35 pm    Post subject: Reply with quote

Code:
# strings /boot/vmlinuz-4.16.5-gentoo |grep -E "^[1-4]\.[0-9][0-9]*\.[0-9][0-9]*" |awk '{print $1}' |head -1
4.16.5-gentoo
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 864
Location: The Village, Portmeirion

PostPosted: Thu May 17, 2018 2:41 pm    Post subject: Reply with quote

I think it's booting the stub kernel that is in the EFI directory, not the one in boot.
Code:
efibootmgr -v
Back to top
View user's profile Send private message
MadNoah
n00b
n00b


Joined: 16 May 2018
Posts: 21

PostPosted: Sat May 19, 2018 2:21 pm    Post subject: Reply with quote

Thanks. Efibootmgr -v gave some strange hexadezimal Output. Re emerging efibootmgr and running the above command resultet in no output. After creating a new boot entry the new kernel was booting without problems. It is still mysterious to me why the old Kernel was even booting without a boot entry set.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum