You are not logged in.

#1 2017-09-19 14:07:44

gear4
Member
Registered: 2017-09-04
Posts: 30

[SOLVED] Arch Linux kernel version not changing even after upgrade

I have currently Linux 4.10.13-1 kernel installed on my arch. If I install linux-lts or upgrade the linux package using pacman, a folder with the corresponding kernel version name is created in /lib/modules as should be but Xorg fails to run(on reboot) because it still looks for drivers in  /lib/modules/4.10.13-1-ARCH/ instead of the new folder. Also, even after the upgrade (and rebooting), the terminal still shows the linux version as 4.10.13-1 instead of the upgraded one. How do I fix this?

Last edited by gear4 (2018-01-26 12:10:49)

Offline

#2 2017-09-19 14:20:29

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,002
Website

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

What boot loader are you using?

For example, I am using systemd-boot and have my configuration file pointing to "vmlinuz-linux". If you don't update your boot loader configuration then it won't boot any differently than normal...

Also, 4.10.13 is five months old! Have you been updating since then?

Last edited by drcouzelis (2017-09-19 14:21:34)

Offline

#3 2017-09-19 14:22:35

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

This is the most common problem on this forum. Your system is booting with initramfs from the older kernel. New image was not be created probably because /boot was not mounted during the upgrade. Mount /boot and reinstall the kernel package to fix this.

Offline

#4 2017-09-19 14:23:42

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,026

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

This usually happens when you upgrade without having your /boot partition mounted.

Offline

#5 2017-09-19 14:30:19

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,002
Website

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

Oh, interesting! So, if the original poster is using UEFI and has an EFI System Partition, the computer will still boot even if the partition isn't ever mounted as "/boot"?

Offline

#6 2017-09-19 14:43:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,133

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

drcouzelis wrote:

Oh, interesting! So, if the original poster is using UEFI and has an EFI System Partition, the computer will still boot even if the partition isn't ever mounted as "/boot"?

Yep.  All you need to boot is a kernel and (for non-monolithic kernels) an initrd on the boot partition, and a root partition that contains any needed modules and the init system that is passed to the kernel by the EFI configuration.

Last edited by ewaller (2017-09-19 15:03:24)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2017-09-19 14:59:28

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,103
Website

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

Even a bios system can boot without the boot partition ever being mounted on /boot.

There is no "boot" directory on which to mount a partition until well into the boot process: the kernel must be running, any relevant initramfs will have been loaded, the real root must be mounted and chrooted into.  The boot process is effectively complete before a boot partition is (re)mounted on /boot.

Last edited by Trilby (2017-09-19 14:59:51)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#8 2017-09-19 15:12:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,133

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

Trilby wrote:

... the real root must be mounted and chrooted into.

That is interesting.  I had never considered that the boot process might do a chroot from the initrd to the /root partition. 
I cut my teeth on Gentoo with a monolithic kernel and no initrd; the only thing to be mounted during the boot is the root.

With an initrd, I guess the initial root is the initrd and later, without restarting a new kernel, switches to the user's root partition.  But... When doing a chroot from the command line, the state is preserved and comes back into context when the chroot exits.  When booting from an initrd, I don't believe the state before the chroot is preserved.  Or is it?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2017-09-19 15:34:20

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,103
Website

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

I don't think the need to mount and chroot into the real root depends on using an initrd.  If there is a separate boot partition a similar chroot must be done regardless.

With a monolithic kernel, the only difference is that the kernel has everthing it needs baked-in in order to do this mounting and chrooting, with an initrd the modules and tools necessary to mount and chroot may exist only in the initrd.

With a separate boot/efi partition the bootloader and/or firmware points to the kernel (and optionally initrd) on that boot partition.  With a monolithic kernel, the kernel will load from the boot/efi partition, then mount the real root.  The kernel itself has it's own (pseudo)filesystem tree (minimal though it may be) prior to the real root being mounted even if there is no initrd.

https://wiki.archlinux.org/index.php/Arch_boot_process

I'm not too sure if that initial state is preserved and returned too - but my impression was that it is during the shutdown process.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#10 2017-09-19 15:39:52

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,026

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

There's a bit more to it than just chroot. It uses switch_root, which is similar to chroot, but does a bunch of cleanup and moving of some of the special filesystems. It's also called with exec, so nothing remains.

"chroot" is a good way to explain it as people understand that, just don't get bogged down in the implementation details.

Last edited by Scimmia (2017-09-19 15:47:00)

Offline

#11 2017-09-19 16:32:54

gear4
Member
Registered: 2017-09-04
Posts: 30

Re: [SOLVED] Arch Linux kernel version not changing even after upgrade

drcouzelis wrote:

What boot loader are you using?

For example, I am using systemd-boot and have my configuration file pointing to "vmlinuz-linux". If you don't update your boot loader configuration then it won't boot any differently than normal...

Also, 4.10.13 is five months old! Have you been updating since then?

Thank you so much. This works.
I've been updating everything except the kernel for months.

Offline

Board footer

Powered by FluxBB