Conflicting Linux Versions

kernel

#1

A couple of days ago I followed Vivek’s guide and upgraded my kernel to 5.0.

Since this is my work machine, I can’t play around on it like I do my personal laptop and review /var/log/syslog every Wednesday. Today’s log had me confused. Here are the first few lines of today’s startup:

Mar  5 06:26:54 sparxmith_devops syslogd (GNU inetutils 1.9.4): restart
Mar  5 06:26:54 sparxmith_devops vmunix: [    0.000000] Linux version 4.20.12-042012-generic (kernel@gloin) (gcc version 8.2.0 (Ubuntu 8.2.0-21ubuntu1)) #201902230431 SMP Sat Feb 23 09:33:39 UTC 2019
Mar  5 06:26:54 sparxmith_devops vmunix: [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.20.12-042012-generic root=UUID=a22520ef-2ec9-11e9-a1fb-a0cec81766c1 ro

## However, the below output contradicts the above:
sparxmith@sparxmith_devops:/var/log$ uname -r
5.0.0
sparxmith@sparxmith_devops:/var/log$ uname -a
Linux sparxmith_devops 5.0.0 #1 SMP Tue Mar 5 06:50:09 CST 2019 x86_64 x86_64 x86_64 GNU/Linux

## Additionally, grub shows 5.0 as the first entry:
sparxmith@sparxmith_devops:/var/log$ cat /boot/grub/grub.cfg
...
        linux   /boot/vmlinuz-5.0.0 root=UUID=a22520ef-2ec9-11e9-a1fb-a0cec81766c1 ro  
        initrd  /boot/initrd.img-5.0.0

Anyone have any insight into this problem?


#2

I think that is log when you restarted machine (that is those are old entries):

Mar  5 06:26:54 sparxmith_devops syslogd (GNU inetutils 1.9.4): restart

Also the following gives you idea about running kernel and it should report 5.0.0

cat /proc/cmdline
cat /proc/version

#3

Your guess is correct.

I had mixed up the date (thinking today was March 5th) and when I had actually installed the new kernel (having compiled it on the 3rd, I didn’t get around to installing until the 5th).

A tac syslog | less shows that as of this morning, I was booting with kernel 5.0 instead of 4.20.

Thanks for pointing out my mistake. :sunglasses: